[Commits] [SCM] claws branch, master, updated. 3.14.0-53-g8ea7183

mones at claws-mail.org mones at claws-mail.org
Wed Aug 31 20:49:12 CEST 2016


The branch, master has been updated
       via  8ea71837e7995726ed8207c6718122b04004ea41 (commit)
      from  6110e7055f145549af317a4c9cf05f6e2c1b620e (commit)

Summary of changes:
 src/gtk/icon_legend.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)


- Log -----------------------------------------------------------------
commit 8ea71837e7995726ed8207c6718122b04004ea41
Author: Ricardo Mones <ricardo at mones.org>
Date:   Wed Aug 31 20:48:13 2016 +0200

    Improve icon legend appearance a bit
    
    Remove extra space and replace scrolled window with a frame.

diff --git a/src/gtk/icon_legend.c b/src/gtk/icon_legend.c
index 1b3072b..eb89c91 100644
--- a/src/gtk/icon_legend.c
+++ b/src/gtk/icon_legend.c
@@ -34,6 +34,7 @@
 #include "prefs_gtk.h"
 
 #define ICONS 23
+#define ROWS ((ICONS % 2 == 0)? ICONS / 2: (ICONS + 1) / 2)
 
 StockPixmap legend_icons[ICONS] = {
 	STOCK_PIXMAP_NEW,
@@ -118,8 +119,8 @@ static void legend_create(void)
 	GtkWidget *label;
 	GtkWidget *icon_label;
 	GtkWidget *desc_label;
-	GtkWidget *scrolled_window;
 	GtkWidget *table;
+	GtkWidget *frame;
 	gint i, j, k;
 
 	window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "icon_legend");
@@ -148,12 +149,7 @@ static void legend_create(void)
 	gtk_widget_show(label);
 	gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
 
-	scrolled_window = gtk_scrolled_window_new (NULL, NULL);
-	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
-                                        GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-	gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 0);
-
-	table = gtk_table_new(ICONS, 4, FALSE);
+	table = gtk_table_new(ROWS, 4, FALSE);
 	gtk_container_set_border_width(GTK_CONTAINER(table), 8);
 	gtk_table_set_row_spacings(GTK_TABLE(table), 4);
 	gtk_table_set_col_spacings(GTK_TABLE(table), 8);
@@ -176,8 +172,8 @@ static void legend_create(void)
 		}
 	}
 
-	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window),
-					      table);
+	PACK_FRAME(vbox, frame, NULL);
+	gtk_container_add(GTK_CONTAINER(frame), table);
 
 	gtkut_stock_button_set_create(&confirm_area, &close_button, GTK_STOCK_CLOSE,
 				      NULL, NULL, NULL, NULL);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list