SF.net SVN: geany: [1925] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Tue Oct 2 14:23:12 UTC 2007


Revision: 1925
          http://geany.svn.sourceforge.net/geany/?rev=1925&view=rev
Author:   ntrel
Date:     2007-10-02 07:23:11 -0700 (Tue, 02 Oct 2007)

Log Message:
-----------
Attempt to fix problem with tab close button size.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/notebook.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-10-01 12:58:29 UTC (rev 1924)
+++ trunk/ChangeLog	2007-10-02 14:23:11 UTC (rev 1925)
@@ -1,3 +1,9 @@
+2007-10-02  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/notebook.c:
+   Attempt to fix problem with tab close button size.
+
+
 2007-10-01  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * src/document.c: Fix scrolling bugs when searching text and the cursor

Modified: trunk/src/notebook.c
===================================================================
--- trunk/src/notebook.c	2007-10-01 12:58:29 UTC (rev 1924)
+++ trunk/src/notebook.c	2007-10-02 14:23:11 UTC (rev 1925)
@@ -323,6 +323,8 @@
 	if (prefs.show_tab_cross)
 	{
 		GtkWidget *image, *btn, *align;
+		GtkRcStyle *rcstyle;
+		GtkRequisition size;
 
 		btn = gtk_button_new();
 		gtk_button_set_relief(GTK_BUTTON(btn), GTK_RELIEF_NONE);
@@ -330,10 +332,16 @@
 		/* don't allow focus on the close button */
 		gtk_button_set_focus_on_click(GTK_BUTTON(btn), FALSE);
 
+		/* make it as small as possible */
+		rcstyle = gtk_rc_style_new();
+		rcstyle->xthickness = rcstyle->ythickness = 0;
+		gtk_widget_modify_style(btn, rcstyle);
+		gtk_rc_style_unref(rcstyle);
+
 		image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
+		gtk_widget_size_request(image, &size);
+		gtk_widget_set_size_request(btn, size.width, size.height);
 		gtk_container_add(GTK_CONTAINER(btn), image);
-		gtk_container_set_border_width(GTK_CONTAINER(btn), 0);
-		gtk_widget_set_size_request(btn, 19, 18);
 
 		align = gtk_alignment_new(1.0, 0.0, 0.0, 0.0);
 		gtk_container_add(GTK_CONTAINER(align), btn);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list