Re: My take icon icon resizing
- From: Brian Cameron <Brian Cameron sun com>
- To: calum benson sun com, otaylor redhat com
- Cc: bill haneman sun com, Brian Cameron sun com, markmc sun com, gtk-devel-list gnome org
- Subject: Re: My take icon icon resizing
- Date: Tue, 1 Oct 2002 16:08:04 +0100 (BST)
Owen & Others:
> > There is one important behaviour from Brian's original patch that yours
> > doesn't replicate though-- when I change back to a regular theme from a
> > large print theme, the icons don't get smaller again because the regular
> > themes don't specify an icon size. Was this intentional?
> >
> > (Brian can explain how his patch worked, but I assume he set the sizes
> > back to the default gtk sizes if they weren't explicitly specified in
> > the rc file).
>
> Are you really sure that this worked for Brian's original patch?
> I believe I know the bug that is causing this, but it should affect
> Brian's original patch as well.
>
> (The bug is that when you reparse RC files, previously set settings
> don't get cleared)
Yes I'm fairly confident that this did work with my patch.
I addressed this by adding two new values to the _IconSize structure in
gtkiconfactory.c which kept track of the theme height/width. When the
theme changed, the values for the theme height/width would be set to -1.
This was done by calling _gtk_reset_icon_theme at the beginning of the
gtk_rc_settings_changed function (called whenever gtk-theme-name or
gtk-key-theme-name was modified).
I added a listener to "gtk-icon-sizes" value in gtkrc so that when it
is modified, the callback will set the theme height/width to non -1
values. Therefore, gtkiconfactory would use the theme height/width
values if they were not -1, and would use the default values otherwise.
So I didn't really "set the sizes back to the default". Instead I use the
theme size if it is present, and the default value otherwise.
You can refer to the patch here, obviously:
http://bugzilla.gnome.org/showattachment.cgi?attach_id=10784
Brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]