summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/ugtk2.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index f0ae478eb..c147064eb 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -1530,7 +1530,8 @@ sub new {
my ($_class, $icon, $text, $o_options) = @_;
my $darea = Gtk2::DrawingArea->new;
- $darea->set_size_request(-1, 75);
+ my $d_height = 75;
+ $darea->set_size_request(-1, $d_height);
$darea->modify_font(Gtk2::Pango::FontDescription->from_string(common::N("_banner font:\nSans 14")));
$darea->{icon} = ugtk2::gtkcreate_pixbuf($icon);
$darea->{text} = $text;
@@ -1540,9 +1541,10 @@ sub new {
$darea->signal_connect(expose_event => sub {
my $style = $darea->get_style;
my $height = $darea->{icon}->get_height;
+ my $padding = int(($d_height - $height)/2);
$darea->{icon}->render_to_drawable($darea->window, $style->bg_gc('normal'),
- 0, 0, 10, 10, -1, -1, 'none', 0, 0);
- $darea->window->draw_layout($style->text_gc('normal'), $height + 20, $o_options->{txt_ypos} || 25,
+ 0, 0, $padding, $padding, -1, -1, 'none', 0, 0);
+ $darea->window->draw_layout($style->text_gc('normal'), $height + $padding*2, $o_options->{txt_ypos} || 25,
$darea->{layout});
1;
});