[gnome-control-center] Make the display capplet's window fit in 800x600 displays



commit d271671798a30b4a4fcb1292d9b1c9d9f749735d
Author: Federico Mena Quintero <federico novell com>
Date:   Thu Feb 11 17:32:37 2010 -0600

    Make the display capplet's window fit in 800x600 displays
    
    We simply hack the FooScrollArea for the monitor display to be shorter.
    We can get fancier in the future by really computing the size based
    on the monitor into which the window eventually gets mapped.
    
    Patch by Takashi Iwai <tiwai novell com> - https://bugzilla.novell.com/show_bug.cgi?id=564579
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 capplets/display/xrandr-capplet.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c
index 1d4d12c..4d39b02 100644
--- a/capplets/display/xrandr-capplet.c
+++ b/capplets/display/xrandr-capplet.c
@@ -2361,7 +2361,10 @@ run_application (App *app)
     g_object_set_data (G_OBJECT (app->area), "app", app);
 
     /* FIXME: this should be computed dynamically */
-    foo_scroll_area_set_min_size (FOO_SCROLL_AREA (app->area), -1, 200);
+    if (gdk_screen_get_height (gdk_screen_get_default ()) <= 600)
+	foo_scroll_area_set_min_size (FOO_SCROLL_AREA (app->area), -1, 150);
+    else
+	foo_scroll_area_set_min_size (FOO_SCROLL_AREA (app->area), -1, 200);
     gtk_widget_show (app->area);
     g_signal_connect (app->area, "paint",
 		      G_CALLBACK (on_area_paint), app);



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