… | |
… | |
37 | Carp::confess "size_request is abtract"; |
37 | Carp::confess "size_request is abtract"; |
38 | } |
38 | } |
39 | |
39 | |
40 | sub size_allocate { |
40 | sub size_allocate { |
41 | my ($self, $w, $h) = @_; |
41 | my ($self, $w, $h) = @_; |
|
|
42 | |
42 | $self->w ($w); |
43 | $self->{w} = $w; |
43 | $self->h ($h); |
44 | $self->{h} = $h; |
44 | } |
45 | } |
45 | |
46 | |
46 | sub focus_in { |
47 | sub focus_in { |
47 | my ($widget) = @_; |
48 | my ($widget) = @_; |
48 | $FOCUS = $widget; |
49 | $FOCUS = $widget; |
… | |
… | |
373 | my ($self, $theme) = @_; |
374 | my ($self, $theme) = @_; |
374 | $self = $self->SUPER::new; |
375 | $self = $self->SUPER::new; |
375 | |
376 | |
376 | $self->{txts} = [ |
377 | $self->{txts} = [ |
377 | map { new_from_file Crossfire::Client::Texture Crossfire::Client::find_rcfile $_ } |
378 | map { new_from_file Crossfire::Client::Texture Crossfire::Client::find_rcfile $_ } |
378 | qw/d1_bg.png d1_border_top.png d1_border_right.png d1_border_left.png d1_border_bottom.png/ |
379 | qw(d1_bg.png d1_border_top.png d1_border_right.png d1_border_left.png d1_border_bottom.png) |
379 | ]; |
380 | ]; |
380 | $self |
381 | $self |
381 | } |
382 | } |
382 | |
383 | |
383 | sub size_request { |
384 | sub size_request { |
… | |
… | |
394 | } |
395 | } |
395 | |
396 | |
396 | sub size_allocate { |
397 | sub size_allocate { |
397 | my ($self, $w, $h) = @_; |
398 | my ($self, $w, $h) = @_; |
398 | |
399 | |
399 | $self->w ($w); |
400 | $self->SUPER::size_allocate ($w, $h); |
400 | $self->h ($h); |
401 | |
401 | $h -= $self->{txts}->[1]->{height}; |
402 | $h -= $self->{txts}->[1]->{height}; |
402 | $h -= $self->{txts}->[4]->{height}; |
403 | $h -= $self->{txts}->[4]->{height}; |
403 | $w -= $self->{txts}->[2]->{width}; |
404 | $w -= $self->{txts}->[2]->{width}; |
404 | $w -= $self->{txts}->[3]->{width}; |
405 | $w -= $self->{txts}->[3]->{width}; |
405 | |
406 | |