tony / oxwm

Updated bar Browse files
tonybanters committed 2025-10-03 parent 42f82ad commit 08512bf2dfee4a4f12002346177155f2672201db
Showing 2 changed files with 11 additions and 9 deletions. UnifiedSplit
+10 −8 src/bar/bar.rs
@@ -104,7 +104,6 @@ impl Bar {
104 104 if !self.needs_redraw {
105 105 return Ok(());
106 106 }
107 -
108 107 connection.change_gc(
109 108 self.graphics_context,
110 109 &ChangeGCAux::new().foreground(SCHEME_NORMAL.background),
@@ -152,7 +151,14 @@ impl Bar {
152 151 height: self.height,
153 152 }],
154 153 )?;
155 - } else if is_occupied {
154 + }
155 +
156 + let text_y = (self.height as i16 / 2) + (self.font.ascent() / 2);
157 + self.font_draw
158 + .draw_text(&self.font, scheme.foreground, x_position + 5, text_y, tag);
159 +
160 + if is_selected {
161 + let underline_height = 2;
156 162 connection.change_gc(
157 163 self.graphics_context,
158 164 &ChangeGCAux::new().foreground(scheme.border),
@@ -162,17 +168,13 @@ impl Bar {
162 168 self.graphics_context,
163 169 &[Rectangle {
164 170 x: x_position,
165 - y: 0,
171 + y: (self.height - underline_height) as i16,
166 172 width: tag_width,
167 - height: 2,
173 + height: underline_height,
168 174 }],
169 175 )?;
170 176 }
171 177
172 - let text_y = (self.height as i16 / 2) + (self.font.ascent() / 2);
173 - self.font_draw
174 - .draw_text(&self.font, scheme.foreground, x_position + 5, text_y, tag);
175 -
176 178 x_position += tag_width as i16;
177 179 }
178 180
+1 −1 src/config.rs
@@ -49,7 +49,7 @@ pub const SCHEME_SELECTED: ColorScheme = ColorScheme {
49 49 pub const SCHEME_OCCUPIED: ColorScheme = ColorScheme {
50 50 foreground: GRAY_LIGHTEST,
51 51 background: GRAY_DARK,
52 - border: GRAY_MID,
52 + border: CYAN,
53 53 };
54 54
55 55 // ========================================