Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits:
fe8d5605 by wurstsalat at 2021-05-02T14:11:07+02:00
AccountSidebar: Add selection bar
- - - - -
2 changed files:
- gajim/data/style/gajim.css
- gajim/gtk/account_side_bar.py
Changes:
=====================================
gajim/data/style/gajim.css
=====================================
@@ -121,8 +121,6 @@
.selection-bar {
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
- margin-top: 6px;
- margin-bottom: 6px;
}
.small-label {
font-size: small;
@@ -155,6 +153,10 @@
box-shadow: none;
outline: none;
}
+.workspace-sidebar-item .selection-bar {
+ margin-top: 6px;
+ margin-bottom: 6px;
+}
.workspace-sidebar-item:selected .selection-bar {
background-color: lighter(@theme_selected_bg_color);
}
@@ -184,7 +186,6 @@
/* Account sidebar */
.account-sidebar {
background: transparent;
- margin-right: 6px;
margin-bottom: 6px;
}
.account-sidebar-item {
@@ -198,9 +199,15 @@
box-shadow: none;
outline: none;
}
-.account-sidebar-item:selected image,
-.account-sidebar-item:hover image {
- background-color: shade(@theme_base_color, 0.8);
+.account-sidebar-item .selection-bar {
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+.account-sidebar-item:selected .selection-bar {
+ background-color: lighter(@theme_selected_bg_color);
+}
+.account-sidebar-item:hover .selection-bar {
+ background-color: @theme_selected_bg_color;
}
.account-sidebar-item image {
border-radius: 9px;
=====================================
gajim/gtk/account_side_bar.py
=====================================
@@ -60,6 +60,11 @@ def __init__(self, account):
self.account = account
self._account_class = None
+
+ selection_bar = Gtk.Box()
+ selection_bar.set_size_request(6, -1)
+ selection_bar.get_style_context().add_class('selection-bar')
+
self._image = AccountAvatar(account)
self._account_color_bar = Gtk.Box()
@@ -70,8 +75,9 @@ def __init__(self, account):
account_box = Gtk.Box(spacing=3)
account_box.set_tooltip_text(
_('Account: %s') % app.get_account_label(account))
- account_box.add(self._account_color_bar)
+ account_box.add(selection_bar)
account_box.add(self._image)
+ account_box.add(self._account_color_bar)
self._update_account_color()
self.add(account_box)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/fe8d56055a4d7cb9298a2b8311acd26a996c9abd
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/fe8d56055a4d7cb9298a2b8311acd26a996c9abd
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits