|
|
@@ -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 |
|