updating padding
Browse files
+4 −2 src/bar/bar.rs
| @@ -147,6 +147,8 @@ impl Bar { | ||
| 147 | 147 | let bottom_margin = 4; |
| 148 | 148 | let underline_y = self.height as i16 - underline_height as i16 - bottom_margin; |
| 149 | 149 | |
| 150 | + let text_width = self.font.text_width(tag); | |
| 151 | + | |
| 150 | 152 | connection.change_gc( |
| 151 | 153 | self.graphics_context, |
| 152 | 154 | &ChangeGCAux::new().foreground(scheme.border), |
| @@ -155,9 +157,9 @@ impl Bar { | ||
| 155 | 157 | self.window, |
| 156 | 158 | self.graphics_context, |
| 157 | 159 | &[Rectangle { |
| 158 | - x: x_position, | |
| 160 | + x: x_position + 5, | |
| 159 | 161 | y: underline_y, |
| 160 | - width: tag_width, | |
| 162 | + width: text_width, | |
| 161 | 163 | height: underline_height, |
| 162 | 164 | }], |
| 163 | 165 | )?; |