Daniel Brötzmann pushed to branch master at gajim / gajim
Commits: 0a5e2a79 by wurstsalat at 2022-11-07T16:38:59+01:00 cq: CSS: Simplify some rules
- - - - -
7 changed files:
- gajim/data/gui/preview.ui - gajim/data/style/gajim.css - gajim/gtk/accounts.py - gajim/gtk/contact_settings.py - gajim/gtk/groupchat_settings.py - gajim/gtk/preferences.py - gajim/gtk/preview_audio.py
Changes:
===================================== gajim/data/gui/preview.ui ===================================== @@ -99,7 +99,7 @@ </object> </child> <style> - <class name="preview-button"/> + <class name="border"/> <class name="flat"/> </style> </object> @@ -203,7 +203,7 @@ </object> </child> <style> - <class name="preview-button"/> + <class name="border"/> <class name="flat"/> </style> </object> @@ -237,7 +237,7 @@ </object> </child> <style> - <class name="preview-button"/> + <class name="border"/> <class name="flat"/> </style> </object> @@ -271,7 +271,7 @@ </object> </child> <style> - <class name="preview-button"/> + <class name="border"/> <class name="flat"/> </style> </object>
===================================== gajim/data/style/gajim.css ===================================== @@ -637,9 +637,6 @@ .preview-image-button:hover { text-shadow: none; box-shadow: none; } -.preview-button { - border: 1px solid @borders; -}
/* Conversation meta elements */ .conversation-meta { @@ -760,16 +757,22 @@ .emoji-modifier-chooser-flowbox { padding-left: 5px; } /* Settings widgets ======================================================== */
/* SettingsBox */ -.settings-box > row { border-bottom: 1px solid; border-color: @theme_unfocused_bg_color; } +.settings-box > row { + border-bottom: 1px solid @theme_unfocused_bg_color; +} .settings-box > row:last-child { border-bottom: 0px; } .settings-box > row.activatable:active { box-shadow: none; } .settings-box > row { padding: 10px 20px 10px 10px; } .settings-box > row:not(.activatable) label { color: @insensitive_fg_color; }
+.settings-stack > box, +.settings-stack viewport > box { + margin: 30px 25px; +} + window.settings-dialog row { border-bottom: 0px; } - window.settings-dialog list { background: transparent; margin: 12px; @@ -788,10 +791,10 @@ .PopoverButtonListbox > list > row.activatable:active { box-shadow: none; backgr
/* Settings ListBox */ list.settings { - border: @borders 1px solid; + border: 1px solid @borders; } list.settings > row:not(:last-child) { - border-bottom: @theme_unfocused_bg_color 1px solid; + border-bottom: 1px solid @theme_unfocused_bg_color; } list.settings row { min-height: 52px; } list.settings > row > box { @@ -829,17 +832,6 @@ popover.combo scrollbar.vertical { padding-bottom: 2px; }
-.settings-stack viewport > box { - margin-left: 30px; - margin-right: 30px; - margin-bottom: 10px; - margin-top: 25px; -} -.settings-border { - border: 1px solid; - border-color: @borders; -} - /* Dialogs ================================================================= */
/* ProfileWindow */ @@ -926,9 +918,13 @@ #FeaturesInfoGrid > list > row.activatable:active { box-shadow: none; } #SendFileDialog grid list > row { padding: 10px 20px 10px 10px; }
/* AccountsWindow */ -.accounts-menu { border-right: 1px solid; border-color: @borders;} -.accounts-settings-border {border: 1px solid; border-color: @borders;} -.accounts-settings stack > box.settings-page { margin: 30px; } +.accounts-menu { + border-right: 1px solid @borders; +} +.accounts-menu-listbox > row { + border-bottom: 1px solid @theme_unfocused_bg_color; + padding: 10px 20px 10px 10px; +} .accounts-label-row { padding-top: 10px; padding-bottom: 10px;
===================================== gajim/gtk/accounts.py ===================================== @@ -186,8 +186,8 @@ def __init__(self): self.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) self._stack = Gtk.Stack(vhomogeneous=False) self._stack.set_transition_type(Gtk.StackTransitionType.CROSSFADE) + self._stack.get_style_context().add_class('settings-stack') self._stack.add_named(AddNewAccountPage(), 'add-account') - self.get_style_context().add_class('accounts-settings')
self.add(self._stack) self._page_signal_ids: dict[GenericSettingPage, int] = {} @@ -236,7 +236,8 @@ def __init__(self) -> None:
self._accounts_listbox = Gtk.ListBox() self._accounts_listbox.set_sort_func(self._sort_func) - self._accounts_listbox.get_style_context().add_class('settings-box') + self._accounts_listbox.get_style_context().add_class( + 'accounts-menu-listbox') self._accounts_listbox.connect('row-activated', self._on_account_row_activated)
@@ -316,7 +317,7 @@ def __init__(self, account: str) -> None: Gtk.ListBox.__init__(self) self.set_vexpand(True) self.set_hexpand(True) - self.get_style_context().add_class('settings-box') + self.get_style_context().add_class('accounts-menu-listbox')
self._account = account
@@ -639,7 +640,7 @@ def __init__(self, account: str, settings: list[Setting]) -> None: self.account = account
self.listbox = SettingsBox(account) - self.listbox.get_style_context().add_class('accounts-settings-border') + self.listbox.get_style_context().add_class('border') self.listbox.set_selection_mode(Gtk.SelectionMode.NONE) self.listbox.set_vexpand(False) self.listbox.set_valign(Gtk.Align.END)
===================================== gajim/gtk/contact_settings.py ===================================== @@ -27,7 +27,7 @@ class ContactSettings(SettingsBox): def __init__(self, account: str, jid: JID) -> None: SettingsBox.__init__(self, account, str(jid)) - self.get_style_context().add_class('settings-border') + self.get_style_context().add_class('border') self.set_selection_mode(Gtk.SelectionMode.NONE) self.set_size_request(700, -1) self.set_valign(Gtk.Align.START)
===================================== gajim/gtk/groupchat_settings.py ===================================== @@ -27,7 +27,7 @@ class GroupChatSettings(SettingsBox): def __init__(self, account: str, jid: JID) -> None: SettingsBox.__init__(self, account, str(jid)) - self.get_style_context().add_class('settings-border') + self.get_style_context().add_class('border') self.set_selection_mode(Gtk.SelectionMode.NONE) self.set_size_request(700, -1) self.set_valign(Gtk.Align.START)
===================================== gajim/gtk/preferences.py ===================================== @@ -173,7 +173,7 @@ def _on_destroy(self, _widget: Gtk.Widget) -> None: class PreferenceBox(SettingsBox): def __init__(self, settings: list[Setting]) -> None: SettingsBox.__init__(self, None) - self.get_style_context().add_class('settings-border') + self.get_style_context().add_class('border') self.set_selection_mode(Gtk.SelectionMode.NONE) self.set_vexpand(False) self.set_valign(Gtk.Align.END)
===================================== gajim/gtk/preview_audio.py ===================================== @@ -55,7 +55,7 @@ def __init__(self, file_path: Path) -> None: def _build_audio_widget(self) -> None: play_button = Gtk.Button() play_button.get_style_context().add_class('flat') - play_button.get_style_context().add_class('preview-button') + play_button.get_style_context().add_class('border') play_button.set_tooltip_text(_('Start/stop playback')) self._play_icon = Gtk.Image.new_from_icon_name( 'media-playback-start-symbolic',
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/0a5e2a79f61b961bedc6720b1a3ae8b57...