-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gui] apply icon size user preference to dock widget tool buttons #2071
Conversation
I think the travis build failure is not related to this commit. |
Here's a simple before vs after screenshot (showing icon size 16 x 16 to up to 48 x 48): Some of the layer panel tool icons lack high resolution versions, but the area of the button does grow - respecting the user's preference. If someone has access to the original SVGs for those icons, it would be worth adding. |
[gui] apply icon size user preference to dock widget tool buttons
Is it possible with this change to keep icons in dock smaller then toolbar icons? I don't want to waste display space |
@alexbruy before this commit, icons being smaller than toolbar was actually a random "accident", in the sense that it left it to the system theme to decide on the size of the button. The result was:
On Gnome Shell, when the user was setting his/her icon size to 16, the toolbar icons would be 16 x 16, but the panel buttons would be larger than the toolbar buttons at 24 x 24. The commits allows for a determined behavior across OSes. That said, I could refine the code, and have the dock panel buttons always one size bellow the toolbar buttons. It'd look like this:
Thoughts? |
Maybe we can introduce another setting for panel icons in case one want to have both icons in same size or have panel icons larger then toolbar? Not sure which approach is better. |
Please no more interface settings... We need to choose a nice default size and stick with it! |
@nyalldawson +1 I'm a +1 on one size smaller then toolbars. |
@alexbruy @nyalldawson @NathanW2 Ok, I'll change this by the weekend. |
@nirvn Hi. Thanks for working on this. +1 for reducing the relative size for dock icons when compared to toolbar icons. Kinda oversize-looking now on Mac, especially for QToolButton icons: |
Could I also suggest that the dock icons for TOC are e.g. 50% of main toolbar icon size? I think they take up too much space and might be better as monochrome mini-icons similar to the little mouse icon next to the coordinates in the status bar. |
This pull request adds a app-wide style sheet setting to allow for dock widget's tool buttons to respect the user-set icon size setting. This improves the appearance of QGIS under several GTK themes, including gnome shell's default Adwaita theme. See http://hub.qgis.org/issues/12816 for a screenshot of the problem under gnome shell's default theme.
It also allows for dock tool buttons to grow to larger sizes (i.e. > 24 pixels), which might be desirable on high resolution screens / tablets.
Since this harmonizes the size of the toolbar buttons and the dock widget tool buttons, it has an impact on how QGIS looks by default on Windows and on Ubuntu. On both of these OSes, the default dock widget tool button size is set to 16 x 16 (smaller than QGIS' default icon size of 24 x 24). The result is that on those systems, the layer dock widget will have slightly bigger buttons by default, unless and until the user customizes the icon size setting if desired. IMO, this looks better due to being more visually consistent.