From 8744d57a0272a41d66bc75349fa745cfdecde65e Mon Sep 17 00:00:00 2001 From: Sandro Giessl Date: Mon, 11 Jul 2005 19:55:42 +0000 Subject: [PATCH] Make the arrow direction of the restore button change depending on the placement (point to the right when the custom button position is left), same behavior as the System++ style. Knut, thanks for the patch. It didn't work for me, but I fixed it the KCommonDecorationButton-way. :) CCMAIL: knutmj@online.no svn path=/trunk/KDE/kdebase/kwin/; revision=433768 --- clients/modernsystem/modernsys.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clients/modernsystem/modernsys.cpp b/clients/modernsystem/modernsys.cpp index e3006f273a..f34d7b3fd5 100644 --- a/clients/modernsystem/modernsys.cpp +++ b/clients/modernsystem/modernsys.cpp @@ -29,9 +29,12 @@ static unsigned char close_bits[] = { static unsigned char maximize_bits[] = { 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x00, 0x00}; -static unsigned char minmax_bits[] = { +static unsigned char r_minmax_bits[] = { 0x0c, 0x18, 0x33, 0x67, 0xcf, 0x9f, 0x3f, 0x3f}; +static unsigned char l_minmax_bits[] = { + 0x30, 0x18, 0xcc, 0xe6, 0xf3, 0xf9, 0xfc, 0xfc}; + static unsigned char unsticky_bits[] = { 0x3c, 0x42, 0x99, 0xbd, 0xbd, 0x99, 0x42, 0x3c}; @@ -307,7 +310,7 @@ void ModernButton::reset(unsigned long changed) setBitmap(iconify_bits); break; case MaxButton: - setBitmap( isOn() ? minmax_bits : maximize_bits ); + setBitmap( isOn() ? (isLeft()?l_minmax_bits:r_minmax_bits) : maximize_bits ); break; case OnAllDesktopsButton: setBitmap( isOn() ? unsticky_bits : sticky_bits );