git.annexia.org
/
libguestfs-talks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
799bba5
)
Scale nbdraid canvas according to screen size.
author
Richard W.M. Jones
<rjones@redhat.com>
Tue, 29 Jan 2019 16:39:36 +0000
(16:39 +0000)
committer
Richard W.M. Jones
<rjones@redhat.com>
Tue, 29 Jan 2019 16:39:36 +0000
(16:39 +0000)
2019-fosdem/nbdview/nbdraid.tcl
patch
|
blob
|
history
diff --git
a/2019-fosdem/nbdview/nbdraid.tcl
b/2019-fosdem/nbdview/nbdraid.tcl
index
f594f29
..
95f0441
100755
(executable)
--- 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 {}