summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-07-08 14:12:05 +0000
committerNorbert Preining <preining@logic.at>2008-07-08 14:12:05 +0000
commit0a9f9ae5521189b3b81232eb7e92e5d372c1b7c9 (patch)
treebfa69eaf032306e50e39a87ee0d372c8f674142e /Master/tlpkg
parentb75b25f88638664115892c162e609ae803ce65b5 (diff)
GUI installer: adjust to screen size ...
git-svn-id: svn://tug.org/texlive/trunk@9369 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/installer/install-menu-perltk.pl24
1 files changed, 15 insertions, 9 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl
index d659181e797..86e7f0f3f50 100644
--- a/Master/tlpkg/installer/install-menu-perltk.pl
+++ b/Master/tlpkg/installer/install-menu-perltk.pl
@@ -62,6 +62,7 @@ if (defined($::opt_lang)) {
}
my $mw;
+my $subframe;
my $mainwindow;
my $bintextbutton;
@@ -227,8 +228,14 @@ sub run_menu {
debug("setting column widths to a=$a, c=$c\n");
calc_depends;
$mainwindow = Tk::MainWindow->new;
- $mw = $mainwindow->Frame;
+ if (!win32()) {
+ require Tk::Pane;
+ $subframe = $mainwindow->Scrolled("Frame", -scrollbars => "oe");
+ } else {
+ $subframe = $mainwindow->Frame;
+ }
+ $mw = $subframe->Frame;
# image frame on the left
my $fl = $mw->Frame(-background => "#0078b8");
@@ -366,18 +373,17 @@ sub run_menu {
$::statusbar = $fr->Label(-text => $text{'status'});
$::statusbar->pack;
menu_update_texts();
+ $mw->pack(-expand => 1, -fill => "both");
$mw->update;
my $rh = $mw->reqheight;
- # if the window is bigger than 780 (800 - some decorations)
- # we pack it into a paned frame
- if (($rh >= 780) && !win32()) {
- require Tk::Pane;
- my $foo = $mainwindow->Scrolled("Frame", -scrollbars => "oe", -height => 780);
- $mw->pack(-in => $foo);
- $foo->pack;
+ my $maxheight = $mainwindow->screenheight() - 20;
+ if ($rh > $maxheight) {
+ $subframe->configure(-height => $maxheight);
} else {
- $mw->pack;
+ $subframe->configure(-height => $rh);
}
+ $subframe->pack;
+ #$mw->pack(-expand => 1, -fill => "both");
Tk::MainLoop();
return($return);
}