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

WorkspaceSidebar: Improve add button

parent a2ba01d5
No related branches found
No related tags found
No related merge requests found
......@@ -171,18 +171,14 @@ .workspace-sidebar-item.drag-hover-top {
.workspace-sidebar-item.drag-hover-bottom {
border-bottom: 1px solid #4e9a06;
}
.workspace-add {
padding: 0 0 0 6px;
margin: 6px 12px;
}
.workspace-add image {
margin: 0px;
padding: 0px;
color: alpha(@theme_text_color, 0.7);
background-color: shade(@theme_base_color, 0.9);
.workspace-add:hover,
.workspace-add:focus {
background: transparent;
box-shadow: none;
outline: none;
}
.workspace-add:hover image {
background-color: shade(@theme_base_color, 0.85);
.workspace-add button {
margin: 6px 8px 6px 14px;
}
/* Account sidebar */
......
......@@ -206,14 +206,13 @@ def update_avatar(self, workspace_id):
class CommonWorkspace(Gtk.ListBoxRow):
def __init__(self, workspace_id):
Gtk.ListBoxRow.__init__(self)
self.get_style_context().add_class('workspace-sidebar-item')
self.workspace_id = workspace_id
class Workspace(CommonWorkspace):
def __init__(self, workspace_id):
CommonWorkspace.__init__(self, workspace_id)
self.get_style_context().add_class('workspace-sidebar-item')
self._unread_label = Gtk.Label()
self._unread_label.get_style_context().add_class(
......@@ -286,12 +285,16 @@ def __init__(self, workspace_id):
self.set_selectable(False)
self.set_tooltip_text(_('Add Workspace'))
self.get_style_context().add_class('workspace-add')
image = Gtk.Image.new_from_icon_name('list-add-symbolic',
Gtk.IconSize.DND)
self.add(image)
button = Gtk.Button.new_from_icon_name('list-add-symbolic',
Gtk.IconSize.BUTTON)
button.connect('clicked', self._on_add_clicked)
self.add(button)
self.show_all()
@staticmethod
def _on_add_clicked(_button):
open_window('WorkspaceDialog')
class WorkspaceAvatar(Gtk.Image):
def __init__(self, workspace_id):
......
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