Bump charge-segment size now that its CSS rule actually applies
The previous 20px min-width/height looked like a regression (smaller than before) once the button.<class> selector fix actually started taking effect: before that fix, the rule was being silently ignored entirely and the theme's own (bigger) default button min-size was what users were actually seeing by accident. Now that the rule genuinely applies, bumped to 28px, verified directly against the real allocated widget size (28x28), not just the requested CSS value.
This commit is contained in:
parent
3b209e743e
commit
bcfa995417
@ -277,6 +277,10 @@ class MainWindow(Adw.ApplicationWindow):
|
|||||||
self.cursor_label = Gtk.Label(xalign=1)
|
self.cursor_label = Gtk.Label(xalign=1)
|
||||||
self.cursor_label.add_css_class("dim-label")
|
self.cursor_label.add_css_class("dim-label")
|
||||||
self.cursor_label.add_css_class("numeric")
|
self.cursor_label.add_css_class("numeric")
|
||||||
|
# Monospace so the constantly-changing digits (azimuth/distance/
|
||||||
|
# coord under the cursor) don't jitter the label's width on every
|
||||||
|
# mouse-move redraw the way a proportional font would.
|
||||||
|
self.cursor_label.add_css_class("monospace")
|
||||||
header.pack_end(self.cursor_label) # packed after firing_btn -> sits to its left
|
header.pack_end(self.cursor_label) # packed after firing_btn -> sits to its left
|
||||||
|
|
||||||
self.canvas = GridCanvas(self.board)
|
self.canvas = GridCanvas(self.board)
|
||||||
|
|||||||
@ -64,8 +64,8 @@ def _ensure_charge_segment_css() -> None:
|
|||||||
provider = Gtk.CssProvider()
|
provider = Gtk.CssProvider()
|
||||||
provider.load_from_string(f"""
|
provider.load_from_string(f"""
|
||||||
button.{_CHARGE_SEG_CSS_CLASS} {{
|
button.{_CHARGE_SEG_CSS_CLASS} {{
|
||||||
min-width: 20px;
|
min-width: 28px;
|
||||||
min-height: 20px;
|
min-height: 28px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border-radius: 9999px;
|
border-radius: 9999px;
|
||||||
}}
|
}}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user