Adjust PanelIconGrid: min spacing is now 1, no_window flag is now left unset by default.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Sun, 2 Oct 2016 20:11:59 +0000 (23:11 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Sun, 2 Oct 2016 20:11:59 +0000 (23:11 +0300)
ChangeLog
TODO
data/ui/launchtaskbar.glade
plugins/kbled/kbled.c
src/icon-grid.c

index c0d4149..1764b4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,8 @@
 * Added support for third-party plugins localized descriptions.
 * Implemented "lxpanelctl command ..." to send message to panel plugin.
 * Added APIs for PanelIconGrid to draw focus on drop.
+* Adjusted PanelIconGrid: min spacing is now 1, no_window flag is now left
+    unset by default.
 
 0.8.2
 -------------------------------------------------------------------------
diff --git a/TODO b/TODO
index 70e2e18..5d9333a 100644 (file)
--- a/TODO
+++ b/TODO
@@ -22,3 +22,4 @@
 * optional libnotify support (useful for battery and volume plugins)
 * pull improvements from Raspbian
 * add Most Recent support into 'menu' plugin
+* check and use weather-* standard themed icons for weather plugin
index 0eac29e..2444647 100644 (file)
@@ -8,7 +8,8 @@
     <property name="page_increment">10</property>
   </object>
   <object class="GtkAdjustment" id="adjustment_spacing">
-    <property name="upper">1000</property>
+    <property name="lower">1</property>
+    <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
index 511dad8..4c78c71 100644 (file)
@@ -134,7 +134,7 @@ static GtkWidget *kbled_constructor(LXPanel *panel, config_setting_t *settings)
     p = panel_icon_grid_new(panel_get_orientation(panel),
                             panel_get_icon_size(panel),
                             panel_get_icon_size(panel),
-                            0, 0, panel_get_height(panel));
+                            1, 0, panel_get_height(panel));
     lxpanel_plugin_set_data(p, kl, kbled_destructor);
 
     /* Then allocate three images for the three indications, but make them visible only when the configuration requests. */
@@ -219,7 +219,7 @@ static void kbled_panel_configuration_changed(LXPanel *panel, GtkWidget *p)
     panel_icon_grid_set_geometry(PANEL_ICON_GRID(p), panel_get_orientation(panel),
                                  panel_get_icon_size(panel),
                                  panel_get_icon_size(panel),
-                                 0, 0, panel_get_height(panel));
+                                 1, 0, panel_get_height(panel));
 
     /* Do a full redraw. */
     int current_state = kl->current_state;
index b8c582e..64cbf65 100644 (file)
@@ -499,7 +499,7 @@ void panel_icon_grid_set_geometry(PanelIconGrid * ig,
     ig->orientation = orientation;
     ig->child_width = child_width;
     ig->child_height = child_height;
-    ig->spacing = spacing;
+    ig->spacing = MAX(spacing, 1);
     ig->target_dimension = target_dimension;
     gtk_widget_queue_resize(GTK_WIDGET(ig));
 }
@@ -1045,9 +1045,9 @@ static void panel_icon_grid_class_init(PanelIconGridClass *klass)
                                     g_param_spec_int("spacing",
                                                      "Spacing",
                                                      "The amount of space between children",
-                                                     0,
+                                                     1,
                                                      G_MAXINT,
-                                                     0,
+                                                     1,
                                                      G_PARAM_READWRITE));
     g_object_class_install_property(object_class,
                                     PROP_CONSTRAIN_WIDTH,
@@ -1065,7 +1065,6 @@ static void panel_icon_grid_class_init(PanelIconGridClass *klass)
 
 static void panel_icon_grid_init(PanelIconGrid *ig)
 {
-    gtk_widget_set_has_window(GTK_WIDGET(ig), FALSE);
     gtk_widget_set_redraw_on_allocate(GTK_WIDGET(ig), FALSE);
 
     ig->orientation = GTK_ORIENTATION_HORIZONTAL;
@@ -1080,7 +1079,7 @@ GtkWidget * panel_icon_grid_new(
     /* Create a structure representing the icon grid and collect the parameters. */
     PanelIconGrid * ig = g_object_new(PANEL_TYPE_ICON_GRID,
                                       "orientation", orientation,
-                                      "spacing", spacing,
+                                      "spacing", MAX(spacing, 1),
                                       "border-width", border,
                                       NULL);