diff options
author | Marvin W <git@larma.de> | 2023-01-08 21:40:09 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2023-01-24 19:21:25 +0100 |
commit | 99d9cb383abb1a33f6d0572deb4292dbf358f3ce (patch) | |
tree | 187b30814b296d8d3e0613b300565cdd10d41927 /main/src/ui/conversation_content_view | |
parent | 6a182ba313026b93d54a9d2246a0ab68894c6833 (diff) | |
download | dino-99d9cb383abb1a33f6d0572deb4292dbf358f3ce.tar.gz dino-99d9cb383abb1a33f6d0572deb4292dbf358f3ce.zip |
Small UI fixes for libAdwaita
Diffstat (limited to 'main/src/ui/conversation_content_view')
-rw-r--r-- | main/src/ui/conversation_content_view/conversation_view.vala | 3 | ||||
-rw-r--r-- | main/src/ui/conversation_content_view/reactions_widget.vala | 11 |
2 files changed, 8 insertions, 6 deletions
diff --git a/main/src/ui/conversation_content_view/conversation_view.vala b/main/src/ui/conversation_content_view/conversation_view.vala index 70115512..5481cfc5 100644 --- a/main/src/ui/conversation_content_view/conversation_view.vala +++ b/main/src/ui/conversation_content_view/conversation_view.vala @@ -9,6 +9,7 @@ namespace Dino.Ui.ConversationSummary { [GtkTemplate (ui = "/im/dino/Dino/conversation_content_view/view.ui")] public class ConversationView : Widget, Plugins.ConversationItemCollection, Plugins.NotificationCollection { + private const int MESSAGE_MENU_BOX_OFFSET = -20; public Conversation? conversation { get; private set; } @@ -173,7 +174,7 @@ public class ConversationView : Widget, Plugins.ConversationItemCollection, Plug currently_highlighted.add_css_class("highlight"); // Move message menu - message_menu_box.margin_top = (int)(widget_y - 10); + message_menu_box.margin_top = (int)(widget_y + MESSAGE_MENU_BOX_OFFSET); } } diff --git a/main/src/ui/conversation_content_view/reactions_widget.vala b/main/src/ui/conversation_content_view/reactions_widget.vala index 890c1206..fe465676 100644 --- a/main/src/ui/conversation_content_view/reactions_widget.vala +++ b/main/src/ui/conversation_content_view/reactions_widget.vala @@ -123,9 +123,10 @@ public class ReactionsWidget : Grid { public ReactionsWidget() { this.row_spacing = this.column_spacing = 5; this.margin_top = 2; + this.add_css_class("reaction-grid"); add_button = new MenuButton() { tooltip_text= _("Add reaction") }; - add_button.get_style_context().add_class("reaction-box"); + add_button.add_css_class("pill"); Util.menu_button_set_icon_with_size(add_button, "dino-emoticon-add-symbolic", 14); EmojiChooser chooser = new EmojiChooser(); @@ -140,8 +141,8 @@ public class ReactionsWidget : Grid { Label reaction_label = new Label("<span size='small'>" + reaction + "</span>") { use_markup=true }; Label count_label = new Label("") { use_markup=true }; Button button = new Button(); - button.get_style_context().add_class("reaction-box"); - Box reaction_box = new Box(Orientation.HORIZONTAL, 4); + button.add_css_class("pill"); + Box reaction_box = new Box(Orientation.HORIZONTAL, 4) { halign=Align.CENTER }; reaction_box.append(reaction_label); reaction_box.append(count_label); button.set_child(reaction_box); @@ -161,9 +162,9 @@ public class ReactionsWidget : Grid { reaction_counts[reaction].label = "<span font_family='monospace' size='small'>" + count.to_string() + "</span>"; if (own) { - reaction_buttons[reaction].get_style_context().add_class("own-reaction"); + reaction_buttons[reaction].add_css_class("own-reaction"); } else { - reaction_buttons[reaction].get_style_context().remove_class("own-reaction"); + reaction_buttons[reaction].remove_css_class("own-reaction"); } // Build tooltip |