From bb9b0a1a556adafb115fab8a5037632266240787 Mon Sep 17 00:00:00 2001 From: Martin Wagner Date: Thu, 21 Oct 2021 09:48:44 +0200 Subject: [PATCH] simplified some css settings --- bin/mpdevil | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/bin/mpdevil b/bin/mpdevil index febf2cf..02fc246 100755 --- a/bin/mpdevil +++ b/bin/mpdevil @@ -1167,8 +1167,7 @@ class ProfileSettings(Gtk.Box): # connect button connect_button=Gtk.Button(label=_("Connect"), margin_start=18, margin_end=18, margin_bottom=18, halign=Gtk.Align.CENTER) - style_context=connect_button.get_style_context() - style_context.add_class("suggested-action") + connect_button.get_style_context().add_class("suggested-action") connect_button.connect("clicked", self._on_connect_button_clicked) # packing @@ -1219,8 +1218,7 @@ class PlaylistSettings(Gtk.Box): # toolbar toolbar=Gtk.Toolbar(icon_size=Gtk.IconSize.SMALL_TOOLBAR) - style_context=toolbar.get_style_context() - style_context.add_class("inline-toolbar") + toolbar.get_style_context().add_class("inline-toolbar") self._up_button=Gtk.ToolButton(icon_name="go-up-symbolic") self._up_button.set_sensitive(False) self._down_button=Gtk.ToolButton(icon_name="go-down-symbolic") @@ -1458,8 +1456,7 @@ class SongPopover(Gtk.Popover): open_button=Gtk.Button(image=Gtk.Image.new_from_icon_name("document-open-symbolic",Gtk.IconSize.BUTTON),tooltip_text=_("Open with…")) open_button.set_margin_bottom(6) open_button.set_margin_end(6) - style_context=open_button.get_style_context() - style_context.add_class("circular") + open_button.get_style_context().add_class("circular") # open button revealer self._open_button_revealer=Gtk.Revealer() @@ -2558,8 +2555,7 @@ class PlaylistWindow(Gtk.Overlay): ) self._back_to_current_song_button.set_margin_bottom(12) self._back_to_current_song_button.set_margin_start(12) - style_context=self._back_to_current_song_button.get_style_context() - style_context.add_class("osd") + self._back_to_current_song_button.get_style_context().add_class("osd") self._back_button_revealer=Gtk.Revealer(transition_duration=0) self._back_button_revealer.set_halign(Gtk.Align.START) self._back_button_revealer.set_valign(Gtk.Align.END) @@ -3031,8 +3027,7 @@ class CoverLyricsWindow(Gtk.Overlay): self.lyrics_button.set_can_focus(False) self.lyrics_button.set_margin_top(6) self.lyrics_button.set_margin_end(6) - style_context=self.lyrics_button.get_style_context() - style_context.add_class("circular") + self.lyrics_button.get_style_context().add_class("circular") # lyrics window self._lyrics_window=LyricsWindow(self._client, self._settings)