Skip to content
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

Merged
merged 1 commit into from
May 27, 2015

Conversation

nirvn
Copy link
Contributor

@nirvn nirvn commented May 24, 2015

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.

@nirvn
Copy link
Contributor Author

nirvn commented May 24, 2015

I think the travis build failure is not related to this commit.

@nirvn
Copy link
Contributor Author

nirvn commented May 25, 2015

Here's a simple before vs after screenshot (showing icon size 16 x 16 to up to 48 x 48):

before_after

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.

NathanW2 added a commit that referenced this pull request May 27, 2015
[gui] apply icon size user preference to dock widget tool buttons
@NathanW2 NathanW2 merged commit 4edc4b9 into qgis:master May 27, 2015
@alexbruy
Copy link
Contributor

Is it possible with this change to keep icons in dock smaller then toolbar icons? I don't want to waste display space

@nirvn
Copy link
Contributor Author

nirvn commented May 28, 2015

@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 windows, 16 x 16
  • on ubuntu unity, 16 x 16
  • on gnome shell, 24 x 24

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:

  • toolbar 16 x 16, panel 16 x 16
  • toolbar 24 x 24, panel 16 x 16
  • toolbar 32 x 32, panel 24 x 24
  • toolbar 48 x 48, panel 32 x 32
  • toolbar 64 x 64, panel 48 x 48

Thoughts?

@alexbruy
Copy link
Contributor

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.

@nyalldawson
Copy link
Collaborator

Please no more interface settings... We need to choose a nice default size and stick with it!

@NathanW2
Copy link
Member

@nyalldawson +1

I'm a +1 on one size smaller then toolbars.

@nirvn
Copy link
Contributor Author

nirvn commented May 28, 2015

@alexbruy @nyalldawson @NathanW2 Ok, I'll change this by the weekend.

@dakcarto
Copy link
Member

@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:

layers-dock-icons

@timlinux
Copy link
Member

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.

@nirvn nirvn deleted the fix_dock_tool_button branch December 28, 2016 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants