- Fix the titlebar height for the rest of the shipped decorations.
- Fix the "sticky" button rendering in the quartz decoration. svn path=/trunk/KDE/kdebase/workspace/; revision=740254icc-effect-5.14.5
parent
a951008c1e
commit
97d274b7c3
|
@ -329,7 +329,7 @@ void ModernSysFactory::read_config()
|
|||
bwidth = 4;
|
||||
}
|
||||
|
||||
theight = QFontMetrics(options()->font(true)).height() + 2;
|
||||
theight = QFontMetrics(options()->font(true)).height();
|
||||
if (theight < 16)
|
||||
theight = 16;
|
||||
if (theight < bwidth)
|
||||
|
|
|
@ -234,7 +234,7 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
|
|||
case TitleBarTileTop:
|
||||
case TitleBarTile:
|
||||
{
|
||||
const int titleBarTileHeight = (toolWindow ? m_titleHeightTool : m_titleHeight) + 2;
|
||||
const int titleBarTileHeight = (toolWindow ? m_titleHeightTool : m_titleHeight);
|
||||
// gradient used as well in TitleBarTileTop as TitleBarTile
|
||||
const int gradientHeight = 2 + titleBarTileHeight-1;
|
||||
QPixmap gradient(1, gradientHeight);
|
||||
|
|
|
@ -482,7 +482,7 @@ const QPixmap &PlastikClient::captionPixmap() const
|
|||
Handler()->pixmap(TitleBarTile, active, isToolWindow()) );
|
||||
|
||||
painter.setFont(s_titleFont);
|
||||
QPoint tp(1, captionHeight-1);
|
||||
QPoint tp(1, captionHeight - 3);
|
||||
if(Handler()->titleShadow())
|
||||
{
|
||||
QColor shadowColor;
|
||||
|
|
|
@ -247,13 +247,13 @@ void QuartzHandler::readConfig()
|
|||
borderWidth = extraSlim?2:4;
|
||||
}
|
||||
|
||||
normalTitleHeight = QFontMetrics(options()->font(true)).height();
|
||||
normalTitleHeight = QFontMetrics(options()->font(true)).height() - 2;
|
||||
int nTH_limit=extraSlim?14:18;
|
||||
normalTitleHeight = QFontMetrics(options()->font(true)).height()-(extraSlim?1:0);
|
||||
if (normalTitleHeight < nTH_limit) normalTitleHeight = nTH_limit;
|
||||
if (normalTitleHeight < borderWidth) normalTitleHeight = borderWidth;
|
||||
|
||||
toolTitleHeight = QFontMetrics(options()->font(true, true)).height();
|
||||
toolTitleHeight = QFontMetrics(options()->font(true, true)).height() - 2;
|
||||
if (toolTitleHeight < 12) toolTitleHeight = 12;
|
||||
if (toolTitleHeight < borderWidth) toolTitleHeight = borderWidth;
|
||||
}
|
||||
|
@ -342,18 +342,18 @@ void QuartzHandler::createPixmaps()
|
|||
g2 = options()->palette( ColorButtonBg, true );
|
||||
g2.setCurrentColorGroup( QPalette::Active );
|
||||
|
||||
pinUpPix = new QPixmap(16, 16);
|
||||
p.begin( pinUpPix );
|
||||
QImage pinImg = QImage(16, 16, QImage::Format_ARGB32_Premultiplied);
|
||||
p.begin(&pinImg);
|
||||
p.fillRect( 0, 0, 16, 16, c);
|
||||
drawColorBitmaps( &p, g2, 0, 1, 16, 16, pinup_white_bits, pinup_gray_bits, pinup_dgray_bits );
|
||||
p.end();
|
||||
pinUpPix = new QPixmap(QPixmap::fromImage(pinImg));
|
||||
|
||||
pinDownPix = new QPixmap(16, 16);
|
||||
p.begin( pinDownPix );
|
||||
p.begin(&pinImg);
|
||||
p.fillRect( 0, 0, 16, 16, c);
|
||||
drawColorBitmaps( &p, g2, 0, 1, 16, 16, pindown_white_bits, pindown_gray_bits, pindown_dgray_bits );
|
||||
p.end();
|
||||
|
||||
pinDownPix = new QPixmap(QPixmap::fromImage(pinImg));
|
||||
|
||||
// Inactive pins
|
||||
g = options()->palette( onAllDesktopsButtonOnLeft ? ColorTitleBar : ColorTitleBlend, false );
|
||||
|
@ -362,17 +362,17 @@ void QuartzHandler::createPixmaps()
|
|||
g2 = options()->palette( ColorButtonBg, false );
|
||||
g2.setCurrentColorGroup( QPalette::Active );
|
||||
|
||||
ipinUpPix = new QPixmap(16, 16);
|
||||
p.begin( ipinUpPix );
|
||||
p.begin(&pinImg);
|
||||
p.fillRect( 0, 0, 16, 16, c);
|
||||
drawColorBitmaps( &p, g2, 0, 1, 16, 16, pinup_white_bits, pinup_gray_bits, pinup_dgray_bits );
|
||||
p.end();
|
||||
ipinUpPix = new QPixmap(QPixmap::fromImage(pinImg));
|
||||
|
||||
ipinDownPix = new QPixmap(16, 16);
|
||||
p.begin( ipinDownPix );
|
||||
p.begin(&pinImg);
|
||||
p.fillRect( 0, 0, 16, 16, c);
|
||||
drawColorBitmaps( &p, g2, 0, 1, 16, 16, pindown_white_bits, pindown_gray_bits, pindown_dgray_bits );
|
||||
p.end();
|
||||
ipinDownPix = new QPixmap(QPixmap::fromImage(pinImg));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -462,9 +462,9 @@ void RedmondDeco::init()
|
|||
{
|
||||
// Finally, toolwindows look small
|
||||
if ( isToolWindow() ) {
|
||||
titleHeight = toolTitleHeight+2;
|
||||
titleHeight = toolTitleHeight;
|
||||
} else {
|
||||
titleHeight = normalTitleHeight+2;
|
||||
titleHeight = normalTitleHeight;
|
||||
}
|
||||
|
||||
KCommonDecoration::init();
|
||||
|
|
Loading…
Reference in New Issue