2006-10-30 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Mon, 30 Oct 2006 12:36:13 +0000 (12:36 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Mon, 30 Oct 2006 12:36:13 +0000 (12:36 +0000)
* hildon-widgets/hildon-font-selection-dialog.c: Making the preview
dialog wider when being font sizes are being used. Fixes NB#41501.

ChangeLog
hildon-widgets/hildon-font-selection-dialog.c

index efa8f3f..24d18a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2006-10-30  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
 
+       * hildon-widgets/hildon-font-selection-dialog.c: Making the preview
+       dialog wider when being font sizes are being used. Fixes NB#41501. 
+
+2006-10-30  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
+
        * hildon-widgets/hildon-set-password-dialog.c: Removing
        auto-capitalization from the entry used to verify the password. Fixes
        NB#39585.
index fc72caf..1ffa8c0 100644 (file)
@@ -1127,13 +1127,6 @@ hildon_font_selection_dialog_show_preview(HildonFontSelectionDialog *
                                GTK_RESPONSE_ACCEPT,
                                NULL);
 
-  /* FIXME: This is a slightly ugly hack to force the width of the window so that
-   * the whole text fits with various font sizes. It's being done in such a way, 
-   * because of some GtkLabel wrapping issues and other mysterious bugs related to 
-   * truncating ellipsizing. Needs a rethink in future. (MDK) */
-
-  gtk_window_set_default_size (GTK_WINDOW(preview_dialog), 500, -1);
-
   str = (show_ref) ? g_strconcat(_("ecdg_fi_preview_font_preview_reference"), priv->preview_text, 0) :
                      g_strdup (priv->preview_text);
 
@@ -1164,6 +1157,15 @@ hildon_font_selection_dialog_show_preview(HildonFontSelectionDialog *
   g_object_get(G_OBJECT(fontsel), "family", &str, "family-set",
               &family_set, "size", &size, "size-set", &size_set,
               NULL);
+
+  /* FIXME: This is a slightly ugly hack to force the width of the window so that
+   * the whole text fits with various font sizes. It's being done in such a way, 
+   * because of some GtkLabel wrapping issues and other mysterious bugs related to 
+   * truncating ellipsizing. Needs a rethink in future. (MDK) */
+
+  gint dialog_width = (size_set && size > 24) ? 600 : 500; 
+  gtk_window_set_default_size (GTK_WINDOW(preview_dialog), dialog_width, -1);
+
   /*make reference text to have the same fontface and size*/
   if(family_set)
     {