From d893bfc403d65f4a4ad47e7d56e561b3f7ad6a92 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 27 Oct 2018 21:16:07 +0100 Subject: Increase window size when display size is > 800x600 (mga#23435) --- draklive-install | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'draklive-install') diff --git a/draklive-install b/draklive-install index a2ae851..4f1231b 100755 --- a/draklive-install +++ b/draklive-install @@ -20,8 +20,11 @@ use MDK::Common; use common; use feature qw(state); use File::Basename; +use ugtk3; -($::real_windowwidth, $::real_windowheight) = (600, 400); +($::rootwidth, $::rootheight) = (Gtk3::Gdk::Screen::width, Gtk3::Gdk::Screen::height); +$::real_windowwidth = $::rootwidth > 800 ? 750 : 600; +$::real_windowheight = $::rootheight > 600 ? 500 : 400; { use diskdrake::interactive; @@ -104,11 +107,17 @@ sub display_start_message() { local $::isStandalone = $has_running_wm; # center me if run in xsetup.d script mygtk3::enable_quit_popup(1); my $w = ugtk3->new(N("Mageia Live")); + my $dialogue = ugtk3::gtknew('VBox', children_centered => [ + ugtk3::gtkcreate_img("MageiaLive-install"), + ugtk3::gtknew('Label', height => 5), + ugtk3::gtknew('Label', text => N("This wizard will help you to install the live distribution.")), + ]); + $dialogue->set_vexpand(1); ugtk3::gtkadd($w->{window}, - ugtk3::gtkcreate_img("MageiaLive-install"), - ugtk3::gtknew('Label', height => 5), - N("This wizard will help you to install the live distribution."), - ugtk3::create_okcancel($w)); + ugtk3::gtknew('VBox', children_tight => [ + $dialogue, + ugtk3::create_okcancel($w), + ])); $w->{ok}->grab_focus; $w->main; } @@ -428,10 +437,12 @@ Quit anyway?", $part->{device}, $part->{mntpoint})) or return if $::isStandalone sub copying_message { my ($o, $title, $message, $b_temp) = @_; - my $w = $o->wait_messageW($title, N("Copying in progress"), ugtk3::gtknew('VBox', padding => 5, children_tight => [ + my $dialogue = ugtk3::gtknew('VBox', padding => 5, children_centered => [ ugtk3::gtkcreate_img("MageiaLive-advert"), $message, - ])); + ]); + $dialogue->set_vexpand(1); + my $w = $o->wait_messageW($title, N("Copying in progress"), $dialogue); push @tempory::objects, $w if $b_temp; my $b = before_leaving { $o->wait_message_endW($w) }; -- cgit v1.2.1