Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits:
-
b0958ff7
by wurstsalat at 2021-05-02T13:15:58+02:00
2 changed files:
Changes:
| ... | ... | @@ -171,18 +171,14 @@ |
| 171 | 171 |
.workspace-sidebar-item.drag-hover-bottom {
|
| 172 | 172 |
border-bottom: 1px solid #4e9a06;
|
| 173 | 173 |
}
|
| 174 |
-.workspace-add {
|
|
| 175 |
- padding: 0 0 0 6px;
|
|
| 176 |
- margin: 6px 12px;
|
|
| 177 |
-}
|
|
| 178 |
-.workspace-add image {
|
|
| 179 |
- margin: 0px;
|
|
| 180 |
- padding: 0px;
|
|
| 181 |
- color: alpha(@theme_text_color, 0.7);
|
|
| 182 |
- background-color: shade(@theme_base_color, 0.9);
|
|
| 174 |
+.workspace-add:hover,
|
|
| 175 |
+.workspace-add:focus {
|
|
| 176 |
+ background: transparent;
|
|
| 177 |
+ box-shadow: none;
|
|
| 178 |
+ outline: none;
|
|
| 183 | 179 |
}
|
| 184 |
-.workspace-add:hover image {
|
|
| 185 |
- background-color: shade(@theme_base_color, 0.85);
|
|
| 180 |
+.workspace-add button {
|
|
| 181 |
+ margin: 6px 8px 6px 14px;
|
|
| 186 | 182 |
}
|
| 187 | 183 |
|
| 188 | 184 |
/* Account sidebar */
|
| ... | ... | @@ -206,14 +206,13 @@ def update_avatar(self, workspace_id): |
| 206 | 206 |
class CommonWorkspace(Gtk.ListBoxRow):
|
| 207 | 207 |
def __init__(self, workspace_id):
|
| 208 | 208 |
Gtk.ListBoxRow.__init__(self)
|
| 209 |
- self.get_style_context().add_class('workspace-sidebar-item')
|
|
| 210 |
- |
|
| 211 | 209 |
self.workspace_id = workspace_id
|
| 212 | 210 |
|
| 213 | 211 |
|
| 214 | 212 |
class Workspace(CommonWorkspace):
|
| 215 | 213 |
def __init__(self, workspace_id):
|
| 216 | 214 |
CommonWorkspace.__init__(self, workspace_id)
|
| 215 |
+ self.get_style_context().add_class('workspace-sidebar-item')
|
|
| 217 | 216 |
|
| 218 | 217 |
self._unread_label = Gtk.Label()
|
| 219 | 218 |
self._unread_label.get_style_context().add_class(
|
| ... | ... | @@ -286,12 +285,16 @@ def __init__(self, workspace_id): |
| 286 | 285 |
self.set_selectable(False)
|
| 287 | 286 |
self.set_tooltip_text(_('Add Workspace'))
|
| 288 | 287 |
self.get_style_context().add_class('workspace-add')
|
| 289 |
- |
|
| 290 |
- image = Gtk.Image.new_from_icon_name('list-add-symbolic',
|
|
| 291 |
- Gtk.IconSize.DND)
|
|
| 292 |
- self.add(image)
|
|
| 288 |
+ button = Gtk.Button.new_from_icon_name('list-add-symbolic',
|
|
| 289 |
+ Gtk.IconSize.BUTTON)
|
|
| 290 |
+ button.connect('clicked', self._on_add_clicked)
|
|
| 291 |
+ self.add(button)
|
|
| 293 | 292 |
self.show_all()
|
| 294 | 293 |
|
| 294 |
+ @staticmethod
|
|
| 295 |
+ def _on_add_clicked(_button):
|
|
| 296 |
+ open_window('WorkspaceDialog')
|
|
| 297 |
+ |
|
| 295 | 298 |
|
| 296 | 299 |
class WorkspaceAvatar(Gtk.Image):
|
| 297 | 300 |
def __init__(self, workspace_id):
|