From f44cbe02c17df1f02ad49c63cd784fec0ea02d85 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sat, 14 May 2022 14:45:59 +0200 Subject: Improve Gtk4 port --- main/src/ui/conversation_titlebar/call_entry.vala | 1 - .../ui/conversation_titlebar/conversation_titlebar.vala | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'main/src/ui/conversation_titlebar') diff --git a/main/src/ui/conversation_titlebar/call_entry.vala b/main/src/ui/conversation_titlebar/call_entry.vala index 72376126..0a658b10 100644 --- a/main/src/ui/conversation_titlebar/call_entry.vala +++ b/main/src/ui/conversation_titlebar/call_entry.vala @@ -73,7 +73,6 @@ namespace Dino.Ui { } public new void set_conversation(Conversation conversation) { - print(@"set_conversation $(conversation.counterpart)\n"); this.conversation = conversation; update_visibility.begin(); diff --git a/main/src/ui/conversation_titlebar/conversation_titlebar.vala b/main/src/ui/conversation_titlebar/conversation_titlebar.vala index 0d13e48b..26fd9639 100644 --- a/main/src/ui/conversation_titlebar/conversation_titlebar.vala +++ b/main/src/ui/conversation_titlebar/conversation_titlebar.vala @@ -31,27 +31,27 @@ public class ConversationTitlebarNoCsd : ConversationTitlebar, Object { } } - private Box widgets_box = new Box(Orientation.HORIZONTAL, 0) { margin_start=15, valign=Align.END, visible=true }; - private Label title_label = new Label("") { ellipsize=EllipsizeMode.END, visible=true }; + private Box widgets_box = new Box(Orientation.HORIZONTAL, 7) { margin_start=15, valign=Align.END }; + private Label title_label = new Label("") { ellipsize=EllipsizeMode.END }; private Label subtitle_label = new Label("") { use_markup=true, ellipsize=EllipsizeMode.END, visible=false }; construct { - Box content_box = new Box(Orientation.HORIZONTAL, 0) { margin_start=15, margin_end=10, hexpand=true, visible=true }; + Box content_box = new Box(Orientation.HORIZONTAL, 0) { margin_start=15, margin_end=10, hexpand=true }; main.append(content_box); - Box titles_box = new Box(Orientation.VERTICAL, 0) { valign=Align.CENTER, hexpand=true, visible=true }; + Box titles_box = new Box(Orientation.VERTICAL, 0) { valign=Align.CENTER, hexpand=true }; content_box.append(titles_box); titles_box.append(title_label); subtitle_label.attributes = new AttrList(); - subtitle_label.get_style_context().add_class("dim-label"); + subtitle_label.add_css_class("dim-label"); titles_box.append(subtitle_label); content_box.append(widgets_box); } public ConversationTitlebarNoCsd() { - main.get_style_context().add_class("dino-header-right"); + main.add_css_class("dino-header-right"); } public void insert_button(Widget button) { @@ -79,7 +79,7 @@ public class ConversationTitlebarCsd : ConversationTitlebar, Object { titles_box.append(title_label); subtitle_label.attributes = new AttrList(); subtitle_label.attributes.insert(Pango.attr_scale_new(Pango.Scale.SMALL)); - subtitle_label.get_style_context().add_class("dim-label"); + subtitle_label.add_css_class("dim-label"); titles_box.append(subtitle_label); header_bar.set_title_widget(titles_box); -- cgit v1.2.3-54-g00ecf