set blocksize 4096
set width 128
-set scale 2
+set scale 4
# This is used to store the canvas handle.
set h ""
set logfile [lindex $argv 0]
set size [lindex $argv 1]
-# Set up the window.
-wm title . "nbdview $logfile"
-
# Menubar.
option add *tearOff 0
menu .menubar
.menubar add cascade -menu .menubar.file -label File
.menubar.file add command -label "Quit" -command { exit }
+# Frame.
+frame .f
+pack .f -anchor center -expand 1 -fill both -ipadx 10 -ipady 10
+
# Canvas.
-set h [nbdcanvas .c $logfile $size $blocksize $width $scale]
-pack .c -in . -expand 1 -fill both
+set h [nbdcanvas .f.c $logfile $size $blocksize $width $scale]
+.f.c configure -borderwidth 4 -relief groove
+pack .f.c -anchor center -expand 0 -fill none
-# Set the width and height of the window.
-set h_ [expr {[nbdheight $h] * $scale + 40}]
-set w [expr {$width * $scale + 16}]
-wm geometry . "${w}x${h_}"
+# Set up the window.
+wm title . "nbdview $logfile"
wm resizable . false false
# Start polling the log file.