summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-01-08 21:50:43 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2021-01-08 21:50:43 -0500
commit3f31d74cd84143dea4c3af258fd0f8aaa201721a (patch)
tree2624b436d7a1908e5306bb33f965a2ade3759212 /components
parentd42e0bae9038bd9d632d0e9b333cec7ec635e084 (diff)
downloadabaddon-portaudio-3f31d74cd84143dea4c3af258fd0f8aaa201721a.tar.gz
abaddon-portaudio-3f31d74cd84143dea4c3af258fd0f8aaa201721a.zip
try and make the input component better
Diffstat (limited to 'components')
-rw-r--r--components/chatwindow.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/components/chatwindow.cpp b/components/chatwindow.cpp
index c337e56..2e688de 100644
--- a/components/chatwindow.cpp
+++ b/components/chatwindow.cpp
@@ -11,7 +11,7 @@ ChatWindow::ChatWindow() {
m_main->get_style_context()->add_class("messages");
m_list->get_style_context()->add_class("messages");
- m_input->get_style_context()->add_class("message-input");
+ m_input_scroll->get_style_context()->add_class("message-input");
m_input->signal_key_press_event().connect(sigc::mem_fun(*this, &ChatWindow::on_key_press_event), false);
@@ -41,10 +41,13 @@ ChatWindow::ChatWindow() {
m_input->set_hexpand(false);
m_input->set_halign(Gtk::ALIGN_FILL);
+ m_input->set_valign(Gtk::ALIGN_CENTER);
m_input->set_wrap_mode(Gtk::WRAP_WORD_CHAR);
- m_input_scroll->set_max_content_height(200);
- m_input_scroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
+ m_input_scroll->set_propagate_natural_height(true);
+ m_input_scroll->set_min_content_height(20);
+ m_input_scroll->set_max_content_height(250);
+ m_input_scroll->set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
m_completer.SetBuffer(m_input->get_buffer());
m_completer.SetGetChannelID([this]() -> auto {