diff --git a/gwakeonlan/ui/base.py b/gwakeonlan/ui/base.py index 4204fb2..9aca3d0 100644 --- a/gwakeonlan/ui/base.py +++ b/gwakeonlan/ui/base.py @@ -81,3 +81,8 @@ def load_image_file(self, image: Gtk.Image) -> bool: if icon_path.is_file(): image.set_from_file(str(icon_path)) return icon_path.is_file() + + def set_buttons_style_suggested_action(self, buttons: Iterable): + """Add the suggested-action style to a widget""" + for button in buttons: + button.get_style_context().add_class('suggested-action') diff --git a/gwakeonlan/ui/main.py b/gwakeonlan/ui/main.py index 3c47f65..f91958a 100644 --- a/gwakeonlan/ui/main.py +++ b/gwakeonlan/ui/main.py @@ -100,6 +100,8 @@ def load_ui(self): # Set buttons with always show image for button in (self.ui.button_turnon, ): button.set_always_show_image(True) + self.set_buttons_style_suggested_action( + buttons=[self.ui.button_turnon]) # Set various properties self.ui.window.set_title(APP_NAME) self.ui.window.set_icon_from_file(str(FILE_ICON)) diff --git a/ui/main.ui b/ui/main.ui index 4151027..655f9b7 100644 --- a/ui/main.ui +++ b/ui/main.ui @@ -29,22 +29,6 @@ - - accelerators - - - Open the options menu - open-menu-symbolic - - - - - Open the options menu - - - - - accelerators @@ -93,6 +77,22 @@ + + accelerators + + + Open the options menu + open-menu-symbolic + + + + + Open the options menu + + + + + accelerators @@ -230,7 +230,6 @@ True True True - none 3