[glom] Details: Buttons: Use background color from formatting.



commit 45be7ca6bfdc561018ac5b4be282f63385bf9d57
Author: Murray Cumming <murrayc murrayc com>
Date:   Sat Jan 23 23:03:34 2010 +0100

    Details: Buttons: Use background color from formatting.
    
    * glom/mode_data/flowtablewithfields.cc: add_button_at_position(): Call
    apply_formatting on the button, not the label, so it has a chance to do the
    right thing on the right widget.

 ChangeLog                             |    8 ++++++++
 glom/mode_data/flowtablewithfields.cc |    4 +---
 2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fff18bb..38d0343 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-01-23  Murray Cumming  <murrayc murrayc com>
 
+  Details: Buttons: Use background color from formatting.
+  
+	* glom/mode_data/flowtablewithfields.cc: add_button_at_position(): Call 
+	apply_formatting on the button, not the label, so it has a chance to do the 
+	right thing on the right widget.
+
+2010-01-23  Murray Cumming  <murrayc murrayc com>
+
   Details: Static Text items: Use background color from formatting.
   
 	* glom/utility_widgets/labelglom.cc: Do not call set_visible_window(false)
diff --git a/glom/mode_data/flowtablewithfields.cc b/glom/mode_data/flowtablewithfields.cc
index 234f3fa..b6afcf3 100644
--- a/glom/mode_data/flowtablewithfields.cc
+++ b/glom/mode_data/flowtablewithfields.cc
@@ -601,9 +601,7 @@ void FlowTableWithFields::add_button_at_position(const sharedptr<LayoutItem_Butt
   else
     add(*button, false /* expand */);
 
-  //TODO: This doesn't seem to work.
-  Gtk::Widget* label = button->get_child();
-  apply_formatting(*label, layoutitem_button);
+  apply_formatting(*button, layoutitem_button);
 }
 
 void FlowTableWithFields::add_textobject_at_position(const sharedptr<LayoutItem_Text>& layoutitem_text, const Glib::ustring& table_name , const type_list_layoutwidgets::iterator& add_before)



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