summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2002-03-01 17:16:16 +0000
committerdamien <damien@mandriva.com>2002-03-01 17:16:16 +0000
commit33e516ff5e432a1f76e2d965709c43f3c48fb33d (patch)
treecb61355028cfd3d41fdd9126518d0991c1c2b013 /perl-install
parent125d944aa8e904893e5e80afde17fbdf0281cc53 (diff)
downloaddrakx-backup-do-not-use-33e516ff5e432a1f76e2d965709c43f3c48fb33d.tar
drakx-backup-do-not-use-33e516ff5e432a1f76e2d965709c43f3c48fb33d.tar.gz
drakx-backup-do-not-use-33e516ff5e432a1f76e2d965709c43f3c48fb33d.tar.bz2
drakx-backup-do-not-use-33e516ff5e432a1f76e2d965709c43f3c48fb33d.tar.xz
drakx-backup-do-not-use-33e516ff5e432a1f76e2d965709c43f3c48fb33d.zip
style & font correction
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/my_gtk.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 048ce9923..94c42f56e 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -62,9 +62,8 @@ sub new {
my ($y1, $x1) = $im_up->get_size;
my ($im_left, $mask_left) = gtkcreate_png($::Wizard_pix_left || "wiz_default_left.png");
my ($y2, $x2) = $im_left->get_size;
- my $style= new Gtk::Style;
- $style->font(Gtk::Gdk::Font->fontset_load("-adobe-times-bold-r-normal-*-25-*-100-100-p-*-iso8859-*"));
- my $w = $style->font->string_width($::Wizard_title);
+ $draw1->style->font(Gtk::Gdk::Font->fontset_load("-adobe-utopia-bold-r-normal-*-25-*-100-100-p-*-iso8859-*,*-r-*"));
+ my $w = $draw1->style->font->string_width($::Wizard_title);
$draw1->signal_connect(expose_event => sub {
my $i;
for ($i=0;$i<(540/$y1);$i++) {
@@ -72,7 +71,7 @@ sub new {
$im_up, 0, 0, 0, $y1*$i,
$x1 , $y1 );
$draw1->window->draw_string(
- $style->font,
+ $draw1->style->font,
$draw1->style->white_gc,
140+(380-$w)/2, 62,
($::Wizard_title) );
@@ -405,18 +404,19 @@ sub create_pix_text {
if (ref($background) eq 'Gtk::Gdk::Color') { $color_background = $background }
elsif ($background =~ /#(\d+)#(\d+)#(\d+)/) { $color_background = gtkcolor(map{$_*65535/255}($1, $2, $3)) }
elsif (ref($background) eq 'Gtk::Gdk::Pixmap' && $x_back && $y_back) { $backpix = 1 }
- my $style= new Gtk::Style;
+ my $fake_darea = new Gtk::DrawingArea;
+ my $style= $fake_darea->style->copy();
if (ref($font) eq 'Gtk::Gdk::Font') {
$style->font($font);
} else {
- $font ||= _("-adobe-utopia-medium-r-normal-*-12-*-*-*-p-*-iso8859-*,*-r-*");
-#- $style->font(Gtk::Gdk::Font->fontset_load($font));
+#- $font ||= _("-adobe-utopia-medium-r-normal-*-12-*-*-*-p-*-iso8859-*,*-r-*");
+ $font and $style->font(Gtk::Gdk::Font->fontset_load($font));
}
my ($width, $height, $lines, $widths, $heights) = get_text_coord (
$text, $style, $max_width, $max_height, $can_be_greater, $can_be_smaller, $centeredx, $centeredy);
-
my $pix = new Gtk::Gdk::Pixmap($w->window, $width, $height);
+
if ($backpix) {
fill_tiled($w, $pix, $background, $x_back, $y_back, $width, $height);
} else {