… | |
… | |
360 | $self->{force_h} = $h; |
360 | $self->{force_h} = $h; |
361 | |
361 | |
362 | $self->realloc; |
362 | $self->realloc; |
363 | } |
363 | } |
364 | |
364 | |
365 | # travsle the widget chain up to find the maximum "physical" size constraints |
365 | # traverse the widget chain up to find the maximum "physical" size constraints |
366 | sub get_max_wh { |
366 | sub get_max_wh { |
367 | my ($self) = @_; |
367 | my ($self) = @_; |
368 | |
|
|
369 | return ($self->{alloc_w}, $self->{alloc_h}) |
|
|
370 | if $self->{alloc_w} && !$self->{root}{realloc}{$self+0}; |
|
|
371 | |
368 | |
372 | return $self->{parent}->get_max_wh |
369 | return $self->{parent}->get_max_wh |
373 | if $self->{parent}; |
370 | if $self->{parent}; |
374 | |
371 | |
375 | ($::WIDTH, $::HEIGHT) |
372 | ($::WIDTH, $::HEIGHT) |
… | |
… | |
1388 | $self->CFPlus::UI::Container::add ($self->{title_widget}) if $self->{title_widget}; |
1385 | $self->CFPlus::UI::Container::add ($self->{title_widget}) if $self->{title_widget}; |
1389 | } |
1386 | } |
1390 | |
1387 | |
1391 | sub border { |
1388 | sub border { |
1392 | int $_[0]{border} * $::FONTSIZE |
1389 | int $_[0]{border} * $::FONTSIZE |
|
|
1390 | } |
|
|
1391 | |
|
|
1392 | sub get_max_wh { |
|
|
1393 | my ($self) = @_; |
|
|
1394 | |
|
|
1395 | return ($self->{w}, $self->{h}) |
|
|
1396 | if $self->{visible} && $self->{w}; |
|
|
1397 | |
|
|
1398 | $self->SUPER::get_max_wh |
1393 | } |
1399 | } |
1394 | |
1400 | |
1395 | sub size_request { |
1401 | sub size_request { |
1396 | my ($self) = @_; |
1402 | my ($self) = @_; |
1397 | |
1403 | |