summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-12-17 14:57:38 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-12-17 14:57:38 +0000
commitc3e30bc442c1c7542c439b9ccf5eca2cc03bff32 (patch)
tree78a6af08c79e17cc01c0b9637c6dbee1489768f7
parentd68b4c545f29860e17bbc7edf85160adf0b5cbc7 (diff)
downloadcontrol-center-c3e30bc442c1c7542c439b9ccf5eca2cc03bff32.tar
control-center-c3e30bc442c1c7542c439b9ccf5eca2cc03bff32.tar.gz
control-center-c3e30bc442c1c7542c439b9ccf5eca2cc03bff32.tar.bz2
control-center-c3e30bc442c1c7542c439b9ccf5eca2cc03bff32.tar.xz
control-center-c3e30bc442c1c7542c439b9ccf5eca2cc03bff32.zip
left icons: always use the bold layout so that the wrapping is the
same in both normal and bold layouts (altering wrapping when the cursor is over
-rwxr-xr-xcontrol-center5
1 files changed, 4 insertions, 1 deletions
diff --git a/control-center b/control-center
index 6444a3c9..eae73495 100755
--- a/control-center
+++ b/control-center
@@ -626,6 +626,10 @@ foreach (@tree) {
my $curr_state = $curr_state[$my_index];
my $full_redraw = $curr_state != $old_state[$my_index];
my ($x, $y, $width, $height) = $full_redraw ? (0, 0, $d_width, $d_height) : $event->area->values;
+ unless ($lines) {
+ $darea_left->modify_font($fonts[1]);
+ ($lines, $widths, $heights) = (get_text_coord($text, $darea_left, $d_width-$left_txt_offset-$right_text_offset, $d_height, 0, 0, 0, 0))[2..4];
+ }
# Redraw double buffer on first expose in that particular state (selected <=> not selected): render background, then icon, then text
unless ($dbl_area_left[$curr_state]) {
my $window = $darea_left->window;
@@ -637,7 +641,6 @@ foreach (@tree) {
$darea_left->modify_font($fonts[$curr_state]);
- ($lines, $widths, $heights) = (get_text_coord($text, $darea_left, $d_width-$left_txt_offset-$right_text_offset, $d_height, 0, 0, 0, 0))[2..4];
my $offset = -($d_height - string_height($darea_left, $lines->[0]) * (listlength(@$lines) + 0.2)) / 2; # text lines are offsetted
mapn {
$dbl_area_left[$curr_state]->draw_layout($darea_left->style->black_gc, $_[1]+$left_txt_offset, $_[2]-$offset, $darea_left->create_pango_layout($_[0]));