From 84f4179cf8463bc7cb72423e4f43ced912699404 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 Jan 2019 16:39:36 +0000 Subject: [PATCH] Scale nbdraid canvas according to screen size. --- 2019-fosdem/nbdview/nbdraid.tcl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/2019-fosdem/nbdview/nbdraid.tcl b/2019-fosdem/nbdview/nbdraid.tcl index f594f29..95f0441 100755 --- a/2019-fosdem/nbdview/nbdraid.tcl +++ b/2019-fosdem/nbdview/nbdraid.tcl @@ -37,7 +37,14 @@ source "nbdcanvas.tcl" set blocksize 4096 set width 128 -set scale 2 + +# For 1024x768 and 1280x1024 use scale 1 +# For larger screens use scale 2 +if { [winfo screenheight .] > 1024 } { + set scale 2 +} else { + set scale 1 +} # This list is used to store all the RAID handles. set handles {} -- 1.8.3.1