From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/ui/widget/frame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/widget/frame.cpp') diff --git a/src/ui/widget/frame.cpp b/src/ui/widget/frame.cpp index eaa4336bb..65d10dcc4 100644 --- a/src/ui/widget/frame.cpp +++ b/src/ui/widget/frame.cpp @@ -8,7 +8,7 @@ */ #ifdef HAVE_CONFIG_H -# include +#include #endif #include "frame.h" -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/ui/widget/frame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/widget/frame.cpp') diff --git a/src/ui/widget/frame.cpp b/src/ui/widget/frame.cpp index 65d10dcc4..eaa4336bb 100644 --- a/src/ui/widget/frame.cpp +++ b/src/ui/widget/frame.cpp @@ -8,7 +8,7 @@ */ #ifdef HAVE_CONFIG_H -#include +# include #endif #include "frame.h" -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/ui/widget/frame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/widget/frame.cpp') diff --git a/src/ui/widget/frame.cpp b/src/ui/widget/frame.cpp index eaa4336bb..65d10dcc4 100644 --- a/src/ui/widget/frame.cpp +++ b/src/ui/widget/frame.cpp @@ -8,7 +8,7 @@ */ #ifdef HAVE_CONFIG_H -# include +#include #endif #include "frame.h" -- cgit v1.2.3 From bcfec16e05533d0fd11134c7712ca213835d5f84 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 26 Dec 2016 19:19:37 +0000 Subject: frame: Gtk3 fixes (bzr r15361) --- src/ui/widget/frame.cpp | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'src/ui/widget/frame.cpp') diff --git a/src/ui/widget/frame.cpp b/src/ui/widget/frame.cpp index 65d10dcc4..6593d9c7c 100644 --- a/src/ui/widget/frame.cpp +++ b/src/ui/widget/frame.cpp @@ -21,26 +21,20 @@ namespace UI { namespace Widget { Frame::Frame(Glib::ustring const &label_text /*= ""*/, gboolean label_bold /*= TRUE*/ ) - : _label(label_text, 1.0, 0.5, TRUE), - _alignment() + : _label(label_text, 1.0, 0.5, TRUE) { set_shadow_type(Gtk::SHADOW_NONE); - //Put an indented GtkAlignment inside the frame. - //Further children should be children of this GtkAlignment: - Gtk::Frame::add(_alignment); - set_padding(4, 0, 8, 0); - set_label_widget(_label); set_label(label_text, label_bold); - - show_all_children(); } void Frame::add(Widget& widget) { - _alignment.add(widget); + Gtk::Frame::add(widget); + set_padding(4, 0, 8, 0); + show_all_children(); } void @@ -56,7 +50,21 @@ Frame::set_label(const Glib::ustring &label_text, gboolean label_bold /*= TRUE*/ void Frame::set_padding (guint padding_top, guint padding_bottom, guint padding_left, guint padding_right) { - _alignment.set_padding(padding_top, padding_bottom, padding_left, padding_right); + auto child = get_child(); + + if(child) + { + child->set_margin_top(padding_top); + child->set_margin_bottom(padding_bottom); + +#if GTK_CHECK_VERSION(3,12,0) + child->set_margin_start(padding_left); + child->set_margin_end(padding_right); +#else + child->set_margin_left(padding_left); + child->set_margin_right(padding_right); +#endif + } } Gtk::Label const * -- cgit v1.2.3