Daniel Brötzmann pushed to branch mainwindow at gajim / gajim

Commits:

2 changed files:

Changes:

  • gajim/data/style/gajim.css
    ... ... @@ -43,6 +43,12 @@
    43 43
     	border-top-right-radius: 6px;
    
    44 44
     	border-bottom-right-radius: 6px;
    
    45 45
     }
    
    46
    +.selection-bar {
    
    47
    +    border-top-right-radius: 6px;
    
    48
    +    border-bottom-right-radius: 6px;
    
    49
    +    margin-top: 6px;
    
    50
    +    margin-bottom: 6px;
    
    51
    +}
    
    46 52
     .small-label {
    
    47 53
         font-size: small;
    
    48 54
     }
    
    ... ... @@ -61,7 +67,6 @@
    61 67
     /* Workspace sidebar */
    
    62 68
     .workspace-sidebar {
    
    63 69
     	background: transparent;
    
    64
    -	margin-left: 6px;
    
    65 70
     	margin-right: 6px;
    
    66 71
     }
    
    67 72
     .workspace-sidebar-item {
    
    ... ... @@ -69,14 +74,17 @@
    69 74
     	padding-bottom: 0px;
    
    70 75
     }
    
    71 76
     .workspace-sidebar-item:selected,
    
    72
    -.workspace-sidebar-item:hover {
    
    77
    +.workspace-sidebar-item:hover,
    
    78
    +.workspace-sidebar-item:focus {
    
    73 79
     	background: transparent;
    
    74 80
     	box-shadow: none;
    
    75 81
     	outline: none;
    
    76 82
     }
    
    77
    -.workspace-sidebar-item:selected image,
    
    78
    -.workspace-sidebar-item:hover image {
    
    79
    -	box-shadow: 0 0 6px @theme_selected_bg_color;
    
    83
    +.workspace-sidebar-item:selected .selection-bar {
    
    84
    +    background-color: lighter(@theme_selected_bg_color);
    
    85
    +}
    
    86
    +.workspace-sidebar-item:hover .selection-bar {
    
    87
    +    background-color: @theme_selected_bg_color;
    
    80 88
     }
    
    81 89
     .workspace-sidebar-item image {
    
    82 90
     	border-radius: 9px;
    
    ... ... @@ -88,6 +96,13 @@
    88 96
     .workspace-sidebar-item.drag-hover-bottom {
    
    89 97
         border-bottom: 1px solid #4e9a06;
    
    90 98
     }
    
    99
    +.workspace-add {
    
    100
    +    padding-left: 6px;
    
    101
    +    color: alpha(@theme_text_color, 0.7);
    
    102
    +}
    
    103
    +.workspace-sidebar-item:hover .workspace-add {
    
    104
    +    -gtk-icon-shadow: 0 0 3px @theme_selected_bg_color;
    
    105
    +}
    
    91 106
     
    
    92 107
     /* Account sidebar */
    
    93 108
     .account-sidebar {
    

  • gajim/gtk/workspace_side_bar.py
    1 1
     
    
    2 2
     from gi.repository import Gdk
    
    3 3
     from gi.repository import Gtk
    
    4
    -from gi.repository import GLib
    
    5 4
     
    
    6 5
     from gajim.common import app
    
    7 6
     from gajim.common.const import AvatarSize
    
    ... ... @@ -206,8 +205,16 @@ def __init__(self, workspace_id):
    206 205
             self._image = WorkspaceAvatar(workspace_id)
    
    207 206
             self._image.set_halign(Gtk.Align.CENTER)
    
    208 207
     
    
    208
    +        selection_bar = Gtk.Box()
    
    209
    +        selection_bar.set_size_request(6, -1)
    
    210
    +        selection_bar.get_style_context().add_class('selection-bar')
    
    211
    +
    
    212
    +        item_box = Gtk.Box()
    
    213
    +        item_box.add(selection_bar)
    
    214
    +        item_box.add(self._image)
    
    215
    +
    
    209 216
             overlay = Gtk.Overlay()
    
    210
    -        overlay.add(self._image)
    
    217
    +        overlay.add(item_box)
    
    211 218
             overlay.add_overlay(self._unread_label)
    
    212 219
     
    
    213 220
             # Drag and Drop
    
    ... ... @@ -257,11 +264,12 @@ class AddWorkspace(CommonWorkspace):
    257 264
         def __init__(self, workspace_id):
    
    258 265
             CommonWorkspace.__init__(self, workspace_id)
    
    259 266
             self.set_selectable(False)
    
    267
    +        self.set_tooltip_text(_('Add Workspace'))
    
    260 268
     
    
    261 269
             image = Gtk.Image.new_from_icon_name('list-add-symbolic',
    
    262 270
                                                  Gtk.IconSize.DND)
    
    263 271
             image.set_halign(Gtk.Align.CENTER)
    
    264
    -        image.get_style_context().add_class('dim-label')
    
    272
    +        image.get_style_context().add_class('workspace-add')
    
    265 273
             self.add(image)
    
    266 274
             self.show_all()
    
    267 275