[glom/maemo5] Maemo: Make TextViews small to begin with.



commit aa5fc309af62a14250d0f7226acb70814184aee7
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Oct 16 12:43:21 2009 +0200

    Maemo: Make TextViews small to begin with.
    
    * glom/utility_widgets/datawidget.cc: set_child_size_by_field(): On Maemo,
    do not increase the height of the TextView, even if specified in the layout,
    because HildonTextViews expand automatically on Maemo when entering more text.

 ChangeLog                                          |    8 ++++++++
 .../test_sqlite_music/glom_musiccollection21.db    |  Bin 15360 -> 15360 bytes
 glom/utility_widgets/datawidget.cc                 |    2 ++
 3 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d1c7f2f..3c1a0cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2009-10-16  Murray Cumming  <murrayc murrayc com>
 
+	Maemo: Make TextViews small to begin with.
+	
+	* glom/utility_widgets/datawidget.cc: set_child_size_by_field(): On Maemo, 
+	do not increase the height of the TextView, even if specified in the layout, 
+	because HildonTextViews expand automatically on Maemo when entering more text.
+
+2009-10-16  Murray Cumming  <murrayc murrayc com>
+
 	Maemo: When adding related records, show the foreign key value.
 	
 	* glom/mode_data/box_data_portal.cc: on_maemo_appmenubutton_add():
diff --git a/examples/sqlite/test_sqlite_music/glom_musiccollection21.db b/examples/sqlite/test_sqlite_music/glom_musiccollection21.db
index 326b7b9..fadc279 100644
Binary files a/examples/sqlite/test_sqlite_music/glom_musiccollection21.db and b/examples/sqlite/test_sqlite_music/glom_musiccollection21.db differ
diff --git a/glom/utility_widgets/datawidget.cc b/glom/utility_widgets/datawidget.cc
index 1f78023..a8f026a 100644
--- a/glom/utility_widgets/datawidget.cc
+++ b/glom/utility_widgets/datawidget.cc
@@ -382,6 +382,7 @@ void DataWidget::set_child_size_by_field(const sharedptr<const LayoutItem_Field>
     m_child->set_size_request(width, width);
   else
   {
+    #ifndef GLOM_ENABLE_MAEMO //On Maemo, TextView widgets expand automatically.
     int height = -1; //auto.
     if((glom_type == Field::TYPE_TEXT) && (field->get_formatting_used().get_text_format_multiline()))
     {
@@ -394,6 +395,7 @@ void DataWidget::set_child_size_by_field(const sharedptr<const LayoutItem_Field>
     }
 
     m_child->set_size_request(width, height);
+    #endif //GLOM_ENABLE_MAEMO
   }
 }
 



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