/[papo]/papo/neb/neb/Tree/Button.pm
ViewVC logotype

Diff of /papo/neb/neb/Tree/Button.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by fheinz, Wed Apr 30 11:29:00 2003 UTC revision 1.5 by fheinz, Fri May 9 19:14:51 2003 UTC
# Line 15  our @ISA = ('neb::Tree::RepeatableScreen Line 15  our @ISA = ('neb::Tree::RepeatableScreen
15  sub width  sub width
16  {  {
17      my $self = shift;      my $self = shift;
18        my $width = $self->SUPER::width;
19    
20        # don't touch width if it's already defined
21        return $width if defined $width;
22    
23        # if width not defined, defaults to label lenght rounded up
24      my $length = (int(length($self->attribute('label')||"")/5)+1)*5; # round up to next multiple of 5      my $length = (int(length($self->attribute('label')||"")/5)+1)*5; # round up to next multiple of 5
25    
26      defined($self->SUPER::width) and $length == $self->SUPER::width or $self->SUPER::width($length);      defined($width) and $length == $self->SUPER::width or $self->SUPER::width($length);
27      return $self->SUPER::width;      return $self->SUPER::width;
28  }  }
29    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26