Transforming the usual martin babble into a more human-comprehensible form

This commit is contained in:
Martin Kamerbeek 2006-05-08 12:17:12 +00:00
parent 96ac393a11
commit d39c2c81d9

View file

@ -31,7 +31,7 @@ sub _submenu {
#### hoverhelp #### hoverhelp
#------------------------------------------------------------------- #-------------------------------------------------------------------
sub _getColorForm { sub _getColorForm {
my ($f, $color, %hoppa); my ($f, $color, %transparencies);
my $session = shift; my $session = shift;
my $colorId = shift; my $colorId = shift;
@ -40,12 +40,12 @@ sub _getColorForm {
$color = WebGUI::Image::Color->new($session, $colorId); $color = WebGUI::Image::Color->new($session, $colorId);
# Create transparencies in 5% increments # Create transparencies in 5% increments
tie %hoppa, 'Tie::IxHash'; tie %transparencies, 'Tie::IxHash';
$hoppa{'00'} = 'Opaque'; $transparencies{'00'} = 'Opaque';
for (1 .. 19) { for (1 .. 19) {
$hoppa{unpack('H*', pack('C', $_*255/20))} = 5*$_.'% Transparent'; $transparencies{unpack('H*', pack('C', $_*255/20))} = 5*$_.'% Transparent';
} }
$hoppa{'ff'} = 'Invisible'; $transparencies{'ff'} = 'Invisible';
my $f = WebGUI::HTMLForm->new($session); my $f = WebGUI::HTMLForm->new($session);
$f->text( $f->text(
@ -63,7 +63,7 @@ sub _getColorForm {
$f->selectSlider( $f->selectSlider(
-name => 'fillAlpha', -name => 'fillAlpha',
-value => [ $color->getFillAlpha ], -value => [ $color->getFillAlpha ],
-options=> \%hoppa, -options=> \%transparencies,
-label => $i18n->get('fill alpha'), -label => $i18n->get('fill alpha'),
-maxlength => 2, -maxlength => 2,
-editable=>0, -editable=>0,
@ -79,7 +79,7 @@ sub _getColorForm {
$f->selectSlider( $f->selectSlider(
-name => 'strokeAlpha', -name => 'strokeAlpha',
-value => [ $color->getStrokeAlpha ], -value => [ $color->getStrokeAlpha ],
-options=> \%hoppa, -options=> \%transparencies,
-label => $i18n->get('stroke alpha'), -label => $i18n->get('stroke alpha'),
-maxlength => 2, -maxlength => 2,
-editable => 0, -editable => 0,