From c7d431d36f8bf6e9b94bab37c19dd51041e117c9 Mon Sep 17 00:00:00 2001 From: Fabien Broquard Date: Tue, 2 Oct 2018 20:21:37 +0200 Subject: na-tray: wide panels, convert main GtkBox display to GtkGrid New grid sorting/display functions to arrange notification area icons in a self reorganising grid main changes in: item_added_cb(), notification_notify() -> refresh_notify(). update_size_and_orientation() is no longer needed the grid auto arranges on any size-allocation which includes orientation changes. Grid is now refreshed with refresh_grid()/determine_grid_properties()/reorder_items_with_data(). based on the min_icon_size property the main applets' code can call na_grid_set_min_icon_size() to update the grid icon size. --- applets/notification_area/na-grid.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'applets/notification_area/na-grid.h') diff --git a/applets/notification_area/na-grid.h b/applets/notification_area/na-grid.h index 956d73c5..7ddcc23c 100644 --- a/applets/notification_area/na-grid.h +++ b/applets/notification_area/na-grid.h @@ -33,8 +33,10 @@ G_BEGIN_DECLS #define NA_TYPE_GRID (na_grid_get_type ()) -G_DECLARE_FINAL_TYPE (NaGrid, na_grid, NA, GRID, GtkBox) +G_DECLARE_FINAL_TYPE (NaGrid, na_grid, NA, GRID, GtkGrid) +void na_grid_set_min_icon_size (NaGrid *grid, + gint min_icon_size); GtkWidget *na_grid_new (GtkOrientation orientation); void na_grid_force_redraw (NaGrid *grid); -- cgit v1.2.1