diff options
-rw-r--r-- | ivybanner | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -22,7 +22,6 @@ use lib "/usr/share/ivybanner"; # variables definition #------------------------ - my $logdir = "/tmp"; my $logfile = "ivybanner-"; @@ -199,10 +198,10 @@ if ($opt{smallsize}){ } $fm1->Button(-text => 'demos', - -command => [\&demosframe, $demosdir], + -command => [\&demosframe, 'demos', $demosdir], @buttonattr)->place(-x => 800*$coef, -y => 100*$coef); $fm1->Button(-text => 'tests', - -command => [\&demosframe, $testsdir], + -command => [\&demosframe, 'tests', $testsdir], @buttonattr)->place(-x => 800*$coef, -y => 330*$coef); $fm1->Button(-text => 'quit', @buttonattr, @@ -253,7 +252,7 @@ sub execute { sub demosframe { - my ($path) = @_; + my ($title, $path) = @_; my @packinfo = $fm1->packInfo; $fm1->packForget(); $fm2 = $mw->Frame(-background => $darkbg)->pack(-expand => 1, -fill => 'both'); @@ -492,6 +491,13 @@ sub demosframe { # control buttons bottom frame #-------------------------------------------------- $y = 680*$coef; + my @labelattr = (-width => 6, -height => 2, + -borderwidth => 1, + @fontspec24, + -relief => 'flat', + -background => $darkbg, + -foreground => $fg); + my @buttonattr = (-width => 6, -height => 2, -borderwidth => 1, @fontspec24, @@ -517,6 +523,8 @@ sub demosframe { # $fm2->Button(@buttonattr, # -command => sub {}, # -text => "kill")->place(-x => 290, -y => $y); + $fm2->Label(@labelattr, + -text => $title)->place(-x => 290*$coef, -y => $y); $fm2->Button(@buttonattr, -command => \&viewLog, -text => "view\nlog")->place(-x => 510*$coef, -y => $y); |