Bug 404819

Summary: Yast GTK is hardcoding icon sizes
Product: [openSUSE] openSUSE 11.0 Reporter: Michael Monreal <michael.monreal>
Component: YaST2Assignee: Forgotten User h13THG8RK1 <forgotten_h13THG8RK1>
Status: RESOLVED INVALID QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: forgotten_h13THG8RK1
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Screenshot of yast and nautilus

Description Michael Monreal 2008-06-28 13:58:21 UTC
Currently GTK yast seems to be hardcoding icon sizes. For themes which have custom button size (e.g. 16x16 or 32x32) yast still displays the 24x24 sized icons.

Yast should make use of the gtk icon size variable (GTK_SIZE_BUTTON) and reflect the current theme's size.
Comment 1 Michael Monreal 2008-06-28 13:59:30 UTC
Created attachment 224997 [details]
Screenshot of yast and nautilus

See how other gtk apps like nautilus take the theme's size setting into account (here: using 16x16 button icons).
Comment 2 Forgotten User h13THG8RK1 2008-06-29 01:45:02 UTC
Hmmmm. We are passing the GTK_ICON_SIZE_BUTTON constant to the icon loader that should get us the image in the appropriate size. Could it be that you changed the gtk style while running Yast? Does it work when you launch yast again?

Also, please tell me what's that 16x16 style, or can you customize a style to get that effect. I only seem to have styles with bigger icons to test.
Comment 3 Michael Monreal 2008-06-29 08:50:10 UTC
Eh... actually I was wrong. I was using the default theme and just put gtk-icon-sizes = "gtk-button=16,16" into .gtkrc-2.0 to get the smaller icons (it's really nice to have on smaller screens as it makes buttons quite a bit smaller).

Needless to say I should have but the same into the root .gtkrc-2.0. 
Comment 4 Forgotten User h13THG8RK1 2008-06-29 10:53:16 UTC
Yeah, I guess there could be problems with that... If everything was working well though, Gnome has this daemon that should make any application run in your desktop as another user to adopt your settings. But tried it myself, and I see what you mean -- funny that if you change the style colors through the control center, it does reflect in yast as root, and I'm sure it saves them in some ~/.gtk-xyz file.
If you think it's worth it, you could fill another bug report for Gnome here or on the Gnome bugzilla... (please use some common app for the screenshot, not yast though) I'm sure it's because they are already very much busy, not because they are unaware of the issue, that they haven't got it working though... Opening a bug report is free though. ;)
Comment 5 Michael Monreal 2008-06-29 11:14:29 UTC
The current behaviour is probably correct as the $HOME/.gtkrc-2.0 is a user file only. If the gtk-icon-sizes key was part of say the Gilouche theme itself (upstream GNOME plans to ship such a "small space" theme in the next release) it should probably work though (not tested).

The ultimate solution is not running apps as root, anyway, as we now have PolicyKit to gain permissions and I really hope YaST will support it soon.
Comment 6 Forgotten User h13THG8RK1 2008-06-29 12:12:10 UTC
(In reply to comment #5 from Michael Monreal)
> The current behaviour is probably correct as the $HOME/.gtkrc-2.0 is a user
> file only.

So are style colors, fonts, icons and other settings. Maybe not all of these settings are stored and loaded as GTK RC files, but I think some of these are. It might be possible to place that gtkrc file somewhere to be picked up by the Gnome settings deamon... But yeah, this is a GTK thing; might not really be considered a Gnome bug, though it would be nice if they would deal with it.

> If the gtk-icon-sizes key was part of say the Gilouche theme itself
> (upstream GNOME plans to ship such a "small space" theme in the next release)
> it should probably work though (not tested).
> 
That would work for sure. Those styles with bigger icons on the button work fine whether the apps run as the user or root.

> The ultimate solution is not running apps as root, anyway, as we now have
> PolicyKit to gain permissions and I really hope YaST will support it soon.
> 
I have seen interest on that for awhile; a lot of those guys are very engineous and there is no lack of project ideas, but they already have a lot to attend to... I doubt you'll see that shortly, but I don't know the priority of something like that, so it's very possible that it will be featured in the next big one.
But yeah, we already had issues with yast running as root and the user trying to use accessibility tools like the screen reader on it, so it would definitively be progress.