Change icon size

Asked by splashis

Hey,
any way to change the icon size in Cardapio?

Thanks for this great software. !

Question information

Language:
English Edit question
Status:
Solved
For:
Cardapio Edit question
Assignee:
No assignee Edit question
Solved by:
Thiago Teixeira
Solved:
Last query:
Last reply:
Revision history for this message
Jan (jancborchardt-deactivatedaccount) said :
#1

Yes, there is if you modify the code yourself (actually pretty easy).
Open the terminal and type:
bzr clone lp:cardapio

Then go into cardapio/src/ and open cardapio.py, where you need to change the following lines:
606 self.icon_size_app = gtk.icon_size_lookup(gtk.ICON_SIZE_LARGE_TOOLBAR)[0]
607 self.icon_size_category = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)[0]

Into something like this:
606 self.icon_size_app = gtk.icon_size_lookup(gtk.ICON_SIZE_LARGE_TOOLBAR)[0]*2
607 self.icon_size_category = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)[0]*2

I simply added 2 as a factor to double the size of both the app and category icons.

Then you need to install it by going back to the terminal and typing:
cd cardapio
sudo make install

And finally, restart the panel by typing:
killall gnome-panel

:)

(And if that would be your next question: I don’t think that changing them via graphical interface will be implemented because the icons are using standard icon sizes as defined by the system, namely »gtk.ICON_SIZE_LARGE_TOOLBAR« and »gtk.ICON_SIZE_MENU«.)

Revision history for this message
Best Thiago Teixeira (tvst) said :
#2

Here's an easier way: just edit your ~/.gtkrc-2.0

1) Open GEdit and paste this text into it

gtk-icon-sizes = "gtk-large-toolbar=16,16:gtk-menu=16,16"

2) Save as ~/.gtkrc-2.0
3) Restart Cardapio

    ~

Caveats
===============================

1) This will change the toolbar and menu icon sizes in all your GTK applications)

2) Because of a bug in Gtk, this may not work depending on which theme you use. That is, if the theme *already* sets the gtk-icon-sizes variable in it, then that line in your gtkrc-2.0 will be ignored.

The solution, in that case, is to remove the offending line from the theme. You can usually find the theme file at either
     /usr/share/themes/THEME_NAME/gtk-2.0/gtkrc
    - or -
    ~/.themes/THEME_NAME/gtk-2.0/gtkrc

Revision history for this message
splashis (splashote) said :
#3

Great, thank you.

Revision history for this message
splashis (splashote) said :
#4

Thanks tvst, that solved my question.