commit 098dd8237e3fe7d1ea756db318eacd8221af05eb parent 772da574767c7900d6fc26d29a914d14c47c43c1 Author: Daniel Barlow <dan@telent.net> Date: Mon, 21 Mar 2022 20:46:26 +0000 saturn: label width tracks image size looks like we can get *four* columns Diffstat:
| M | saturn/main.fnl | | | 24 | ++++++++++++------------ |
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git 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))