From a45280f8dfe45f8908b44cd13996316af44117e9 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 11 Oct 2022 17:56:50 +0200 Subject: Reactions: Improve style --- main/data/theme.css | 7 ++++++- .../src/ui/conversation_content_view/reactions_widget.vala | 14 +++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/main/data/theme.css b/main/data/theme.css index c4bc36c3..d657e0a3 100644 --- a/main/data/theme.css +++ b/main/data/theme.css @@ -174,12 +174,17 @@ window.dino-main .multiparty-participants { /* Reactions */ +window.dino-main menubutton.reaction-box image { + margin-left: 5px; + margin-right: 5px; +} + window.dino-main button.reaction-box, window.dino-main menubutton.reaction-box > button { border: 1px solid transparent; padding: 3px 5px ; border-radius: 10px; - background-color: alpha(@theme_fg_color, 0.05); + background-color: alpha(@theme_fg_color, 0.07); background-image: none; box-shadow: none; min-height: 0; diff --git a/main/src/ui/conversation_content_view/reactions_widget.vala b/main/src/ui/conversation_content_view/reactions_widget.vala index 6e58b05f..c9f93f66 100644 --- a/main/src/ui/conversation_content_view/reactions_widget.vala +++ b/main/src/ui/conversation_content_view/reactions_widget.vala @@ -49,7 +49,7 @@ public class ReactionsController : Object { } private void initialize_widget() { - widget = new ReactionsWidget() { visible=true }; + widget = new ReactionsWidget(); widget.emoji_picked.connect((emoji) => { stream_interactor.get_module(Reactions.IDENTITY).add_reaction(conversation, content_item, emoji); }); @@ -127,7 +127,7 @@ public class ReactionsWidget : Grid { this.row_spacing = this.column_spacing = 5; this.margin_top = 2; - add_button = new MenuButton() { tooltip_text= _("Add reaction"), visible=true }; + add_button = new MenuButton() { tooltip_text= _("Add reaction") }; add_button.get_style_context().add_class("reaction-box"); Util.menu_button_set_icon_with_size(add_button, "dino-emoticon-add-symbolic", 14); @@ -140,11 +140,11 @@ public class ReactionsWidget : Grid { public void update_reaction(string reaction, int count, bool own, Gee.List names) { if (!reaction_buttons.has_key(reaction)) { - Label reaction_label = new Label("" + reaction + "") { use_markup=true, visible=true }; - Label count_label = new Label("") { use_markup=true, visible=true }; - Button button = new Button() { visible=true }; + Label reaction_label = new Label("" + reaction + "") { 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) { visible=true }; + Box reaction_box = new Box(Orientation.HORIZONTAL, 4); reaction_box.append(reaction_label); reaction_box.append(count_label); button.set_child(reaction_box); @@ -162,7 +162,7 @@ public class ReactionsWidget : Grid { }); } - reaction_counts[reaction].label = "" + count.to_string() + ""; + reaction_counts[reaction].label = "" + count.to_string() + ""; if (own) { reaction_buttons[reaction].get_style_context().add_class("own-reaction"); } else { -- cgit v1.2.3-70-g09d2