[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/artwork/Oxygen/style/code
From: Casper Boemann <cbr () boemann ! dk>
Date: 2007-06-08 14:56:41
Message-ID: 1181314601.442343.18792.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 672957 by boemann:
various size adjustments
M +2 -1 drawcontrol.cpp
M +1 -1 drawprimitive.cpp
M +1 -1 pixelmetric.cpp
M +3 -2 qsubcmetrics.cpp
M +6 -4 sizefromcontents.cpp
--- trunk/playground/artwork/Oxygen/style/code/drawcontrol.cpp #672956:672957
@@ -824,6 +824,7 @@
(menuItem->checkType != QStyleOptionMenuItem::NotCheckable);
bool checked = checkable && menuItem->checked;
+
if (selected && isEnabled)
fillWithMask(painter, RECT,
gradient(bg, RECT.height(), Qt::Vertical, config.gradient),
@@ -946,7 +947,7 @@
case CE_MenuEmptyArea: // The area in a menu without menu items
case CE_MenuHMargin: // The horizontal extra space on the left/right of a menu
case CE_MenuVMargin: { // The vertical extra space on the top/bottom of a menu
-// QPalette::ColorRole role = QPalette::Window;
+// QPalette::ColorRole role = QPalette::Background;
// if (widget)
// role = qobject_cast<const QComboBox*>(widget) ?
// QPalette::WindowText : widget->backgroundRole();
--- trunk/playground/artwork/Oxygen/style/code/drawprimitive.cpp #672956:672957
@@ -279,7 +279,7 @@
QColor c = btnFgColor(PAL, isEnabled, hover||hasFocus);
painter->save();
painter->setRenderHint(QPainter::Antialiasing);
- QRect r = RECT.adjusted(dpi.$6,dpi.$5,-dpi.$6,-dpi.$7);
+ QRect r = RECT.adjusted(dpi.$6,dpi.$6,-dpi.$6,-dpi.$6);
const QPixmap &fill = gradient(c, r.height(), Qt::Vertical, \
config.gradBtn); switch (config.checkType) {
case 0: {
--- trunk/playground/artwork/Oxygen/style/code/pixelmetric.cpp #672956:672957
@@ -52,7 +52,7 @@
if (widget && qobject_cast<const QFrame*>(widget) &&
static_cast<const QFrame*>(widget)->frameShape() == QFrame::StyledPanel &&
!widget->inherits("QTextEdit"))
- return 0;
+ return dpi.$1;
#warning stupid idea?
return dpi.$1;
case PM_SpinBoxFrameWidth: // Frame width of a spin box, defaults to \
PM_DefaultFrameWidth
--- trunk/playground/artwork/Oxygen/style/code/qsubcmetrics.cpp #672956:672957
@@ -53,9 +53,10 @@
case SC_SpinBoxEditField: {
int hfw = 0, vfw = 0;
if (spinbox->frame) {
- hfw = dpi.$4; vfw = dpi.$1;
+ hfw = dpi.$3; vfw = dpi.$1;
}
- ret = QRect(hfw, vfw, x-dpi.$1, spinbox->rect.height() - 2*vfw);
+ // in next line -1 and +2 is too offset some qt weirdness so spinbox and \
linedit have same height + ret = QRect(hfw, vfw-1, x-dpi.$1, \
spinbox->rect.height() - 2*vfw + 2); break;
}
case SC_SpinBoxFrame:
--- trunk/playground/artwork/Oxygen/style/code/sizefromcontents.cpp #672956:672957
@@ -1,6 +1,6 @@
/***************************************************************************
- * Copyright (C) 2006-2007 by Thomas L�bking *
- * thomas.luebking@web.de *
+ * Copyright (C) 2006-2007 by Thomas L�bking thomas.luebking@web.de
+ * Copyright (C) 2007 by Casper Boemann cbr@boemann.dk
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -37,8 +37,10 @@
case CT_ComboBox: // A combo box, like QComboBox
if (const QStyleOptionComboBox *cb =
qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
- int margin = cb->frame ? dpi.$3 : 0;
- int hgt = contentsSize.height() + 2*margin;
+ int hgt = contentsSize.height() - dpi.$1;
+ if(!cb->editable)
+ hgt += 2*dpi.$3;
+
return QSize(contentsSize.width()+dpi.$10+(int)(hgt/1.1), hgt);
}
// case CT_DialogButtons: //
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic