[glom] FlowTableWithFields: Replace the use of Gtk::Alignment.



commit 01d424fb0422083634238827390aa2a21cc00ca8
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Jun 5 21:50:24 2014 +0200

    FlowTableWithFields: Replace the use of Gtk::Alignment.

 glom/mode_data/flowtablewithfields.cc |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/glom/mode_data/flowtablewithfields.cc b/glom/mode_data/flowtablewithfields.cc
index 7dc2e96..3322810 100644
--- a/glom/mode_data/flowtablewithfields.cc
+++ b/glom/mode_data/flowtablewithfields.cc
@@ -403,16 +403,16 @@ void FlowTableWithFields::add_layout_notebook(const sharedptr<LayoutItem_Noteboo
                                                                        
&FlowTableWithFields::on_button_press_event));
 #endif
         event_box->show();
-        //This doesn't work (probably because we haven't implmented it in our custom container),
-        //so we put the flowtable in an alignment and give that a border instead.
-        //TODO: Make it work (with margins) so we can remove the deprecate Gtk::Alignment.
-        //flow_table->set_border_width(Glom::UiUtils::DEFAULT_SPACING_SMALL); //Put some space between the 
page child and the page edges.
-        Gtk::Alignment* alignment = Gtk::manage(new Gtk::Alignment());
-        alignment->set_border_width(Glom::UiUtils::DEFAULT_SPACING_SMALL);
-        alignment->add(*event_box);
-        alignment->show();
-
-        notebook_widget->append_page(*alignment, *tab_label);
+
+        //Put some space between the page child and the page edges.
+        //This doesn't work (probably because we haven't implemented it in our custom container),
+        //so we use GtkWidget margins instead. TODO: What's the difference.
+        event_box->set_margin_start(Glom::UiUtils::DEFAULT_SPACING_SMALL);
+        event_box->set_margin_end(Glom::UiUtils::DEFAULT_SPACING_SMALL);
+        event_box->set_margin_top(Glom::UiUtils::DEFAULT_SPACING_SMALL);
+        event_box->set_margin_bottom(Glom::UiUtils::DEFAULT_SPACING_SMALL);
+
+        notebook_widget->append_page(*event_box, *tab_label);
 
         //Add child items:
         LayoutGroup::type_list_items items = group->get_items();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]