diff -Nru kde-style-skulpture-0.2.2/debian/changelog kde-style-skulpture-0.2.3/debian/changelog --- kde-style-skulpture-0.2.2/debian/changelog 2009-06-14 04:36:08.000000000 +0100 +++ kde-style-skulpture-0.2.3/debian/changelog 2009-06-14 04:36:08.000000000 +0100 @@ -1,3 +1,10 @@ +kde-style-skulpture (0.2.3-0ubuntu1) karmic; urgency=low + + * New upstream release + * Update copyrite, all files GPL-3 + + -- Steve Stalcup Sat, 13 Jun 2009 23:21:59 -0400 + kde-style-skulpture (0.2.2-0ubuntu1) jaunty; urgency=low * New upstream release diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/debian/control /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/debian/control --- kde-style-skulpture-0.2.2/debian/control 2009-06-14 04:36:08.000000000 +0100 +++ kde-style-skulpture-0.2.3/debian/control 2009-06-14 04:36:08.000000000 +0100 @@ -4,7 +4,7 @@ Maintainer: Richard A. Johnson Build-Depends: cdbs (>= 0.4.51), debhelper (>= 7), cmake (>= 2.6.2), libqt4-dev (>= 4.4.0~), kdebase-workspace-dev (>= 4:4.1.3), pkg-kde-tools -Standards-Version: 3.8.0 +Standards-Version: 3.8.1 Homepage: http://skulpture.maxiom.de Package: kde-style-skulpture diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/debian/copyright /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/debian/copyright --- kde-style-skulpture-0.2.2/debian/copyright 2009-06-14 04:36:08.000000000 +0100 +++ kde-style-skulpture-0.2.3/debian/copyright 2009-06-14 04:36:08.000000000 +0100 @@ -9,10 +9,8 @@ Copyright: - Copyright (C) 2007-2008 Christoph Feck - Copyright (C) 2001 Karol Szwed - -All files except for kwin-client/config/kwin_skulpture_config.cpp are GPLv3. + Copyright © 2007-2008 Christoph Feck + Copyright © 2001 Karol Szwed License: @@ -32,25 +30,5 @@ The full text of the GNU General Public License version 3 is available on Debian systems in /usr/share/common-licenses/GPL-3. -kwin-client/config/kwin_skulpture_config.cpp is licensed GPL 2 -License: - - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - -The Debian packaging is (C) 2008, Richard A. Johnson +The Debian packaging is © 2008, Richard A. Johnson and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/INSTALL /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/INSTALL --- kde-style-skulpture-0.2.2/INSTALL 2008-12-29 05:15:11.000000000 +0000 +++ kde-style-skulpture-0.2.3/INSTALL 2009-01-11 17:26:57.000000000 +0000 @@ -3,7 +3,7 @@ *** Installation *** Installation from source requires CMake. To install, type the following at -the shell prompt within the "skulpture-0.2.2" directory, including the +the shell prompt within the "skulpture-0.2.3" directory, including the dot. Note that you are prompted for the root password during installation. sh install.sh diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/NEWS /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/NEWS --- kde-style-skulpture-0.2.2/NEWS 2009-01-04 01:39:09.000000000 +0000 +++ kde-style-skulpture-0.2.3/NEWS 2009-05-28 14:24:33.000000000 +0100 @@ -1,3 +1,26 @@ +New in 0.2.3: + + Bugfixes: + * fixed ToolButton with menu (Qt 4.5) + * fixed detection of Dolphin InformationPanel (KDE 4.3) + * fixed rendering of transparent gradients (Qt 4.5) + * fixed black frame in KRunner LineEdit + * fixed MDI title shadow with raster graphics system (Qt 4.5.0 bug) + * fixed ButtonMargin pixel metric regression + * fixed menus not working after hovering menu titles + * fixed focus rendering on menu titles + * fixed corner buttons on document mode TabBar (Qt 4.5) + * fixed shortcut underlines in preview (KDE 4.3) + * fixed Esc key clearing preview window + * fixed corner buttons on "south" TabWidget (Konversation) + * fixed eliding of tabs in small TabBar + * fixed disabled ToolButton in inactive windows + * fixed "south" document mode tabs (Konsole 4.3) + * fixed Dial tickmarks (Qt 4.6) + * fixed right shadow on frameless spinbox + * fixed a few build warnings + + New in 0.2.2: New Style Configuration Options: diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/README /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/README --- kde-style-skulpture-0.2.2/README 2009-01-05 01:20:13.000000000 +0000 +++ kde-style-skulpture-0.2.3/README 2009-05-28 14:22:49.000000000 +0100 @@ -22,7 +22,7 @@ *** Version Information *** -This is version 0.2.2 of Skulpture, released on 05-Jan-2009. See NEWS for +This is version 0.2.3 of Skulpture, released on 28-May-2009. See NEWS for a summary of changes relative to the previous version, and NOTES for additional information for this version. Some features are still missing; see BUGS for details. diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/README.html /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/README.html --- kde-style-skulpture-0.2.2/README.html 2009-01-05 01:20:29.000000000 +0000 +++ kde-style-skulpture-0.2.3/README.html 2009-05-28 14:23:09.000000000 +0100 @@ -7,7 +7,7 @@

