summaryrefslogtreecommitdiffstats
path: root/lib/network
diff options
context:
space:
mode:
Diffstat (limited to 'lib/network')
-rwxr-xr-xlib/network/drakroam.pm4
-rwxr-xr-xlib/network/netcenter.pm4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/network/drakroam.pm b/lib/network/drakroam.pm
index 7bf8033..8d53108 100755
--- a/lib/network/drakroam.pm
+++ b/lib/network/drakroam.pm
@@ -99,12 +99,14 @@ sub create_drakroam_gui {
dbus_object::set_gtk2_watch_helper($dbus);
}
+ (undef, my $rootwin_height) = gtkroot()->get_size();
+ my $scrolled_height = $rootwin_height > 480 ? 300 : 225;
gtkadd($droam->{gui}{w}{window},
gtknew('VBox', spacing => 5, children => [
$::isEmbedded ? () : (0, Gtk2::Banner->new($icon, $title)),
0, gtknew('HBox', children_tight => [ gtknew('Label_Left', text => N("Device: "), alignment => [ 0.5, 0.5 ]),
gtksignal_connect($droam->{gui}{connections_combo}, changed => sub { select_connection($droam) }) ]),
- 1, gtknew('ScrolledWindow', width => 500, height => 300, child => $droam->{gui}{networks_list}),
+ 1, gtknew('ScrolledWindow', width => 500, height => $scrolled_height, child => $droam->{gui}{networks_list}),
0, gtknew('HButtonBox', layout => 'edge', children_loose => [
$droam->{gui}{buttons}{configure} = gtknew('Button', text => N("Configure"), clicked => sub { network::connection_manager::configure_connection($droam) }),
$droam->{gui}{buttons}{connect_start} = gtknew('Button', text => N("Connect"), relief => 'half', clicked => sub { network::connection_manager::start_connection($droam) }),
diff --git a/lib/network/netcenter.pm b/lib/network/netcenter.pm
index 3e533f4..0a3f844 100755
--- a/lib/network/netcenter.pm
+++ b/lib/network/netcenter.pm
@@ -44,10 +44,12 @@ sub main {
my $pixbufs = network::connection_manager::create_pixbufs();
my @cmanagers = map { build_cmanager($in, $net, $w, $pixbufs, $_) } @connections;
+ (undef, my $rootwin_height) = gtkroot()->get_size();
+ my $scrolled_height = $rootwin_height > 480 ? 400 : 295;
gtkadd($w->{window},
gtknew('VBox', spacing => 5, children => [
$::isEmbedded ? () : (0, Gtk2::Banner->new($icon, $title)),
- 1, gtknew('ScrolledWindow', width => 600, height => 400, shadow_type => 'none',
+ 1, gtknew('ScrolledWindow', width => 600, height => $scrolled_height, shadow_type => 'none',
child => gtknew('VBox', spacing => 5, children_tight => [
map_index {
my $cmanager = $cmanagers[$::i];