From 699251f9dfdfae5d5caa49591fa89c96d603fc2d Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sun, 2 Feb 2003 13:53:18 +0000 Subject: ensure the window is big enough in 640x480: remove logo and steps window --- perl-install/install_gtk.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'perl-install/install_gtk.pm') diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm index 25765837c..013dc9bbc 100644 --- a/perl-install/install_gtk.pm +++ b/perl-install/install_gtk.pm @@ -110,6 +110,8 @@ sub create_help_window { sub create_steps_window { my ($o) = @_; + return if $::stepswidth == 0; + $o->{steps_window}->destroy if $o->{steps_window}; my $w = bless {}, 'ugtk2'; @@ -138,6 +140,8 @@ sub create_steps_window { sub create_logo_window { my ($o) = @_; + return if $::logowidth == 0; + gtkdestroy($o->{logo_window}); my $w = bless {}, 'ugtk2'; @@ -166,8 +170,8 @@ sub init_sizes() { ($::rootwidth, $::rootheight) = (Gtk2::Gdk->screen_width, Gtk2::Gdk->screen_height); $::live and $::rootheight -= 80; #- ($::rootheight, $::rootwidth) = (min(768, $::rootheight), min(1024, $::rootwidth)); - ($::stepswidth, $::stepsheight) = (160, $::rootheight); - ($::logowidth, $::logoheight) = (500, 40); + ($::stepswidth, $::stepsheight) = $::rootwidth <= 640 ? (0, 0) : (160, $::rootheight); + ($::logowidth, $::logoheight) = $::rootwidth <= 640 ? (0, 0) : (500, 40); ($::helpwidth, $::helpheight) = ($::rootwidth - $::stepswidth, 0); ($::windowwidth, $::windowheight) = ($::rootwidth - $::stepswidth, $::rootheight - $::helpheight - $::logoheight); } -- cgit v1.2.1