[gnome-disk-utility] GduVolumeGrid: Cap minimum width to 300 pixels



commit d92f4a0e058ac9009f10ac710eb51671e444a2d4
Author: David Zeuthen <zeuthen gmail com>
Date:   Sun Mar 16 23:26:18 2014 -0700

    GduVolumeGrid: Cap minimum width to 300 pixels
    
    Otherwise it looks weird with disks with tons of partitions, for
    example Chromebooks.
    
    Signed-off-by: David Zeuthen <zeuthen gmail com>

 src/disks/gduvolumegrid.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/disks/gduvolumegrid.c b/src/disks/gduvolumegrid.c
index 5571a59..cd0d67e 100644
--- a/src/disks/gduvolumegrid.c
+++ b/src/disks/gduvolumegrid.c
@@ -476,7 +476,11 @@ gdu_volume_grid_get_preferred_width (GtkWidget *widget,
       width += element->fixed_width;
     }
 
-  *minimal_width = *natural_width = width;
+  *natural_width = width;
+
+  if (width > 300)
+    width = 300;
+  *minimal_width = width;
 }
 
 static void


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