[gnome-boxes/gnome-3-12] wizard-source: Show 4 medias on short screens



commit 57e6ddd3cd62754b42b253c4ae84f5aa48c79c1b
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Mar 26 00:04:34 2014 +0000

    wizard-source: Show 4 medias on short screens
    
    On small screens, where height is typically less than 800, lets keep
    number of visible medias limited to 4 (rather than 5). This is so that
    main window can fit in 625x678px.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720908

 src/wizard-source.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/wizard-source.vala b/src/wizard-source.vala
index 9c9093e..e70b621 100644
--- a/src/wizard-source.vala
+++ b/src/wizard-source.vala
@@ -160,7 +160,8 @@ private class Boxes.WizardSource: Gtk.Stack {
         media_manager = MediaManager.get_instance ();
         main_vbox.grab_focus ();
 
-        media_scrolled.setup (5);
+        var num_visible = (Gdk.Screen.height () > 800)? 5 : 4;
+        media_scrolled.setup (num_visible);
         media_vbox = media_scrolled.vbox;
         draw_as_css_box (url_entry_bin);
 


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