[glom/maemo5] Maemo: Details: Put scrollbar against the right edge, as per spec.



commit d6dd868031c20199f66fe7562f10ac96025cb104
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Oct 12 14:14:32 2009 +0200

    Maemo: Details: Put scrollbar against the right edge, as per spec.
    
    * glom/window_boxholder.[h|cc]: On Maemo, use an Alignment with no padding
    at the right, instead of just a window border, to match the UI spec.

 ChangeLog                |    7 +++++++
 glom/window_boxholder.cc |   13 ++++++++++++-
 glom/window_boxholder.h  |    5 +++++
 3 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fc2ce3a..ea6636d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-10-12  Murray Cumming  <murrayc murrayc com>
 
+  Maemo: Details: Put scrollbar against the right edge, as per spec.
+  
+	* glom/window_boxholder.[h|cc]: On Maemo, use an Alignment with no padding 
+	at the right, instead of just a window border, to match the UI spec.
+
+2009-10-12  Murray Cumming  <murrayc murrayc com>
+
   Maemo: Details: More correct padding, maybe.
   
 	* glom/utility_widgets/flowtable.[h|cc]: Change set_padding() to 
diff --git a/glom/window_boxholder.cc b/glom/window_boxholder.cc
index 5b793b2..b38b2c2 100644
--- a/glom/window_boxholder.cc
+++ b/glom/window_boxholder.cc
@@ -32,7 +32,7 @@ Window_BoxHolder::Window_BoxHolder(Box_WithButtons* pBox, const Glib::ustring& t
     set_title(title);
 
 #ifndef GLOM_ENABLE_MAEMO
-  set_border_width(Utils::DEFAULT_SPACING_SMALL);
+
 #else
   //Maemo has wide border margins:
   set_border_width(HILDON_MARGIN_DOUBLE);
@@ -40,7 +40,18 @@ Window_BoxHolder::Window_BoxHolder(Box_WithButtons* pBox, const Glib::ustring& t
 
   pBox->signal_cancelled.connect(sigc::mem_fun(*this, &Window_BoxHolder::on_box_cancelled));
 
+  #ifndef GLOM_ENABLE_MAEMO
+  set_border_width(Utils::DEFAULT_SPACING_SMALL);
   add(*pBox);
+  #else
+  //Maemo has wide borders, but not on the right-hand side when there is a scrollbar:
+  set_border_width(0);
+  add(m_alignment);
+  m_alignment.set_padding(HILDON_MARGIN_DOUBLE, HILDON_MARGIN_DOUBLE, HILDON_MARGIN_DOUBLE, 0);
+  m_alignment.show();
+  m_alignment.add(*pBox);
+  #endif
+
   pBox->show();
 
   //Set the default button, if there is one:
diff --git a/glom/window_boxholder.h b/glom/window_boxholder.h
index ca2faee..26a3f18 100644
--- a/glom/window_boxholder.h
+++ b/glom/window_boxholder.h
@@ -26,6 +26,7 @@
 #include <gtkmm/button.h>
 
 #ifdef GLOM_ENABLE_MAEMO
+#include <gtkmm/alignment.h>
 #include <hildonmm/stackable-window.h>
 #endif
 
@@ -47,6 +48,10 @@ public:
 
 private:
 
+  #ifdef GLOM_ENABLE_MAEMO
+  Gtk::Alignment m_alignment;
+  #endif
+
   //Signal handlers:
   void on_box_cancelled();
 };



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