Comments (10)
This is great, can we get a PR? I'd do it myself but I'm a bit short on time nowadays
from freecad.
So you removed the "Fix" in your stylesheet and the blank space goes away for you? Can you show us the code you edited?
The stylesheets are basically always created based on another sheet, and not recreated from scratch, so this might potentially be just dead weight carried since inception.
I think there is another "stylesheet" wide bug (?) were tab width is significantly wider for stylesheets, so you need to scroll in the preference menu if kept at default dimensions, for example:
WIthout a stylesheet, the default width is perfect to fit all tabs without scrolling:
So both of these might be stuff that is copied through all stylesheets since the beginning
from freecad.
Jup, I'll post the link I shared on Twitter for reference: https://forum.freecadweb.org/viewtopic.php?p=597530#p597530
Can find my stylesheet here: https://github.com/MisterMakerNL/ExtremeProDark
MY goal of the stylesheet was to optimize screen-space, so it's all a bit compacted.
from freecad.
This goes a bit deeper than I thought.
Yes, all stylesheets have that blank space, yes removing that padding fixes the blank space, but in any case, no stylesheet correctly shows most of the checkboxes in dropdown menus.
Here is the original without any stylesheet:
This is any random stylesheet, showing no boxes but the blank space AFTER the Icon
And this is your fix, removing the blank space as well.
So, in no stylesheet can we currently see checked items in dropdown menus in the main window right now.
Interestingly, the item at the bottom without any icon has a working checkbox. It is just checkboxes WITH icons that get eaten up.
EDIT:
Related: https://bugreports.qt.io/browse/QTBUG-66380
According to this, styling with boxes and icons is impossible in current QT, and instead the icon (or its frame or background) should show the state. In that case we could remove the blank space and add a colored border showing the icon's state in all stylesheets.
from freecad.
Wow nice work!
Instead of a colored border could we make it look like a pressed in button?
btw this is how it looks on windows in freecad 0.2 without stylesheet.
from freecad.
I think I fixed it! (for windows)
Add this to the qss:
QMenu::icon:checked { /* appearance of a 'checked' icon */
background: gray;
border: 1px inset gray;
position: absolute;
top: 1px;
right: 1px;
bottom: 1px;
left: 1px;
}
above is from the wiki of QT below is what I ended up adding to my theme. Only need some Linux testers!!
QMenu::icon:checked { /* appearance of a 'checked' icon */
background: #6492d7;
border: 2px #6492d7;
position: absolute;
border-radius: 3px;
}
from freecad.
That looks quite good! And matches QTs intention.
I only find the 3 px corner radius a bit much, but that's for your stylesheet to decide. At least for Behave I would keep it smaller, but that I will try out later.
Gonna test on Linux later and implement your fix for the other stylesheets sitting in the FreeCAD source, using a fitting "checked" color for each stylesheet individually, unless you're already on it?
from freecad.
Sure thing!
from freecad.
Nice, I am happy it also worked in Linux!
from freecad.
closed by #6
from freecad.
Related Issues (20)
- Menu arrows do not have enough contrast
- Bodies selected in TreeView can be extremely bright when zoomed
- Disabled menubar items are not differentatiated from enabled ones
- Menubar icons too close to left edge HOT 3
- No indication that menubar items are actually checkboxes
- Toolbar dropdown arrow doesn't have enough contrast to background
- Inconsistent highlight widths in TreeView HOT 1
- Dracula theme misrepresents Sketcher geometry by using swapped & divergent colors
- Sketcher hover highlight is same color as constraints
- Dark text in deactivated text box
- Low contrast text cursor in active text boxes HOT 1
- Scrolling tab bar buttons very small
- Buttons inside table view overlap
- Low contrast close buttons on open document tabs HOT 1
- Low contrast up/down arrows on deactivated number entry boxes
- Expression-dependent values same color as background when highlighted in Data view table
- Property View -> Reference axis shows overlapping text when focused HOT 1
- Property View: some non-focused text visible behind focused controls HOT 1
- Property view: focused disabled label(?) very low contrast
- QToolBar ext button low-contrast
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freecad.