diff options
author | lukefromdc <[email protected]> | 2023-07-19 22:12:39 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2023-07-20 18:38:35 +0200 |
commit | 0f5f3a8dcf3719cf43d03f71acc171955178e78a (patch) | |
tree | fa6da1560b2569e3e1765e58e046032da61698c7 | |
parent | e8cd95789810bc9efb7961f553e99f0c2eaa0cd0 (diff) | |
download | mate-panel-0f5f3a8dcf3719cf43d03f71acc171955178e78a.tar.bz2 mate-panel-0f5f3a8dcf3719cf43d03f71acc171955178e78a.tar.xz |
wayland: stop tasklist overflowing over other applets
*allows up to 20 window buttons on a half screen width window list before overflow
-rw-r--r-- | applets/wncklet/wayland-backend.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/applets/wncklet/wayland-backend.c b/applets/wncklet/wayland-backend.c index 947d28f8..c0814653 100644 --- a/applets/wncklet/wayland-backend.c +++ b/applets/wncklet/wayland-backend.c @@ -31,8 +31,6 @@ #include "wayland-backend.h" #include "wayland-protocol/wlr-foreign-toplevel-management-unstable-v1-client.h" -static const int window_button_width = 140; - typedef struct { GtkWidget *menu; @@ -466,14 +464,13 @@ toplevel_task_new (TasklistManager *tasklist, struct zwlr_foreign_toplevel_handl task->icon = gtk_image_new_from_icon_name ("unknown", GTK_ICON_SIZE_MENU); task->label = gtk_label_new (""); - gtk_label_set_max_width_chars (GTK_LABEL (task->label), 1); - gtk_widget_set_size_request (task->label, window_button_width, -1); + gtk_label_set_width_chars (GTK_LABEL (task->label), -1); gtk_label_set_ellipsize (GTK_LABEL (task->label), PANGO_ELLIPSIZE_END); gtk_label_set_xalign (GTK_LABEL (task->label), 0.0); GtkWidget *box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); - gtk_box_pack_start (GTK_BOX (box), task->icon, FALSE, FALSE, 5); - gtk_box_pack_start (GTK_BOX (box), task->label, TRUE, TRUE, 5); + gtk_box_pack_start (GTK_BOX (box), task->icon, FALSE, FALSE, 2); + gtk_box_pack_start (GTK_BOX (box), task->label, TRUE, TRUE, 3); gtk_container_add (GTK_CONTAINER (task->button), box); gtk_widget_show_all (task->button); |