From 0eb694f5112c5de3cb2f89be290bc4f9d78d083f Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Mon, 21 Mar 2022 20:46:26 +0000 Subject: [PATCH] label size tracks image size --- saturn/main.fnl | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/saturn/main.fnl b/saturn/main.fnl index e4cb694..0050ca3 100644 --- a/saturn/main.fnl +++ b/saturn/main.fnl @@ -240,20 +240,20 @@ (-> (: :get_style_context) (: :add_class "appbutton")) (: :add (doto (Gtk.Box {:orientation Gtk.Orientation.VERTICAL}) - (: :add app.IconImage) - (: :add (doto - (Gtk.Label { - :label app.Name - :halign Gtk.Align.CENTER - :justify Gtk.Justification.CENTER - :wrap true - }) - (: :set_line_wrap true) - (: :set_max_width_chars 10) - (tset :expand false))) + (: :pack_start app.IconImage false false 0) + (: :pack_start + (doto + (Gtk.Label { + ;; https://stackoverflow.com/questions/27462926/how-to-set-max-width-of-gtklabel-properly + :label app.Name + :justify Gtk.Justification.CENTER + :ellipsize Pango.EllipsizeMode.END + :hexpand true + }) + (: :set_max_width_chars 1)) + true true 0) )))) - (fn handle-dbus-method-call [conn sender path interface method params invocation] (when (and (= path dbus-service-attrs.path) (= interface dbus-service-attrs.interface))