eufon

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 900b34a72184e5775578719d006aa59db9d031c8
parent 2df6bd80a737b9782f1f64d419a8276bd263cd34
Author: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date:   Mon, 17 Jan 2022 20:50:59 -0500

saturn: Use FlowBox rather than Grid

This makes the app automagically more responsive!

Diffstat:
Msaturn/main.fnl | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/saturn/main.fnl b/saturn/main.fnl @@ -133,17 +133,13 @@ (local grid-columns 4) -(let [grid (Gtk.Grid { +(let [grid (Gtk.FlowBox { :column_spacing 2 :row_spacing 5 }) scrolled-window (Gtk.ScrolledWindow {})] - (var i 0) (each [_ app (pairs (all-apps))] - (let [x (% i grid-columns) - y (// i grid-columns)] - (set i (+ i 1)) - (grid:attach (button-for app) x y 1 1))) + (grid:insert (button-for app) -1)) (scrolled-window:add grid) (window:add scrolled-window))