smaller close button
Andreas Köhler
andi5.py at gmx.net
Fri Dec 16 10:39:39 EST 2005
Hi,
attached patch shrinks the close button in the notebook, if it is
visible of course. It is shamelessly stolen from gedit, though it
seems that gaim has an even smaller close button. Nevertheless imho
the current one is too big.
Quoting GNOME2_STATUS:
"""Change Notebook tabs to include an 'x' to act as the "close tab"
method, and then remove the "Close" button from the toolbar.
Then we can also decide if we want to allow a user to 'close' the
account tree."""
If the current solution is the wanted one, you might consider
removing this note.
-- andi5
-------------- next part --------------
Index: src/gnome-utils/gnc-main-window.c
===================================================================
--- src/gnome-utils/gnc-main-window.c (Revision 12162)
+++ src/gnome-utils/gnc-main-window.c (Arbeitskopie)
@@ -1963,10 +1963,13 @@
/* Add close button - Not for immutable pages */
if (!immutable) {
GtkWidget *close_image, *close_button;
+ gint w, h;
close_button = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(close_button), GTK_RELIEF_NONE);
- close_image=gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
+ gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &w, &h);
+ gtk_widget_set_size_request(close_button, w + 2, h + 2);
+ close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
gtk_widget_show(close_image);
gtk_container_add(GTK_CONTAINER(close_button), close_image);
if (gnc_gconf_get_bool(GCONF_GENERAL, KEY_SHOW_CLOSE_BUTTON, NULL))
More information about the gnucash-patches
mailing list