summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-09-19 15:21:51 +0000
committerThierry Vignaud <tv@mandriva.org>2008-09-19 15:21:51 +0000
commit93583041b46779152620b69c0028ae0b2e419f0c (patch)
tree745ec72d7a5f7702fd072925a6128bac244b7b47 /perl-install/ugtk2.pm
parent836b2e210188cc6d591ce1fa76f0e82461e1605e (diff)
downloaddrakx-93583041b46779152620b69c0028ae0b2e419f0c.tar
drakx-93583041b46779152620b69c0028ae0b2e419f0c.tar.gz
drakx-93583041b46779152620b69c0028ae0b2e419f0c.tar.bz2
drakx-93583041b46779152620b69c0028ae0b2e419f0c.tar.xz
drakx-93583041b46779152620b69c0028ae0b2e419f0c.zip
(Gtk2::Banner->new) render blue part of background
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 545f13481..0bdfd66df 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -1442,6 +1442,7 @@ sub new {
$darea->set_size_request(-1, $d_height);
$darea->modify_font(Gtk2::Pango::FontDescription->from_string("Sans Bold 14"));
eval { $darea->{icon} = ugtk2::gtkcreate_pixbuf($icon) };
+ my $blue_part = eval { ugtk2::gtkcreate_pixbuf('banner-blue-part') };
$darea->{text} = $text;
require lang;
my $is_rtl = lang::text_direction_rtl();
@@ -1456,8 +1457,11 @@ sub new {
(undef, undef, undef, $d_height) = $darea->window->get_geometry;
my $padding = int(($d_height - $height)/2);
my $d_width = $darea->allocation->width;
+ my $x_blue = $is_rtl ? $d_width - $width : 0;
my $x_icon = $is_rtl ? $d_width - $padding - $width : $padding;
my $x_text = $is_rtl ? $x_icon - $padding - $darea->{txt_width} : $width + $padding*2;
+ $blue_part->render_to_drawable($darea->window, $style->bg_gc('normal'),
+ 0, 0, $x_blue, 0, -1, -1, 'none', 0, 0);
$darea->{icon}->render_to_drawable($darea->window, $style->bg_gc('normal'),
0, 0, $x_icon, $padding, -1, -1, 'none', 0, 0);
$darea->window->draw_layout($style->fg_gc('normal'), $x_text, $o_options->{txt_ypos} || $d_height/3,