summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-08-01 18:04:34 +0000
committerMike Fulbright <msf@redhat.com>2001-08-01 18:04:34 +0000
commit122501f65356ed920e137534bc6aab222b0439bf (patch)
tree744870cc30b881042634a78b0dbee19ee6132393
parent15b120c5ce1131ac95a85ab5f5c5312d6756e380 (diff)
downloadanaconda-122501f65356ed920e137534bc6aab222b0439bf.tar.gz
anaconda-122501f65356ed920e137534bc6aab222b0439bf.tar.xz
anaconda-122501f65356ed920e137534bc6aab222b0439bf.zip
hack to make lowres partitioning more pleasing to the eye
-rw-r--r--iw/partition_gui.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 30d7ee1d1..6903fb8bb 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -32,7 +32,8 @@ import copy
STRIPE_HEIGHT = 32.0
LOGICAL_INSET = 3.0
-CANVAS_WIDTH = 500
+CANVAS_WIDTH_800 = 500
+CANVAS_WIDTH_640 = 400
CANVAS_HEIGHT = 200
TREE_SPACING = 2
@@ -106,8 +107,15 @@ class DiskStripeSlice:
totalSectors = float(disk.dev.heads
* disk.dev.sectors
* disk.dev.cylinders)
- xoffset = self.partition.geom.start / totalSectors * CANVAS_WIDTH
- xlength = self.partition.geom.length / totalSectors * CANVAS_WIDTH
+
+ # XXX hack but will work for now
+ if screen_width() > 640:
+ width = CANVAS_WIDTH_800
+ else:
+ width = CANVAS_WIDTH_640
+
+ xoffset = self.partition.geom.start / totalSectors * width
+ xlength = self.partition.geom.length / totalSectors * width
if self.partition.type & parted.PARTITION_LOGICAL:
yoffset = 0.0 + LOGICAL_INSET
yheight = STRIPE_HEIGHT - (LOGICAL_INSET * 2)
@@ -152,7 +160,16 @@ class DiskStripe:
self.hash = {}
self.editCb = editCb
self.selected = None
- group.add ("rect", x1=0.0, y1=10.0, x2=CANVAS_WIDTH,
+
+ # XXX hack but will work for now
+ if screen_width() > 640:
+ width = CANVAS_WIDTH_800
+ else:
+ width = CANVAS_WIDTH_640
+
+ print "width = %s" % width
+
+ group.add ("rect", x1=0.0, y1=10.0, x2=width,
y2=STRIPE_HEIGHT, fill_color='green',
outline_color='grey71', width_units=1.0)
group.lower_to_bottom()