diff options
-rw-r--r-- | css/style.css | 4 | ||||
-rw-r--r-- | src/RoomSettingsWindow.cpp | 3 | ||||
-rw-r--r-- | src/UserSettingsWindow.cpp | 11 |
3 files changed, 12 insertions, 6 deletions
diff --git a/css/style.css b/css/style.css index 276315e..a75dce4 100644 --- a/css/style.css +++ b/css/style.css @@ -197,6 +197,10 @@ treeview { box-shadow: none; } +.right-panel { + margin: 10px; +} + #channels-title { color: #f7f7f7; font-weight: bold; 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] |