… | |
… | |
2702 | my $old_h = $self->{old_h}; |
2702 | my $old_h = $self->{old_h}; |
2703 | |
2703 | |
2704 | if ($old_w && $old_h) { |
2704 | if ($old_w && $old_h) { |
2705 | for my $child ($self->children) { |
2705 | for my $child ($self->children) { |
2706 | $child->{x} = int 0.5 + $child->{x} * $w / $old_w; |
2706 | $child->{x} = int 0.5 + $child->{x} * $w / $old_w; |
2707 | $child->{w} = int 0.5 + $child->{req_w} * $w / $old_w; |
2707 | $child->{w} = int 0.5 + $child->{w} * $w / $old_w; |
2708 | $child->{req_w} = int 0.5 + $child->{req_w} * $w / $old_w if exists $child->{req_w}; |
2708 | $child->{req_w} = int 0.5 + $child->{req_w} * $w / $old_w if exists $child->{req_w}; |
2709 | $child->{user_w} = int 0.5 + $child->{user_w} * $w / $old_w if exists $child->{user_w}; |
2709 | $child->{user_w} = int 0.5 + $child->{user_w} * $w / $old_w if exists $child->{user_w}; |
2710 | $child->{y} = int 0.5 + $child->{y} * $h / $old_h; |
2710 | $child->{y} = int 0.5 + $child->{y} * $h / $old_h; |
2711 | $child->{h} = int 0.5 + $child->{h} * $h / $old_h; |
2711 | $child->{h} = int 0.5 + $child->{h} * $h / $old_h; |
2712 | $child->{req_h} = int 0.5 + $child->{req_h} * $h / $old_h if exists $child->{req_h}; |
2712 | $child->{req_h} = int 0.5 + $child->{req_h} * $h / $old_h if exists $child->{req_h}; |