Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
-
b1212a85
by wurstsalat at 2022-10-13T18:10:17+02:00
4 changed files:
- gajim/data/style/gajim.css
- gajim/gtk/app_side_bar.py
- gajim/gtk/main.py
- gajim/gtk/workspace_side_bar.py
Changes:
| ... | ... | @@ -187,10 +187,14 @@ .chatlist-left-grid { |
| 187 | 187 | background: @theme_bg_color;
|
| 188 | 188 | }
|
| 189 | 189 | |
| 190 | -.app-sidebar-image {
|
|
| 190 | +.app-sidebar-row {
|
|
| 191 | + margin: 2px 0 2px 2px;
|
|
| 192 | +}
|
|
| 193 | +.app-sidebar-row image {
|
|
| 191 | 194 | background: @unfocused_borders;
|
| 192 | 195 | padding: 4px;
|
| 193 | 196 | }
|
| 197 | + |
|
| 194 | 198 | .app-page-box {
|
| 195 | 199 | margin-top: 3px;
|
| 196 | 200 | }
|
| ... | ... | @@ -236,8 +240,8 @@ .workspace-sidebar-item:hover .selection-bar { |
| 236 | 240 | background-color: @theme_selected_bg_color;
|
| 237 | 241 | }
|
| 238 | 242 | .workspace-sidebar-item image {
|
| 239 | - border-radius: 9px;
|
|
| 240 | - margin: 6px;
|
|
| 243 | + border-radius: 9px;
|
|
| 244 | + margin: 4px 0 4px 4px;
|
|
| 241 | 245 | }
|
| 242 | 246 | .workspace-add:hover,
|
| 243 | 247 | .workspace-add:focus {
|
| ... | ... | @@ -248,6 +252,9 @@ .workspace-add:focus { |
| 248 | 252 | .workspace-add button {
|
| 249 | 253 | margin: 6px 8px 6px 14px;
|
| 250 | 254 | }
|
| 255 | +.workspace-avatar {
|
|
| 256 | + border: 2px solid transparent;
|
|
| 257 | +}
|
|
| 251 | 258 | |
| 252 | 259 | /* Account sidebar */
|
| 253 | 260 | .account-sidebar {
|
| ... | ... | @@ -824,12 +831,22 @@ .dnd-target { |
| 824 | 831 | animation-duration: 2.0s;
|
| 825 | 832 | animation-timing-function: ease-in-out;
|
| 826 | 833 | animation-iteration-count: infinite;
|
| 834 | +}
|
|
| 835 | +.dnd-target .workspace-avatar {
|
|
| 836 | + border: 2px dashed @theme_selected_bg_color;
|
|
| 837 | +}
|
|
| 838 | + |
|
| 839 | +.dnd-target-chatlist {
|
|
| 840 | + animation-name: pulse-opacity;
|
|
| 841 | + animation-duration: 2.0s;
|
|
| 842 | + animation-timing-function: ease-in-out;
|
|
| 843 | + animation-iteration-count: infinite;
|
|
| 827 | 844 | border: 2px dashed @theme_selected_bg_color;
|
| 828 | 845 | }
|
| 829 | 846 | |
| 830 | 847 | @keyframes pulse-opacity {
|
| 831 | 848 | 0% { opacity: 1.0; }
|
| 832 | - 20% { opacity: 0.5; }
|
|
| 849 | + 20% { opacity: 0.7; }
|
|
| 833 | 850 | 45% { opacity: 1.0; }
|
| 834 | 851 | }
|
| 835 | 852 | .pulse-opacity {
|
| ... | ... | @@ -54,6 +54,7 @@ class AppRow(Gtk.ListBoxRow): |
| 54 | 54 | def __init__(self) -> None:
|
| 55 | 55 | Gtk.ListBoxRow.__init__(self)
|
| 56 | 56 | self.get_style_context().add_class('workspace-sidebar-item')
|
| 57 | + self.get_style_context().add_class('app-sidebar-row')
|
|
| 57 | 58 | |
| 58 | 59 | self._unread_label = Gtk.Label()
|
| 59 | 60 | self._unread_label.get_style_context().add_class(
|
| ... | ... | @@ -64,7 +65,6 @@ def __init__(self) -> None: |
| 64 | 65 | |
| 65 | 66 | surface = load_icon_surface('org.gajim.Gajim', 32)
|
| 66 | 67 | image = Gtk.Image.new_from_surface(surface)
|
| 67 | - image.get_style_context().add_class('app-sidebar-image')
|
|
| 68 | 68 | |
| 69 | 69 | selection_bar = Gtk.Box()
|
| 70 | 70 | selection_bar.set_size_request(6, -1)
|
| ... | ... | @@ -568,8 +568,6 @@ def is_chat_active(self, account: str, jid: JID) -> bool: |
| 568 | 568 | return self._chat_page.is_chat_selected(account, jid)
|
| 569 | 569 | |
| 570 | 570 | def highlight_dnd_targets(self, drag_row: Any, highlight: bool) -> None:
|
| 571 | - css_class = 'dnd-target'
|
|
| 572 | - |
|
| 573 | 571 | if isinstance(drag_row, ChatListRow):
|
| 574 | 572 | chat_list_stack = self._chat_page.get_chat_list_stack()
|
| 575 | 573 | workspace = self.get_active_workspace()
|
| ... | ... | @@ -583,15 +581,18 @@ def highlight_dnd_targets(self, drag_row: Any, highlight: bool) -> None: |
| 583 | 581 | continue
|
| 584 | 582 | |
| 585 | 583 | if highlight:
|
| 586 | - row.get_style_context().add_class(css_class)
|
|
| 584 | + row.get_style_context().add_class(
|
|
| 585 | + 'dnd-target-chatlist')
|
|
| 587 | 586 | else:
|
| 588 | - row.get_style_context().remove_class(css_class)
|
|
| 587 | + row.get_style_context().remove_class(
|
|
| 588 | + 'dnd-target-chatlist')
|
|
| 589 | 589 | |
| 590 | 590 | if highlight:
|
| 591 | - self._workspace_side_bar.get_style_context().add_class(css_class)
|
|
| 591 | + self._workspace_side_bar.get_style_context().add_class(
|
|
| 592 | + 'dnd-target')
|
|
| 592 | 593 | else:
|
| 593 | 594 | self._workspace_side_bar.get_style_context().remove_class(
|
| 594 | - css_class)
|
|
| 595 | + 'dnd-target')
|
|
| 595 | 596 | |
| 596 | 597 | def _add_workspace(self,
|
| 597 | 598 | _action: Gio.SimpleAction,
|
| ... | ... | @@ -404,6 +404,7 @@ class WorkspaceAvatar(Gtk.Image): |
| 404 | 404 | def __init__(self, workspace_id: str) -> None:
|
| 405 | 405 | Gtk.Image.__init__(self)
|
| 406 | 406 | self._workspace_id = workspace_id
|
| 407 | + self.get_style_context().add_class('workspace-avatar')
|
|
| 407 | 408 | self.update()
|
| 408 | 409 | |
| 409 | 410 | def update(self) -> None:
|