aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-08-03 12:13:26 +0000
committerThierry Vignaud <tv@mandriva.org>2007-08-03 12:13:26 +0000
commit9676b258c721784db59312f5cc77d4103d1c22eb (patch)
tree3ddf4e381af84f9617d9dbd33cc7232fd3b4b291
parent637e4078d826438c0d7ad5c593495499fa4553b8 (diff)
downloadrpmdrake-9676b258c721784db59312f5cc77d4103d1c22eb.tar
rpmdrake-9676b258c721784db59312f5cc77d4103d1c22eb.tar.gz
rpmdrake-9676b258c721784db59312f5cc77d4103d1c22eb.tar.bz2
rpmdrake-9676b258c721784db59312f5cc77d4103d1c22eb.tar.xz
rpmdrake-9676b258c721784db59312f5cc77d4103d1c22eb.zip
(init) size label's heigh to 2 lines in order to prevent dummy vertical resizing
-rwxr-xr-xRpmdrake/gurpm.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/Rpmdrake/gurpm.pm b/Rpmdrake/gurpm.pm
index 7af7e3a9..f20f8544 100755
--- a/Rpmdrake/gurpm.pm
+++ b/Rpmdrake/gurpm.pm
@@ -39,6 +39,11 @@ sub init {
$previous_main_window = $::main_window;
$::main_window = $mainw->{real_window};
$label = gtknew('Label', text => $initializing);
+ # size label's heigh to 2 lines in order to prevent dummy vertical resizing:
+ my $context = $label->get_layout->get_context;
+ my $metrics = $context->get_metrics($label->style->font_desc, $context->get_language);
+ $label->set_size_request(-1, 2 * Gtk2::Pango->PANGO_PIXELS($metrics->get_ascent + $metrics->get_descent));
+
$progressbar = gtknew('ProgressBar');
gtkadd($mainw->{window}, $vbox = gtknew('VBox', spacing => 5, border_width => 6, children_tight => [ $label, $progressbar ]));
$mainw->{rwindow}->set_position('center-on-parent');