diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-10-26 12:59:38 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-10-26 12:59:42 +0200 |
commit | 2856dd4378a62abf4f0b9ef1939ae95acf9c42d7 (patch) | |
tree | 4ebf48e35a915b3719ee56b12f6c0d9e3017f28f | |
parent | 616fb291ee1f62202affbec3a043f741c2c2469c (diff) |
Fix line wrap for messages
-rw-r--r-- | src/ChatMessage.cpp | 1 | ||||
-rw-r--r-- | src/ChatWindow.cpp | 1 | ||||
-rw-r--r-- | src/Window.cpp | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/ChatMessage.cpp b/src/ChatMessage.cpp index 6dbd671..048bfca 100644 --- a/src/ChatMessage.cpp +++ b/src/ChatMessage.cpp @@ -12,6 +12,7 @@ namespace dchat text.set_selectable(true); text.set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_START); + text.set_line_wrap(true); text.set_line_wrap_mode(Pango::WRAP_WORD_CHAR); text.get_style_context()->add_class("chat-message-text"); diff --git a/src/ChatWindow.cpp b/src/ChatWindow.cpp index 70dd734..4d513e4 100644 --- a/src/ChatWindow.cpp +++ b/src/ChatWindow.cpp @@ -80,6 +80,7 @@ namespace dchat void ChatWindow::setupMessageArea(Gtk::Grid *rightPanel) { chatArea.set_vexpand(true); + chatArea.set_policy(Gtk::PolicyType::POLICY_NEVER, Gtk::PolicyType::POLICY_AUTOMATIC) rightPanel->attach(chatArea, 0, 0, 1, 2); chatAreaLayout.set_name("chat-area-layout"); diff --git a/src/Window.cpp b/src/Window.cpp index 5f27000..6493b2d 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -9,6 +9,8 @@ namespace dchat set_border_width(0); add(stack); + stack.set_transition_type(Gtk::StackTransitionType::STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT); + stack.set_transition_duration(250); stack.add(loginWindow, "login"); stack.add(chatWindow, "chat"); |