[glom] LayoutWidgetBase::apply_formatting(): Use Gtk::Entry::set_alignment() too.



commit 723b72f0b625940ef661d7eba6dedac3583d933c
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Mar 9 08:57:56 2015 +0100

    LayoutWidgetBase::apply_formatting(): Use Gtk::Entry::set_alignment() too.

 glom/utility_widgets/layoutwidgetbase.cc |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/glom/utility_widgets/layoutwidgetbase.cc b/glom/utility_widgets/layoutwidgetbase.cc
index 76e4bb7..48dff1f 100644
--- a/glom/utility_widgets/layoutwidgetbase.cc
+++ b/glom/utility_widgets/layoutwidgetbase.cc
@@ -139,7 +139,15 @@ void LayoutWidgetBase::apply_formatting(Gtk::Widget& widget, const sharedptr<con
       {
         //Note that, unlike Gtk::Label::set_justify(), this does have an effect
         //even for single lines of text.
+        //See http://www.murrayc.com/permalink/2015/03/02/gtk-aligning-justification-in-text-widgets/
         textview->set_justification(justification);
+      } else {
+        Gtk::Entry* entry = dynamic_cast<Gtk::Entry*>(widget_to_change);
+        if(entry)
+        {
+          //See http://www.murrayc.com/permalink/2015/03/02/gtk-aligning-justification-in-text-widgets/
+          entry->set_alignment(x_align);
+        }
       }
     }
   }


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