Skip to content

Commit fa25e3b

Browse files
Sigma1912hansu
authored andcommitted
calculatorwidget: Restrict css style to calculator widget, change font size
1 parent b631796 commit fa25e3b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/python/gladevcp/calculatorwidget.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,10 @@ def __init__( self, *a, **kw ):
9898
# Use CSS style for buttons
9999
screen = Gdk.Screen.get_default()
100100
provider = Gtk.CssProvider()
101-
style_context = Gtk.StyleContext()
101+
self.calc_box.set_name("calc_widget")
102+
style_context = self.calc_box.get_style_context()
102103
style_context.add_provider_for_screen(screen, provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
103-
css = b"button {padding: 0;}"
104+
css = b"#calc_widget {font-size: 15px;}"
104105
provider.load_from_data(css)
105106

106107
def num_pad_only( self, value ):

0 commit comments

Comments
 (0)