mirror of
https://github.com/uowuo/abaddon.git
synced 2026-08-15 05:19:58 +00:00
try and make the input component better
This commit is contained in:
1 parent
d42e0bae90
commit
3f31d74cd8
2 files changed
+11
-5
No files matched your search
@@ -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 {
|
||||
|
||||
+5
-2
@@ -86,12 +86,15 @@
|
||||
background-color: #263238;
|
||||
}
|
||||
|
||||
.message-input, .message-input text {
|
||||
padding: 10px 20px;
|
||||
.message-input, .message-input textview, .message-input textview text {
|
||||
background-color: #37474f;
|
||||
color: #cfd8dc;
|
||||
}
|
||||
|
||||
.message-input {
|
||||
padding: 0px 0px 0px 5px;
|
||||
}
|
||||
|
||||
.members {
|
||||
background-color: #263238;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user