diff options
author | damien <damien@mandriva.com> | 2002-01-15 23:58:28 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2002-01-15 23:58:28 +0000 |
commit | 3ca82235844ffcff1856100633cd03df628af492 (patch) | |
tree | 9f0fcded227649e70ebe0d8075d919f0b54fefe6 /perl-install/install_steps_gtk.pm | |
parent | 42f6c50891c9331215ccb4b5136462e5e8059c11 (diff) | |
download | drakx-3ca82235844ffcff1856100633cd03df628af492.tar drakx-3ca82235844ffcff1856100633cd03df628af492.tar.gz drakx-3ca82235844ffcff1856100633cd03df628af492.tar.bz2 drakx-3ca82235844ffcff1856100633cd03df628af492.tar.xz drakx-3ca82235844ffcff1856100633cd03df628af492.zip |
advertising engine amelioration
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r-- | perl-install/install_steps_gtk.pm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index fdeaf5fae..b79d37d94 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -545,28 +545,30 @@ sub installPackages { gtkpack($box, $advertising = !$draw_text ? gtkpng($f) : gtksignal_connect(gtkset_usize($darea, $width, $height), expose_event => sub { + my ($dx, $dy) = ($darea->allocation->[2], $darea->allocation->[3]); if (!defined($dbl_area)) { - $dbl_area = new Gtk::Gdk::Pixmap($darea->window, $width, $height); + $dbl_area = new Gtk::Gdk::Pixmap($darea->window, $dx, $dy); + $dbl_area->draw_rectangle($darea->style->bg_gc('active'), 1, 0, 0, $dx, $dy); $dbl_area->draw_pixmap($darea->style->bg_gc('normal'), - $pix, 0, 0, 0, 0, $width, $height); + $pix, 0, 0, ($dx-$width)/2, 0, $width, $height); my $gc_text = new Gtk::Gdk::GC($darea->window); $gc_text->set_foreground(gtkcolor(65535, 65535, 65535)); foreach (@data) { - my ($text, $x, $y, $area_width, $area_height) = @$_; + my ($text, $x, $y, $area_width, $area_height, $bold) = @$_; my ($width, $height, $lines, $widths, $heights, $ascents, $descents) = get_text_coord ($text, $darea->style, $area_width, $area_height, 1, 0, 1, 1); my $i = 0; foreach (@{$lines}) { $dbl_area->draw_string($darea->style->font, $gc_text, - $x + ${$widths}[$i], $y + ${$heights}[$i], $_); - $dbl_area->draw_string($darea->style->font, $gc_text, - $x + ${$widths}[$i] + 1, $y + ${$heights}[$i], $_); + ($dx-$width)/2 + $x + ${$widths}[$i], $y + ${$heights}[$i], $_); + $bold and $dbl_area->draw_string($darea->style->font, $gc_text, + ($dx-$width)/2 + $x + ${$widths}[$i] + 1, $y + ${$heights}[$i], $_); $i++; } } } $darea->window->draw_pixmap($darea->style->bg_gc('normal'), - $dbl_area, 0, 0, 0, 0, $width, $height); + $dbl_area, 0, 0, 0, 0, $dx, $dy); })); } else { $advertising = undef; |