aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-11-24 19:33:29 +0100
committerdec05eba <dec05eba@protonmail.com>2018-11-24 19:33:32 +0100
commitf2e658b62cf29a8c9f6934bb3a72ed89ec32c588 (patch)
treea21ff148205d1c1d3879d2133b956a92ab99c788 /src
parentb5659bf9ade976353d771d9fcd1a3f1f3c3fb663 (diff)
Change right panel style for settings
Diffstat (limited to 'src')
-rw-r--r--src/RoomSettingsWindow.cpp3
-rw-r--r--src/UserSettingsWindow.cpp11
2 files changed, 8 insertions, 6 deletions
diff --git a/src/RoomSettingsWindow.cpp b/src/RoomSettingsWindow.cpp
index f9b4998..2e3eac7 100644
--- a/src/RoomSettingsWindow.cpp
+++ b/src/RoomSettingsWindow.cpp
@@ -60,8 +60,7 @@ namespace dchat
void RoomSettingsWindow::setupRightPanel(Gtk::Paned *sidePanels)
{
Gtk::Grid *rightPanel = Gtk::manage(new Gtk::Grid());
- rightPanel->set_margin_top(10);
- rightPanel->set_margin_left(10);
+ rightPanel->get_style_context()->add_class("right-panel");
rightPanel->set_vexpand(true);
rightPanel->set_valign(Gtk::ALIGN_START);
rightPanel->set_halign(Gtk::ALIGN_START);
diff --git a/src/UserSettingsWindow.cpp b/src/UserSettingsWindow.cpp
index 6eda049..ac53f7a 100644
--- a/src/UserSettingsWindow.cpp
+++ b/src/UserSettingsWindow.cpp
@@ -65,19 +65,21 @@ namespace dchat
void UserSettingsWindow::setupRightPanel(Gtk::Paned *sidePanels)
{
Gtk::Grid *rightPanel = Gtk::manage(new Gtk::Grid());
- rightPanel->set_margin_top(10);
- rightPanel->set_margin_left(10);
+ rightPanel->get_style_context()->add_class("right-panel");
rightPanel->set_vexpand(true);
- rightPanel->set_valign(Gtk::ALIGN_START);
- rightPanel->set_halign(Gtk::ALIGN_START);
sidePanels->add2(*rightPanel);
Gtk::Label *nicknameLabel = Gtk::manage(new Gtk::Label("Nickname"));
+ nicknameLabel->set_valign(Gtk::ALIGN_START);
+ nicknameLabel->set_halign(Gtk::ALIGN_START);
rightPanel->attach(*nicknameLabel, 0, 0, 2, 1);
+ nicknameEntry.set_hexpand(true);
rightPanel->attach_next_to(nicknameEntry, *nicknameLabel, Gtk::POS_BOTTOM, 2, 1);
Gtk::Label *avatarUrlLabel = Gtk::manage(new Gtk::Label("Avatar url"));
+ avatarUrlLabel->set_halign(Gtk::ALIGN_START);
rightPanel->attach_next_to(*avatarUrlLabel, nicknameEntry, Gtk::POS_BOTTOM, 2, 1);
+ avatarUrlEntry.set_hexpand(true);
rightPanel->attach_next_to(avatarUrlEntry, *avatarUrlLabel, Gtk::POS_BOTTOM, 2, 1);
Gtk::Button *resetButton = Gtk::manage(new Gtk::Button("Rest"));
@@ -90,6 +92,7 @@ namespace dchat
});
Gtk::Button *saveButton = Gtk::manage(new Gtk::Button("Save"));
+ saveButton->set_halign(Gtk::ALIGN_END);
saveButton->get_style_context()->add_class("confirm-button");
rightPanel->attach_next_to(*saveButton, *resetButton, Gtk::POS_RIGHT, 1, 1);
saveButton->signal_clicked().connect([this]