oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git

updates

Commit
91a4a5a35373f5ea4819a3151653176ccc347d4a
Parent
98c4ade
Author
tonybanters <tonybanters@gmail.com>
Date
2025-10-03 18:13:45

Diff

diff --git a/src/bar/bar.rs b/src/bar/bar.rs
index 0d3a0d0..34efe86 100644
--- a/src/bar/bar.rs
+++ b/src/bar/bar.rs
@@ -135,17 +135,18 @@ impl Bar {
                 &SCHEME_NORMAL
             };
 
-            let top_padding = 8;
-            let text_y = top_padding + self.font.ascent();
+            let text_height = self.font.height();
+            let top_margin = (self.height as i16 - text_height as i16) / 4; // Smaller top margin
+            let text_y = top_margin + self.font.ascent();
 
             self.font_draw
                 .draw_text(&self.font, scheme.foreground, x_position + 5, text_y, tag);
 
             if is_selected {
                 let underline_height = 3;
-                let gap_above_underline = 3;
-                let underline_y =
-                    self.height as i16 - underline_height as i16 - gap_above_underline;
+                let bottom_margin = 4;
+                let underline_y = self.height as i16 - underline_height as i16 - bottom_margin;
+
                 connection.change_gc(
                     self.graphics_context,
                     &ChangeGCAux::new().foreground(scheme.border),