[gnote] Left align items in popovers and increase vertical spacing
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Left align items in popovers and increase vertical spacing
- Date: Sun, 5 Mar 2017 15:56:45 +0000 (UTC)
commit 136c6d59ae46242ba62194d0c766ebae2a474759
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Mar 5 17:10:59 2017 +0200
Left align items in popovers and increase vertical spacing
Fixes Bug 778823
src/utils.cpp | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/utils.cpp b/src/utils.cpp
index 9b67cdf..e47f3b6 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -123,6 +123,18 @@ namespace gnote {
set_common_popover_widget_props(*this);
}
};
+
+ void set_common_popover_widget_props(Gtk::ModelButton & button)
+ {
+ button.set_use_underline(true);
+ button.property_margin_top() = 3;
+ button.property_margin_bottom() = 3;
+ auto lbl = dynamic_cast<Gtk::Label*>(button.get_child());
+ if(lbl) {
+ lbl->set_xalign(0.0f);
+ }
+ utils::set_common_popover_widget_props(button);
+ }
}
@@ -292,7 +304,6 @@ namespace gnote {
Gtk::ModelButton *item = new Gtk::ModelButton;
gtk_actionable_set_action_name(GTK_ACTIONABLE(item->gobj()), action.c_str());
item->set_label(label);
- item->set_use_underline(true);
set_common_popover_widget_props(*item);
return item;
}
@@ -303,7 +314,6 @@ namespace gnote {
Gtk::ModelButton *button = new Gtk::ModelButton;
button->property_menu_name() = submenu;
button->set_label(label);
- button->set_use_underline(true);
set_common_popover_widget_props(*button);
return button;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]