Skip to content
Snippets Groups Projects
Commit 18d67fbc authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Philipp Hörist
Browse files

AccountSidebar: Add selection bar

parent 246cea28
No related branches found
No related tags found
No related merge requests found
......@@ -121,8 +121,6 @@ .account-identifier-bar {
.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 @@ .workspace-sidebar-item:focus {
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 @@ .workspace-add button {
/* Account sidebar */
.account-sidebar {
background: transparent;
margin-right: 6px;
margin-bottom: 6px;
}
.account-sidebar-item {
......@@ -198,9 +199,15 @@ .account-sidebar-item:focus {
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;
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment