biscuit

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

commit f633b6bf8965f23d55fc7578810d16b9e8a08310
parent c06b527ff1dae6a09faef089caf9d7ded4695a22
Author: Daniel Barlow <dan@telent.net>
Date:   Sun,  8 Mar 2026 17:40:03 +0000

maps: set dimensions correctly on harpia

Diffstat:
Mpkgs/maps/main.fnl | 17++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/pkgs/maps/main.fnl b/pkgs/maps/main.fnl @@ -50,8 +50,8 @@ label.readout { (os.difftime (os.time localt) (os.time utct)))) -(local viewport-width 720) -(local viewport-height 800) +(var viewport-width nil) +(var viewport-height nil) (local tile-size 256) (fn styles [] @@ -70,10 +70,17 @@ label.readout { (local window (Gtk.Window { :title "Map" :name "toplevel" - :default_width viewport-width - :default_height viewport-height - + ;; cage will launch the window maximised, + ;; so these can be any value smaller than + ;; the max size + :default_width 100 + :default_height 100 :on_destroy main-quit + :on_size_allocate + (fn [w] + (let [(width height) (w:get_size)] + (set viewport-width width) + (set viewport-height height))) })) (local state-widgets { })