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:
parent
231fa45a2b
commit
2b6691ce0f
3 changed files with 6 additions and 5 deletions
|
@ -33,6 +33,8 @@ namespace Oxygen
|
||||||
{
|
{
|
||||||
// OxygenFactory /////////////////////////////////////////////////////////////
|
// OxygenFactory /////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
static const int OXYGEN_BUTTONSIZE = 21;
|
||||||
|
|
||||||
enum ButtonType {
|
enum ButtonType {
|
||||||
ButtonHelp=0,
|
ButtonHelp=0,
|
||||||
ButtonMax,
|
ButtonMax,
|
||||||
|
|
|
@ -48,7 +48,6 @@ K_GLOBAL_STATIC_WITH_ARGS(OxygenHelper, globalHelper, ("OxygenDeco"))
|
||||||
extern int BUTTONSIZE;
|
extern int BUTTONSIZE;
|
||||||
extern int DECOSIZE;*/
|
extern int DECOSIZE;*/
|
||||||
|
|
||||||
static const int OXYGEN_BUTTONSIZE = 21;
|
|
||||||
// static const int DECOSIZE = 8;
|
// static const int DECOSIZE = 8;
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// OxygenButton Class //
|
// OxygenButton Class //
|
||||||
|
@ -141,7 +140,7 @@ void OxygenButton::paintEvent(QPaintEvent *)
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor bg = globalHelper->backgroundTopColor(palette().window());
|
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.setRenderHints(QPainter::Antialiasing);
|
||||||
painter.setBrush(Qt::NoBrush);
|
painter.setBrush(Qt::NoBrush);
|
||||||
|
|
|
@ -158,9 +158,9 @@ int OxygenClient::layoutMetric(LayoutMetric lm, bool respectWindowState, const K
|
||||||
case LM_TitleHeight:
|
case LM_TitleHeight:
|
||||||
{
|
{
|
||||||
if (respectWindowState && isToolWindow()) {
|
if (respectWindowState && isToolWindow()) {
|
||||||
return BUTTONSIZE;
|
return OXYGEN_BUTTONSIZE;
|
||||||
} else {
|
} else {
|
||||||
return BUTTONSIZE;
|
return OXYGEN_BUTTONSIZE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue