summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-02-03 10:39:50 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-02-03 10:39:50 +0000
commitb8f66ecc767e59456dca0ab01742a7eac0f818dd (patch)
tree8c28005191b110f6d8459a3e7ad01ae5d00868ad
parent4d38a51609970885ca76e8bdb1008c48a73c2bb3 (diff)
downloadcontrol-center-b8f66ecc767e59456dca0ab01742a7eac0f818dd.tar
control-center-b8f66ecc767e59456dca0ab01742a7eac0f818dd.tar.gz
control-center-b8f66ecc767e59456dca0ab01742a7eac0f818dd.tar.bz2
control-center-b8f66ecc767e59456dca0ab01742a7eac0f818dd.tar.xz
control-center-b8f66ecc767e59456dca0ab01742a7eac0f818dd.zip
fix icon alignment (#12447)
-rwxr-xr-xcontrol-center27
1 files changed, 26 insertions, 1 deletions
diff --git a/control-center b/control-center
index 38a7972f..3293858d 100755
--- a/control-center
+++ b/control-center
@@ -1236,7 +1236,12 @@ foreach (@tree) {
# Create right notebook pages :
- my $tbl = create_packtable({ col_spacings => $spacing, row_spacings => $spacing, homogeneous => 1, mcc => 1 },
+ my $tbl = create_packtable2({ col_spacings => $spacing, row_spacings => $spacing, homogeneous => 1, mcc => 1 },
+ map {
+ my $size_group = Gtk2::SizeGroup->new('vertical');
+ $size_group->add_widget($_) foreach grep { defined $_ } @$_;
+ $_;
+ }
group_by($option_values{use_long_dscr} ? 2 : 3, map {
my $label = $_;
my $icon = $programs{$label}{icon};
@@ -1740,6 +1745,26 @@ sub hide_buttons {
}
+sub create_packtable2 {
+ my ($options, @l) = @_;
+ my $w = Gtk2::Table->new(0, 0, 1);
+ add2hash_($options, { xpadding => 5, ypadding => 0 });
+ each_index {
+ my ($i, $l) = ($::i, $_);
+ each_index {
+ my $j = $::i;
+ if ($_) {
+ ref $_ or $_ = gtknew('WrappedLabel', text => $_);
+ $w->attach($_, $j, $j + 1, $i, $i + 1, ['expand', 'fill'], ['expand', 'fill'], $options->{xpadding}, $options->{ypadding});
+ $_->show;
+ }
+ } @$l;
+ } @l;
+ $w->set_col_spacings($options->{col_spacings} || 0);
+ $w->set_row_spacings($options->{row_spacings} || 0);
+ gtkset_border_width($w, $::isInstall ? 3 : 10);
+}
+
#-------------------------------------------------------------
# mcc specific graphic functions: