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