diff options
author | mariot | 2003-11-26 13:13:46 +0000 |
---|---|---|
committer | mariot | 2003-11-26 13:13:46 +0000 |
commit | b305e90c818562d47f98a079ffe29052b19cb2a2 (patch) | |
tree | 99242b541f717f13ae664cb1920846a95a1a1064 /src/Agent.pm | |
parent | cbe6bce6c3ece68a9081a120e78f84e990a8fa55 (diff) | |
download | ivycontrolpanel-b305e90c818562d47f98a079ffe29052b19cb2a2.zip ivycontrolpanel-b305e90c818562d47f98a079ffe29052b19cb2a2.tar.gz ivycontrolpanel-b305e90c818562d47f98a079ffe29052b19cb2a2.tar.bz2 ivycontrolpanel-b305e90c818562d47f98a079ffe29052b19cb2a2.tar.xz |
* Ajout de l'option -smallsize: affichage en 640x480.
* Ajout de l'option -position.
* Ajout des variables $smallsized $coef
Diffstat (limited to 'src/Agent.pm')
-rw-r--r-- | src/Agent.pm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Agent.pm b/src/Agent.pm index 75cf616..4a38434 100644 --- a/src/Agent.pm +++ b/src/Agent.pm @@ -14,7 +14,7 @@ use strict; #---------------------------------------------------------------------- my ($x0, $y0, $wmax, $dx, $dy, $cmin, $rmax, @matrix, @hosts, $tempo_id, $mw, $bg, $fg, $selcolor, $hlbg, $darkbg, $fontspec, @fontspec, - $on_img, $off_img, %instances, @instances, $bus, + $on_img, $off_img, %instances, @instances, $bus, $coef, $hosts_tl, $selected_host, $preselected_host); @@ -22,7 +22,7 @@ my ($x0, $y0, $wmax, $dx, $dy, $cmin, $rmax, @matrix, @hosts, $tempo_id, sub configure { shift; ($mw, $bg, $fg, $selcolor, $hlbg, $darkbg, - $fontspec, $x0, $y0, $wmax, $dy, $cmin, $rmax, $bus) = @_; + $fontspec, $x0, $y0, $wmax, $dy, $cmin, $rmax, $bus, $coef) = @_; @fontspec = @$fontspec if $fontspec; $off_img = $mw->Bitmap('off', -file => Tk::findINC('led.bmp'), -foreground => $bg); @@ -194,15 +194,15 @@ sub setposition { } $matrix[$r][$c]->[0] = $self; my ($x, $y) = ($matrix[$r][$c]->[1], $matrix[$r][$c]->[2]); - my $y2 = $y - 5; - $y2 -= 12 if ($self->{label}->cget(-text) =~ /\n/); + my $y2 = $y - 5*$coef; + $y2 -= 12*$coef if ($self->{label}->cget(-text) =~ /\n/); if ($self->{command}) { - $self->{led}->configure(-highlightthickness => 6); - $self->{led}->place(-x => $x+3, -y => $y+3); + $self->{led}->configure(-highlightthickness => 6*$coef); + $self->{led}->place(-x => $x+3*$coef, -y => $y+3*$coef); } else { - $self->{led}->configure(-highlightthickness => 2); - $self->{led}->place(-x => $x+6, -y => $y+6); + $self->{led}->configure(-highlightthickness => 2*$coef); + $self->{led}->place(-x => $x+6*$coef, -y => $y+6*$coef); } $self->{label}->place(-x => $x + 38, -y => $y2); @@ -219,7 +219,7 @@ sub createlabel { ); $self->{label} = $mw->Label(-text => $self->formatlabel, - -pady => 10, + -pady => 10*$coef, -justify => 'left', -relief => 'flat', -highlightthickness => 0, |