About Skulpture

-Skulpture is a GUI style addon for Qt 4.1 or newer. It features a classical +Skulpture is a GUI style addon for Qt 4.1 or newer. It features a classical three-dimensional artwork with shadows and smooth gradients to enhance the visual experience.

@@ -27,7 +27,7 @@

Version Information

-This is version 0.2.2 of Skulpture, released on 05-Jan-2009. See NEWS for +This is version 0.2.3 of Skulpture, released on 28-May-2009. See NEWS for a summary of changes relative to the previous version, and NOTES for additional information for this version. Some features are still missing; see BUGS for details. diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/src/config/sk_config.cpp /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/src/config/sk_config.cpp --- kde-style-skulpture-0.2.2/src/config/sk_config.cpp 2009-01-02 04:18:59.000000000 +0000 +++ kde-style-skulpture-0.2.3/src/config/sk_config.cpp 2009-03-27 01:56:49.000000000 +0000 @@ -38,6 +38,7 @@ #include #include #include +#include #include @@ -257,7 +258,7 @@ void SkulptureStyleConfig::init() { - aboutData = new KAboutData("skulpture", 0, ki18n("Sculpture"), "0.2.2", + aboutData = new KAboutData("skulpture", 0, ki18n("Sculpture"), "0.2.3", ki18n("Three-dimensional classical artwork."), #if KDE_IS_VERSION(4,1,0) KAboutData::License_GPL_V3, @@ -387,10 +388,17 @@ #else mdiArea->hide(); #endif + KAcceleratorManager::manage(this); configManager.connectConfigChanged(this, SLOT(updateChanged())); } +void SkulptureStyleConfig::showEvent(QShowEvent *) +{ + cm_General_TextShift->setFocus(Qt::ActiveWindowFocusReason); +} + + QSize SkulptureStyleConfig::sizeHint() const { return QSize(570, 0); diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/src/config/sk_config.h /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/src/config/sk_config.h --- kde-style-skulpture-0.2.2/src/config/sk_config.h 2008-12-29 19:16:12.000000000 +0000 +++ kde-style-skulpture-0.2.3/src/config/sk_config.h 2009-03-27 01:58:12.000000000 +0000 @@ -59,6 +59,9 @@ private Q_SLOTS: void subWindowActivated(QMdiSubWindow *window); + protected: + void showEvent(QShowEvent *); + private: void init(); diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/src/config/sk_dialog.ui /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/src/config/sk_dialog.ui --- kde-style-skulpture-0.2.2/src/config/sk_dialog.ui 2009-01-04 01:27:25.000000000 +0000 +++ kde-style-skulpture-0.2.3/src/config/sk_dialog.ui 2009-03-23 16:39:40.000000000 +0000 @@ -757,12 +757,6 @@ - - - 50 - false - - Progress Bars diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/src/config/sk_preview1.ui /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/src/config/sk_preview1.ui --- kde-style-skulpture-0.2.2/src/config/sk_preview1.ui 2008-12-29 05:10:21.000000000 +0000 +++ kde-style-skulpture-0.2.3/src/config/sk_preview1.ui 2009-03-15 21:07:41.000000000 +0000 @@ -20,6 +20,9 @@ false + + false + @@ -81,6 +84,9 @@ Push Button + + false + @@ -264,7 +270,7 @@ <tr> <td style="border: none;"> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt; font-weight:600;">Skulpture</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"><span style=" font-weight:400;">Version 0.2.2</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"><span style=" font-weight:400;">Version 0.2.3</span></p> <p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://skulpture.maxiom.de/"><span style=" text-decoration: underline; color:#0057ae;">http://skulpture.maxiom.de/</span></a></p> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Copyright © 2007-2009 Christoph Feck</span></p> diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/src/config/sk_preview2.ui /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/src/config/sk_preview2.ui --- kde-style-skulpture-0.2.2/src/config/sk_preview2.ui 2008-12-29 05:11:09.000000000 +0000 +++ kde-style-skulpture-0.2.3/src/config/sk_preview2.ui 2009-01-11 17:15:57.000000000 +0000 @@ -17,7 +17,7 @@ <tr> <td style="border: none;"> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt; font-weight:600;">Skulpture</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"><span style=" font-weight:400;">Version 0.2.2</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"><span style=" font-weight:400;">Version 0.2.3</span></p> <p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://skulpture.maxiom.de/"><span style=" text-decoration: underline; color:#0057ae;">http://skulpture.maxiom.de/</span></a></p> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Copyright © 2007-2009 Christoph Feck</span></p> diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/src/skulpture.cpp /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/src/skulpture.cpp --- kde-style-skulpture-0.2.2/src/skulpture.cpp 2009-01-05 01:22:03.000000000 +0000 +++ kde-style-skulpture-0.2.3/src/skulpture.cpp 2009-05-28 14:43:20.000000000 +0100 @@ -615,7 +615,8 @@ d->polishLayout(layout); } } - if (!qstrcmp(widget->metaObject()->className(), "InfoSidebarPage")) { + if (!qstrcmp(widget->metaObject()->className(), "InfoSidebarPage") + || !qstrcmp(widget->metaObject()->className(), "InformationPanel")) { widget->installEventFilter(d); } #if 0//(QT_VERSION >= QT_VERSION_CHECK(4, 5, 0)) @@ -629,6 +630,9 @@ connect(widget, SIGNAL(tabCloseRequested(int)), widget, SIGNAL(closeRequest(int))); } #endif + if (d->visualizeLayouts) { + widget->installEventFilter(d); + } ParentStyle::polish(widget); } @@ -636,6 +640,9 @@ void SkulptureStyle::unpolish(QWidget *widget) { ParentStyle::unpolish(widget); + if (d->visualizeLayouts) { + widget->removeEventFilter(d); + } // return; if (qobject_cast(widget) || qobject_cast(widget) @@ -788,7 +795,8 @@ if ((QWidget *) d->oldEdit == widget) { d->oldEdit = 0; } - if (!qstrcmp(widget->metaObject()->className(), "InfoSidebarPage")) { + if (!qstrcmp(widget->metaObject()->className(), "InfoSidebarPage") + || !qstrcmp(widget->metaObject()->className(), "InformationPanel")) { widget->removeEventFilter(d); } if (qobject_cast(widget)) { @@ -836,6 +844,47 @@ } +static void visualizeLayoutSpacing(QLayout *layout, QPainter *painter) +{ + layout->activate(); + QColor color; + int spacing = -1; +#if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) + if (QFormLayout *formLayout = qobject_cast(layout)) { + spacing = formLayout->spacing(); + } else +#endif + if (QGridLayout *gridLayout = qobject_cast(layout)) { + spacing = gridLayout->spacing(); + } else if (QBoxLayout *boxLayout = qobject_cast(layout)) { + spacing = boxLayout->spacing(); + } else { + spacing = layout->spacing(); + } + if (spacing == 0) { + color = Qt::green; + } else if (spacing > 0) { + color = Qt::red; + } + if (color.isValid()) { + color.setAlpha(30); + painter->fillRect(layout->geometry(), color); + } else { + painter->setPen(QColor(0, 150, 0, 50)); + painter->drawRect(layout->geometry().adjusted(0, 0, -1, -1)); + } + if (qobject_cast(layout)) { + painter->setPen(QColor(200, 0, 0, 150)); + painter->drawRect(layout->geometry().adjusted(0, 0, -1, -1)); + } + for (int i = 0; i < layout->count(); ++i) { + if (QLayout *childLayout = layout->itemAt(i)->layout()) { + visualizeLayoutSpacing(childLayout, painter); + } + } +} + + bool SkulptureStyle::Private::eventFilter(QObject *watched, QEvent *event) { #if 0 @@ -938,6 +987,40 @@ #endif } #endif +#if 1 + if (visualizeLayouts) { + if (!widget->font().isCopyOf(QApplication::font())) { + if (widget->font() == QApplication::font()) { + QPainter painter(widget); + painter.fillRect(widget->rect(), QColor(255, 0, 0, 200)); + } + } + if (!widget->palette().isCopyOf(QApplication::palette())) { + if (true/*widget->palette() == QApplication::palette()*/) { + QPainter painter(widget); + painter.fillRect(widget->rect(), QColor(0, 200, 255, 200)); + } + } + if (!widget->styleSheet().isEmpty()) { + QPainter painter(widget); + painter.fillRect(widget->rect(), QColor(255, 0, 255, 100)); + } + if (QLayout *layout = widget->layout()) { + if (!(qobject_cast(widget))) { + // explicitely check public layout classes, QMainWindowLayout doesn't work here + if (qobject_cast(layout) +#if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) + || qobject_cast(layout) +#endif + || qobject_cast(layout) + || qobject_cast(layout)) { + QPainter painter(widget); + visualizeLayoutSpacing(layout, &painter); + } + } + } + } +#endif #if 0 if (QDialog *dialog = qobject_cast(widget)) { QPainter painter(dialog); @@ -979,7 +1062,8 @@ // the subwidgets are placed at the edges. } #endif - if (!qstrcmp(widget->metaObject()->className(), "InfoSidebarPage")) { + if (!qstrcmp(widget->metaObject()->className(), "InfoSidebarPage") + || !qstrcmp(widget->metaObject()->className(), "InformationPanel")) { QPainter painter(widget); paintThinFrame(&painter, widget->rect().adjusted(0, 0, 0, 0), widget->palette(), 60, -20); paintThinFrame(&painter, widget->rect().adjusted(1, 1, -1, -1), widget->palette(), -20, 60); @@ -1355,6 +1439,8 @@ static QBrush button_gradient(const QRectF &rect, const QColor &color, const QStyleOptionButton *option) { + Q_UNUSED(option); + qreal ch = color.hueF(); qreal cs = color.saturationF() * 1.0; qreal cv = color.valueF() * 1.0; @@ -1600,12 +1686,7 @@ } button.QStyleOption::operator=(*option); button.features = QStyleOptionButton::None; -// button.state &= ~(QStyle::State_Sunken | QStyle::State_Selected | QStyle::State_On); - // ### qtconfig creates its color select buttons as disabled... - // ### the same is done in for TitleBar buttons - if (button.state == QStyle::State_Sunken || button.state == QStyle::State_Raised) { - button.state |= QStyle::State_Enabled; - } else if (!(button.state & QStyle::State_Enabled) && (option->state & QStyle::State_AutoRaise)) { + if (!(button.state & QStyle::State_Enabled) && (option->state & QStyle::State_AutoRaise)) { return; } // ### don't know if tool buttons should have that big frame... @@ -2255,6 +2336,9 @@ int gray = qGray(r, g, b); gray = qMax(r, qMax(g, b)); gray = (r + b + g + 3 * gray) / 6; + if (color.alpha() == 0) { + gray = 200; + } if (shade < 0) { qreal k = 220.0 / 255.0 * shade; k *= contrast; @@ -2803,6 +2887,11 @@ opt.rect.setWidth(opt.rect.width() & ~1); opt.rect.setHeight(opt.rect.height() & ~1); ((QCommonStyle *) style)->QCommonStyle::drawComplexControl(QStyle::CC_Dial, &opt, painter, widget); + if (qstrcmp(qVersion(), "4.6") >= 0) { + opt.rect.setWidth((opt.rect.width() & ~1) - 1); + opt.rect.setHeight((opt.rect.height() & ~1) - 1); + opt.rect.translate(1, 1); + } // focus rectangle if (option->state & QStyle::State_HasFocus) { @@ -3549,7 +3638,7 @@ paintThinFrame(painter, option->rect, option->palette, 60, -20); paintThinFrame(painter, option->rect.adjusted(1, 1, -1, -1), option->palette, -20, 60); QLinearGradient panelGradient(option->rect.topLeft(), option->rect.bottomLeft()); - panelGradient.setColorAt(0.6, QColor(0, 0, 0, 0)); + panelGradient.setColorAt(0.6, QColor(255, 255, 255, 0)); panelGradient.setColorAt(1.0, shaded_color(option->palette.color(QPalette::Window), 70)); painter->fillRect(option->rect.adjusted(2, 2, -2, -2), panelGradient); } else { @@ -3794,8 +3883,7 @@ } parentFrameWidth = style->pixelMetric(QStyle::PM_SpinBoxFrameWidth, option, widget); } - // FIXME use correct right adjustment - paintRecessedFrameShadow(painter, option->rect.adjusted(parentFrameWidth - left, 0, 100, 0), option->rect.height() <= 64 ? RF_Small : RF_Small); + paintRecessedFrameShadow(painter, option->rect.adjusted(parentFrameWidth - left, 0, widget->parentWidget()->geometry().width() - right - parentFrameWidth - 1, 0), option->rect.height() <= 64 ? RF_Small : RF_Small); } } @@ -4275,67 +4363,6 @@ }; -static QPainterPath growPath(const QPainterPath &path, double offset, Qt::PenJoinStyle style = Qt::MiterJoin) -{ - QPainterPathStroker stroker; - QPainterPath path2; - QPainterPath res; - bool add; - - if (offset > 0) { - stroker.setWidth(2.0 * offset); - add = false; - } else if (offset < 0) { - stroker.setWidth(-2.0 * offset); - add = true; - } else { - return path; - } - stroker.setCapStyle(Qt::FlatCap); - stroker.setJoinStyle(style); - stroker.setDashPattern(Qt::SolidLine); - stroker.setCurveThreshold(0.1); - path2 = stroker.createStroke(path); - - for (int i = 0; i < path2.elementCount(); ++i) { - const QPainterPath::Element &element = path2.elementAt(i); - switch (element.type) - { - case QPainterPath::MoveToElement: - // copy every other subpath, extracting either inner or outer winding. - add = !add; - if (add) { - res.moveTo(element.x, element.y); - } - break; - case QPainterPath::LineToElement: - if (add) { - res.lineTo(element.x, element.y); - } - break; - case QPainterPath::CurveToElement: { - const QPainterPath::Element &element1 = path2.elementAt(++i); - const QPainterPath::Element &element2 = path2.elementAt(++i); - if (add) { - res.cubicTo(element.x, element.y, element1.x, element1.y, element2.x, element2.y); - } - break; - } - case QPainterPath::CurveToDataElement: - break; - } - } - res.setFillRule(Qt::WindingFill); -#if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) - res = res.simplified(); -#endif - if (offset < 0) { - return res.toReversed(); - } - return res; -} - - QIcon SkulptureStyle::standardIconImplementation(QStyle::StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const { const ShapeFactory::Code *code = 0; @@ -4420,14 +4447,6 @@ } else { glowColor.setAlpha(50); } -#if 0 - painter.setBrush(glowColor); - QPainterPath path = ShapeFactory::createShape(code); - path = growPath(path, 0.15); - painter.drawPath(path); - filterImage(image, 0.9); - shapeColor = palette.color(role); -#else painter.fillRect(QRectF(-1.5, -1.5, 3, 3), glowColor); QPainterPath path = ShapeFactory::createShape(code); shapeColor = palette.color(role); @@ -4436,7 +4455,6 @@ painter.setPen(Qt::NoPen); painter.setBrush(shapeColor); painter.drawPath(path); -#endif } else { shapeColor = palette.color(role); } @@ -4493,32 +4511,6 @@ /* - * skulpture_kde4.cpp - * - */ - -#include "skulpture_p.h" -#include "config.h" - -#if KDE4_FOUND -/*-----------------------------------------------------------------------*/ - -QVariant readKdeSetting(const QString &entry) -{ - return QVariant(); -} - -#else -/*-----------------------------------------------------------------------*/ - -QVariant readKdeSetting(const QString &entry) -{ - return QVariant(); -} - -#endif - -/* * skulpture_layout.cpp * */ @@ -4582,7 +4574,7 @@ { switch (metric) { /* entries are stricly sorted in Qt order for future lookup table */ - case PM_ButtonMargin: return d->pushButtonSize; + case PM_ButtonMargin: return 2 * d->pushButtonSize; case PM_ButtonDefaultIndicator: return 0; case PM_MenuButtonIndicator: return fontHeight(option, widget); case PM_ButtonShiftHorizontal: { @@ -4672,7 +4664,7 @@ case PM_DockWidgetFrameWidth: return 2; case PM_TabBarTabOverlap: return 2; - case PM_TabBarTabHSpace: return 0; + case PM_TabBarTabHSpace: return 2 * d->tabBarSize + (fontHeight(option, widget) & ~1); case PM_TabBarTabVSpace: return 0; case PM_TabBarBaseHeight: return 2; case PM_TabBarBaseOverlap: return 2; @@ -4969,12 +4961,12 @@ Q_UNUSED(widget); Q_UNUSED(style); if (int(option->shape) & 2) { - return (contentsSize + QSize(8, 24)).expandedTo(QApplication::globalStrut()); + return (contentsSize + QSize(4 + 2 * tabBarSize, 0)).expandedTo(QApplication::globalStrut()); } if (!option->icon.isNull()) { textShift = 0; } - return (contentsSize + QSize(2 * tabBarSize + (fontHeight(option, widget) & ~1), 2 + 2 * tabBarSize + (textShift & 1))).expandedTo(QApplication::globalStrut()); + return (contentsSize + QSize(0, 2 + 2 * tabBarSize + (textShift & 1))).expandedTo(QApplication::globalStrut()); } @@ -5194,6 +5186,14 @@ break; case SE_TabWidgetLeftCorner: case SE_TabWidgetRightCorner: + if (option->type == QStyleOption::SO_TabWidgetFrame) { + if (((const QStyleOptionTabWidgetFrame *) option)->lineWidth == 0) { + break; + } + if ((((const QStyleOptionTabWidgetFrame *) option)->shape & 3) == 1) { + return QCommonStyle::subElementRect(element, option, widget).adjusted(1, -1, -1, -1); + } + } return QCommonStyle::subElementRect(element, option, widget).adjusted(1, 1, -1, 1); #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) @@ -5259,6 +5259,10 @@ case SE_ShapedFrameContents: break; #endif +#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)) + case SE_ToolBarHandle: + break; +#endif case SE_CustomBase: // avoid warning break; } @@ -5548,7 +5552,7 @@ #elif 1 labelGradient.setColorAt(0.0, QColor(255, 255, 255, 10)); labelGradient.setColorAt(0.5, QColor(255, 255, 255, 40)); - labelGradient.setColorAt(0.55, QColor(0, 0, 0, 0)); + labelGradient.setColorAt(0.55, QColor(255, 255, 255, 0)); labelGradient.setColorAt(1.0, QColor(255, 255, 255, 20)); #else labelGradient.setColorAt(0.0, QColor(0, 0, 0, 30)); @@ -5609,10 +5613,12 @@ labelRect = style->subControlRect(QStyle::CC_TitleBar, option, QStyle::SC_TitleBarLabel, widget); } #if (QT_VERSION >= QT_VERSION_CHECK(4, 2, 0)) - painter->setOpacity(opacity * 0.1); - painter->setPen(Qt::black); + painter->setOpacity(opacity); +#endif + painter->setPen(QColor(0, 0, 0, 25)); style->drawItemText(painter, labelRect.adjusted(1, 1, 1, 1), Qt::AlignLeft | Qt::AlignVCenter | Qt::TextSingleLine, option->palette, true, option->text, QPalette::NoRole); //painter->drawText(labelRect.adjusted(1, 1, 1, 1), Qt::AlignLeft | Qt::AlignVCenter | Qt::TextSingleLine, option->text); +#if (QT_VERSION >= QT_VERSION_CHECK(4, 2, 0)) painter->setOpacity(option->state & QStyle::State_Active ? opacity : 0.7 * opacity); #endif painter->setPen(textColor); @@ -6050,7 +6056,7 @@ const QPalette::ColorRole bgrole = QPalette::Window; QColor bgcolor = option->palette.color(bgrole); QStyleOptionToolButton opt = *option; - opt.state &= ~(QStyle::State_Sunken | QStyle::State_On | QStyle::State_Selected); + opt.state &= ~(QStyle::State_Sunken | QStyle::State_On | QStyle::State_Selected | QStyle::State_HasFocus); // Qt 4.x has a bug where the option->rect is one pixel too wide opt.rect.adjust(0, 0, -1, 0); opt.palette.setColor(QPalette::ButtonText, option->palette.color(QPalette::WindowText)); @@ -6106,10 +6112,12 @@ action = menu->actionAt(eventPos); #if (QT_VERSION >= QT_VERSION_CHECK(4, 2, 0)) if (QWidgetAction * widgetAction = qobject_cast(action)) { - if (widgetAction->defaultWidget()) { - action = 0; + if (!widgetAction->defaultWidget()) { + if (action->menu()) { + menuAction = action; + } } - } + } else #endif if (action && action->menu()) { menuAction = action; @@ -6624,7 +6632,7 @@ qreal progress = qreal(option->progress - option->minimum) / (option->maximum - option->minimum); if (option->version >= 2 && option->orientation == Qt::Vertical) { if (contentsCentered) { - int adjustment = (contentsRect.height() / 2) * (1.0 - progress); + int adjustment = int((contentsRect.height() / 2) * (1 - progress)); contentsRect.adjust(0, adjustment, 0, -adjustment); } else { int contentsHeight = qMax(1, int(contentsRect.height() * progress + 0.5)); @@ -6636,7 +6644,7 @@ } } else { if (contentsCentered) { - int adjustment = (contentsRect.width() / 2) * (1.0 - progress); + int adjustment = int((contentsRect.width() / 2) * (1 - progress)); contentsRect.adjust(adjustment, 0, -adjustment, 0); } else { int contentsWidth = qMax(1, int(contentsRect.width() * progress + 0.5)); @@ -6825,7 +6833,7 @@ int m = QTime(0, 0).msecsTo(QTime::currentTime()) / (animationSpeed / chunkWidth); QPoint startPoint = contentsCentered ? contentsRect.topLeft() : contentsRect.center(); startPoint += vertical ? QPoint(0, chunkWidth - 1 - m % chunkWidth) : QPoint(m % chunkWidth, 0); - QLinearGradient fillGradient(startPoint, startPoint + (vertical ? QPoint(0, chunkWidth) : QPoint(chunkWidth, chunkWidth * sin(gradientAngle * M_PI / 180)))); + QLinearGradient fillGradient(startPoint, startPoint + (vertical ? QPoint(0, chunkWidth) : QPoint(chunkWidth, qRound(chunkWidth * sin(gradientAngle * M_PI / 180))))); fillGradient.setSpread(QGradient::RepeatSpread); const qreal delta = gradientRatio * gradientSharpness * 0.000049999; fillGradient.setColorAt(0.0, fillColor); @@ -6864,10 +6872,13 @@ const int delta = (contentsSize - centerSize) >> 1; const QRect centerRect = vertical ? contentsRect.adjusted(0, delta, 0, -delta) : contentsRect.adjusted(delta, 0, -delta, 0); QLinearGradient centerGradient(centerRect.topLeft(), vertical ? centerRect.bottomLeft() : centerRect.topRight()); - centerGradient.setColorAt(0.0, Qt::transparent); + // ### work around Qt 4.5 bug + QColor transparentCenterColor = centerColor; + transparentCenterColor.setAlpha(0); + centerGradient.setColorAt(0.0, transparentCenterColor); centerGradient.setColorAt(0.4, centerColor); centerGradient.setColorAt(0.6, centerColor); - centerGradient.setColorAt(1.0, Qt::transparent); + centerGradient.setColorAt(1.0, transparentCenterColor); painter->fillRect(centerRect, centerGradient); } break; @@ -8211,7 +8222,7 @@ #if 1 // SkandaleStyle 0.0.2 gradient.setColorAt(0.0, shaded_color(color, 40)); - gradient.setColorAt(0.5, shaded_color(color, -5)); + gradient.setColorAt(0.5, shaded_color(color, 0)); gradient.setColorAt(1.0, shaded_color(color, 70)); #else // glassy @@ -8726,8 +8737,16 @@ /*-----------------------------------------------------------------------*/ -static void paintTabBase(QPainter *painter, const QRect &rect, const QStyleOption *option, QTabBar::Shape shape) +static void paintTabBase(QPainter *painter, const QRect &r, const QStyleOption *option, QTabBar::Shape shape) { + QRect rect = r; +#if (QT_VERSION >= QT_VERSION_CHECK(4, 5, 0)) + if (option->version >= QStyleOptionTabBarBaseV2::Version) { + if (((const QStyleOptionTabBarBaseV2 *) option)->documentMode) { + rect.adjust(-10, 0, 10, 0); + } + } +#endif if (true /*option->state & QStyle::State_Enabled*/) { QLinearGradient tabGradient(rect.topLeft(), isVertical(shape) ? rect.topRight() : rect.bottomLeft()); tabGradient.setColorAt(0.0, option->palette.color(QPalette::Window).darker(118)); @@ -8741,8 +8760,28 @@ } -void paintFrameTabBarBase(QPainter *painter, const QStyleOptionTabBarBase *option) +void paintFrameTabBarBase(QPainter *painter, const QStyleOptionTabBarBase *option, const QWidget *widget) { +#if (QT_VERSION >= QT_VERSION_CHECK(4, 5, 0)) + if (option->version >= QStyleOptionTabBarBaseV2::Version) { + if (((const QStyleOptionTabBarBaseV2 *) option)->documentMode) { + QRect r = option->rect; + if (tabPos(option->shape) == North && r.top() > 0) { + r.setTop(0); + } else if (tabPos(option->shape) == South && qobject_cast(widget) && widget->rect().bottom() != r.bottom()) { + r.setBottom(widget->rect().bottom()); + } else { + return; + } + painter->save(); + painter->setClipRect(r); + paintTabBase(painter, r, option, option->shape); + paintThinFrame(painter, r.adjusted(-10, 0, 10, 0), option->palette, 60, -20); + painter->restore(); + return; + } + } +#endif // ### remove clipping painter->save(); QRect r = option->rect; @@ -8829,13 +8868,16 @@ if (widget && widget->parentWidget()) { if (!qstrcmp(widget->metaObject()->className(), "KTabBar") && !qstrcmp(widget->parentWidget()->metaObject()->className(), "KonqFrameTabs")) { konq = true; - } - } - if (konq || (widget && !(qobject_cast(widget->parentWidget()))) #if (QT_VERSION >= QT_VERSION_CHECK(4, 5, 0)) - || (option->version >= 3 && ((QStyleOptionTabV3 *) option)->documentMode) + if (option->version >= QStyleOptionTabV3::Version) { + if (((const QStyleOptionTabV3 *) option)->documentMode) { + konq = false; + } + } #endif - ) { + } + } + if (konq || (widget && !(qobject_cast(widget->parentWidget())))) { // ### remove clipping painter->save(); painter->setClipRect(option->rect); @@ -9571,6 +9613,9 @@ opt.features = 0; opt.subControls &= ~(QStyle::SC_ToolButtonMenu); opt.activeSubControls &= ~(QStyle::SC_ToolButtonMenu); + if (opt.state & QStyle::State_Sunken) { + opt.state |= QStyle::State_MouseOver; + } if (inVerticalToolBar(option, widget)) { painter->setClipRect(opt.rect.adjusted(0, 0, 0, -1)); } else { @@ -9588,9 +9633,19 @@ if (!(state & QStyle::State_AutoRaise) || (state & QStyle::State_MouseOver)) { state |= QStyle::State_Raised; } - if (option->activeSubControls & QStyle::SC_ToolButtonMenu) { - state |= QStyle::State_Sunken; - } + if (qstrcmp(qVersion(), "4.5") < 0) { + if (option->activeSubControls & QStyle::SC_ToolButtonMenu) { + state |= QStyle::State_Sunken; + } + } else { + if (option->state & QStyle::State_Sunken) { + state |= QStyle::State_Sunken; + } else { + if (!(option->activeSubControls & QStyle::SC_ToolButtonMenu)) { + state &= ~QStyle::State_MouseOver; + } + } + } opt.state = state; if (inVerticalToolBar(option, widget)) { painter->setClipRect(opt.rect.adjusted(0, 1, 0, 0)); @@ -10302,6 +10357,7 @@ makeDisabledWidgetsTransparent = true; transparentPlacesPanel = false; forceSpacingAndMargins = false; + visualizeLayouts = false; useIconColumnForCheckIndicators = false; useSelectionColorForCheckedIndicators = false; useSelectionColorForSelectedMenuItems = false; @@ -10389,6 +10445,7 @@ makeDisabledWidgetsTransparent = s.value(QLatin1String("General/MakeDisabledWidgetsTransparent"), makeDisabledWidgetsTransparent).toBool(); transparentPlacesPanel = s.value(QLatin1String("Views/TransparentPlacesPanel"), transparentPlacesPanel).toBool(); forceSpacingAndMargins = s.value(QLatin1String("Layout/ForceSpacingAndMargins"), forceSpacingAndMargins).toBool(); + visualizeLayouts = s.value(QLatin1String("Layout/VisualizeLayouts"), visualizeLayouts).toBool(); useIconColumnForCheckIndicators = s.value(QLatin1String("Menus/UseIconColumnForCheckIndicators"), useIconColumnForCheckIndicators).toBool(); useSelectionColorForCheckedIndicators = s.value(QLatin1String("General/UseSelectionColorForCheckedIndicators"), useSelectionColorForCheckedIndicators).toBool(); useSelectionColorForSelectedMenuItems = s.value(QLatin1String("Menus/UseSelectionColorForSelectedMenuItems"), useSelectionColorForSelectedMenuItems).toBool(); @@ -10522,7 +10579,7 @@ void paintTabBarTabShape(QPainter *painter, const QStyleOptionTab *option, const QWidget *widget, const QStyle *style); void paintTabBarTabLabel(QPainter *painter, const QStyleOptionTab *option, const QWidget *widget, const QStyle *style); -void paintFrameTabBarBase(QPainter *painter, const QStyleOptionTabBarBase *option); +void paintFrameTabBarBase(QPainter *painter, const QStyleOptionTabBarBase *option, const QWidget *widget); #if (QT_VERSION >= QT_VERSION_CHECK(4, 3, 0)) void paintToolBoxTabShape(QPainter *painter, const QStyleOptionToolBoxV2 *option); void paintToolBoxTabLabel(QPainter *painter, const QStyleOptionToolBox *option, const QWidget *widget, const QStyle *style); diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/src/skulpture_p.h /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/src/skulpture_p.h --- kde-style-skulpture-0.2.2/src/skulpture_p.h 2009-01-04 01:16:59.000000000 +0000 +++ kde-style-skulpture-0.2.3/src/skulpture_p.h 2009-03-24 02:14:52.000000000 +0000 @@ -123,6 +123,7 @@ bool makeDisabledWidgetsTransparent; bool transparentPlacesPanel; bool forceSpacingAndMargins; + bool visualizeLayouts; bool useIconColumnForCheckIndicators; bool useSelectionColorForCheckedIndicators; bool useSelectionColorForSelectedMenuItems; diff -Nru /tmp/FWZ4mjEgDX/kde-style-skulpture-0.2.2/VERSION /tmp/e4ESN7ipVP/kde-style-skulpture-0.2.3/VERSION --- kde-style-skulpture-0.2.2/VERSION 2009-01-02 04:09:13.000000000 +0000 +++ kde-style-skulpture-0.2.3/VERSION 2009-05-28 14:21:50.000000000 +0100 @@ -1 +1 @@ -0.2.2 +0.2.3