From 2b6691ce0fc94e2c40f03073f84afff2e5eb1a2a Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Sat, 6 Oct 2007 00:39:16 +0000 Subject: [PATCH] make titlebars big enough for buttons boemann: feel free to revert if you have a better idea svn path=/trunk/KDE/kdebase/workspace/; revision=721747 --- clients/oxygen/oxygen.h | 4 +++- clients/oxygen/oxygenbutton.cpp | 3 +-- clients/oxygen/oxygenclient.cpp | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/clients/oxygen/oxygen.h b/clients/oxygen/oxygen.h index 894f6d30c5..4fc51da206 100644 --- a/clients/oxygen/oxygen.h +++ b/clients/oxygen/oxygen.h @@ -33,11 +33,13 @@ namespace Oxygen { // OxygenFactory ///////////////////////////////////////////////////////////// +static const int OXYGEN_BUTTONSIZE = 21; + enum ButtonType { ButtonHelp=0, ButtonMax, ButtonMin, - ButtonClose, + ButtonClose, ButtonMenu, ButtonSticky, ButtonTypeCount diff --git a/clients/oxygen/oxygenbutton.cpp b/clients/oxygen/oxygenbutton.cpp index 74c6e347ce..dd8760d686 100644 --- a/clients/oxygen/oxygenbutton.cpp +++ b/clients/oxygen/oxygenbutton.cpp @@ -48,7 +48,6 @@ K_GLOBAL_STATIC_WITH_ARGS(OxygenHelper, globalHelper, ("OxygenDeco")) extern int BUTTONSIZE; extern int DECOSIZE;*/ -static const int OXYGEN_BUTTONSIZE = 21; // static const int DECOSIZE = 8; ////////////////////////////////////////////////////////////////////////////// // OxygenButton Class // @@ -141,7 +140,7 @@ void OxygenButton::paintEvent(QPaintEvent *) } QColor bg = globalHelper->backgroundTopColor(palette().window()); - painter.drawPixmap(-1, -1, globalHelper->windecoButton(palette().button())); + painter.drawPixmap(0, 0, globalHelper->windecoButton(palette().button())); painter.setRenderHints(QPainter::Antialiasing); painter.setBrush(Qt::NoBrush); diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 5d91fb62a9..fdb31fc896 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -158,9 +158,9 @@ int OxygenClient::layoutMetric(LayoutMetric lm, bool respectWindowState, const K case LM_TitleHeight: { if (respectWindowState && isToolWindow()) { - return BUTTONSIZE; + return OXYGEN_BUTTONSIZE; } else { - return BUTTONSIZE; + return OXYGEN_BUTTONSIZE; } }