lem icon indicating copy to clipboard operation
lem copied to clipboard

UI not sizing/adjusting correctly

Open logoraz opened this issue 9 months ago • 1 comments

I built Lem SDL2 from source (commit 311138dc369fde16b2f13b04ae9416598c9a6c20) following the prescription on the manual for Fedora Linux. I noticed that when opened, the SDL2 UI Window doesn't seem to be drawing correctly, i.e. it is missing the space on the bottom under the modeline. Also, if you readjust the window up or down the space appears and disappears at certain length intervals.

Lastly the completion window (positioned at bottom) seems to follow this same problem, i.e. fits well within the Lem window if the dimensions are just right, as adjusted part of it tends to disappear to the left and bottom. I attached some screenshots to help show this.

Also, the UI seems to lag quite a bit when being resized manually via the mouse)

Image

Image

Image

I apologize if this is a repeat, searched issues and didn't see this.

logoraz avatar Mar 20 '25 13:03 logoraz

I installed it today and I tweaked these functions. It seems to help but the popup is still too low, or maybe the border is added to the height, which is why the result is cropped. I'll see if I come up with something more definitive

diff --git a/src/ext/popup-window.lisp b/src/ext/popup-window.lisp
index f910c997..277a293c 100644
--- a/src/ext/popup-window.lisp
+++ b/src/ext/popup-window.lisp
@@ -150,7 +150,7 @@
   (let* ((x (- (floor (display-width) 2)
                (floor width 2)))
          (y 1))
-    (list x y (1- width) height)))
+    (list x y width height)))
 
 (defmethod compute-popup-window-rectangle ((gravity gravity-bottom-display)
                                            &key width height
@@ -158,7 +158,7 @@
   (let* ((x (- (floor (display-width) 2)
                (floor width 2)))
          (y (- (display-height) height)))
-    (list x y (1- width) height)))
+    (list x y width height)))
 
 (defmethod compute-popup-window-rectangle ((gravity gravity-top) &key source-window width height
                                                                  &allow-other-keys)

christophejunke avatar Apr 04 '25 08:04 christophejunke