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
This commit is contained in:
Matthew Woehlke 2007-10-06 00:39:16 +00:00
parent 231fa45a2b
commit 2b6691ce0f
3 changed files with 6 additions and 5 deletions

View file

@ -33,11 +33,13 @@ namespace Oxygen
{
// OxygenFactory /////////////////////////////////////////////////////////////
static const int OXYGEN_BUTTONSIZE = 21;
enum ButtonType {
ButtonHelp=0,
ButtonMax,
ButtonMin,
ButtonClose,
ButtonClose,
ButtonMenu,
ButtonSticky,
ButtonTypeCount

View file

@ -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);

View file

@ -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;
}
}