aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-08-21 23:21:13 +0200
committerMarvin W <git@larma.de>2017-08-22 00:24:39 +0200
commita24e88f48b9a16239ff91a3ce7b4a70bd2d84fee (patch)
tree156ba4cb6c3ba6d437ee8f0078017e906129482d
parentdff8e08669996936cb58884c71b5ecd6ad7b1f76 (diff)
downloaddino-a24e88f48b9a16239ff91a3ce7b4a70bd2d84fee.tar.gz
dino-a24e88f48b9a16239ff91a3ce7b4a70bd2d84fee.zip
Fix some UI issues
-rw-r--r--main/src/ui/conversation_summary/merged_message_item.vala2
-rw-r--r--main/src/ui/conversation_summary/message_textview.vala6
-rw-r--r--main/src/ui/conversation_summary/view.vala1
-rw-r--r--main/src/ui/unified_window.vala8
-rw-r--r--xmpp-vala/src/core/xmpp_log.vala2
5 files changed, 13 insertions, 6 deletions
diff --git a/main/src/ui/conversation_summary/merged_message_item.vala b/main/src/ui/conversation_summary/merged_message_item.vala
index fa87ec59..6c1166d1 100644
--- a/main/src/ui/conversation_summary/merged_message_item.vala
+++ b/main/src/ui/conversation_summary/merged_message_item.vala
@@ -9,7 +9,7 @@ namespace Dino.Ui.ConversationSummary {
public class MergedMessageItem : MessageItem {
- private Label name_label = new Label("") { xalign=0, visible=true };
+ private Label name_label = new Label("") { xalign=0, visible=true, hexpand=true };
private MessageTextView textview = new MessageTextView() { visible=true };
public MergedMessageItem(StreamInteractor stream_interactor, Conversation conversation, Message message) {
diff --git a/main/src/ui/conversation_summary/message_textview.vala b/main/src/ui/conversation_summary/message_textview.vala
index 28df9a53..80759207 100644
--- a/main/src/ui/conversation_summary/message_textview.vala
+++ b/main/src/ui/conversation_summary/message_textview.vala
@@ -21,6 +21,12 @@ public class MessageTextView : TextView {
style_updated.connect(update_display_style);
}
+ // Workaround GTK TextView issues
+ public override void get_preferred_width (out int minimum_width, out int natural_width) {
+ base.get_preferred_width(out minimum_width, out natural_width);
+ minimum_width = 0;
+ }
+
public void add_text(string text) {
TextIter end;
buffer.get_end_iter(out end);
diff --git a/main/src/ui/conversation_summary/view.vala b/main/src/ui/conversation_summary/view.vala
index fdd6029c..c0cf772d 100644
--- a/main/src/ui/conversation_summary/view.vala
+++ b/main/src/ui/conversation_summary/view.vala
@@ -199,6 +199,7 @@ public class View : Box {
}
}
+ // Workaround GTK TextView issues
private void force_alloc_width(Widget widget, int width) {
Allocation alloc = Allocation();
widget.get_preferred_width(out alloc.width, null);
diff --git a/main/src/ui/unified_window.vala b/main/src/ui/unified_window.vala
index c0a74731..1ae13245 100644
--- a/main/src/ui/unified_window.vala
+++ b/main/src/ui/unified_window.vala
@@ -78,15 +78,15 @@ public class UnifiedWindow : Window {
grid.add(chat_input);
paned.set_position(300);
- paned.add1(filterable_conversation_list);
- paned.add2(grid);
+ paned.pack1(filterable_conversation_list, false, false);
+ paned.pack2(grid, true, false);
}
private void setup_headerbar() {
conversation_titlebar = new ConversationTitlebar(stream_interactor, this) { visible=true };
conversation_list_titlebar = new ConversationListTitlebar(stream_interactor, this) { visible=true };
- headerbar_paned.add1(conversation_list_titlebar);
- headerbar_paned.add2(conversation_titlebar);
+ headerbar_paned.pack1(conversation_list_titlebar, false, false);
+ headerbar_paned.pack2(conversation_titlebar, true, false);
// Distribute start/end decoration_layout buttons to left/right headerbar. Ensure app menu fallback.
Gtk.Settings? gtk_settings = Gtk.Settings.get_default();
diff --git a/xmpp-vala/src/core/xmpp_log.vala b/xmpp-vala/src/core/xmpp_log.vala
index 7cfbf92f..77fedd03 100644
--- a/xmpp-vala/src/core/xmpp_log.vala
+++ b/xmpp-vala/src/core/xmpp_log.vala
@@ -33,7 +33,7 @@ public class XmppLog {
}
if (d.contains(":") && d.index_of("{") == 0 && d.index_of("}") != -1) {
int end = d.index_of("}");
- this.ns_uri = d.substring(1, end - 2);
+ this.ns_uri = d.substring(1, end - 1);
d = d.substring(end + 2);
}
if (d.contains(".")) {