summaryrefslogtreecommitdiff
path: root/noncore/styles
authorsandman <sandman>2002-10-24 01:21:24 (UTC)
committer sandman <sandman>2002-10-24 01:21:24 (UTC)
commitf09549e37fee6decd56168043209e8051b8757fb (patch) (side-by-side diff)
treecfcfc40bfca40df380489829ab5b88cff91d1fee /noncore/styles
parent36e13db0a1d44abd5a160a34e4679b90d62826c7 (diff)
downloadopie-f09549e37fee6decd56168043209e8051b8757fb.zip
opie-f09549e37fee6decd56168043209e8051b8757fb.tar.gz
opie-f09549e37fee6decd56168043209e8051b8757fb.tar.bz2
- "what's this" widget drop shadows are drawn correctly now
- updated the QPL diff
Diffstat (limited to 'noncore/styles') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/liquid/liquid.cpp8
-rw-r--r--noncore/styles/liquid/opie-liquid.diff389
2 files changed, 237 insertions, 160 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp
index eb1ec6e..6812d16 100644
--- a/noncore/styles/liquid/liquid.cpp
+++ b/noncore/styles/liquid/liquid.cpp
@@ -843,7 +843,9 @@ void LiquidStyle::polish(QWidget *w)
}
if(w->inherits("QPopupMenu"))
w->setBackgroundMode(QWidget::NoBackground);
- else if(w-> testWFlags(Qt::WType_Popup) && !w->inherits("QListBox")) {
+ else if(w-> testWFlags(Qt::WType_Popup) &&
+ !w->inherits("QListBox") &&
+ ( qstrcmp ( w-> name(), "automatic what's this? widget" ) != 0 )) {
w->installEventFilter(menuHandler);
}
@@ -944,7 +946,9 @@ void LiquidStyle::unPolish(QWidget *w)
if(w->inherits("QPopupMenu"))
w->setBackgroundMode(QWidget::PaletteButton);
- else if(w-> testWFlags(Qt::WType_Popup) && !w->inherits("QListBox")) {
+ else if(w-> testWFlags(Qt::WType_Popup) &&
+ !w->inherits("QListBox") &&
+ ( qstrcmp ( w-> name(), "automatic what's this? widget" ) != 0 )) {
w->removeEventFilter(menuHandler);
}
diff --git a/noncore/styles/liquid/opie-liquid.diff b/noncore/styles/liquid/opie-liquid.diff
index 90ece90..f3531e5 100644
--- a/noncore/styles/liquid/opie-liquid.diff
+++ b/noncore/styles/liquid/opie-liquid.diff
@@ -3,8 +3,8 @@ Features:
- Qt-only
- works with Qt/E on QPE/OPIE
---- - Sat Sep 21 05:31:47 2002
-+++ liquid.h Mon Jul 15 02:52:50 2002
+--- - 2002-10-24 03:19:30.000000000 +0200
++++ liquid.h 2002-07-15 02:52:50.000000000 +0200
@@ -2,7 +2,7 @@
#define LIQUID_STYLE_H
@@ -110,8 +110,8 @@ Features:
bool highcolor;
QColorGroup radioOnGrp;
QWidget *highlightWidget;
---- - Sat Sep 21 05:31:48 2002
-+++ liquid.cpp Sat Sep 21 05:18:54 2002
+--- - 2002-10-24 03:19:31.000000000 +0200
++++ liquid.cpp 2002-10-24 03:18:15.000000000 +0200
@@ -10,12 +10,10 @@
#include <qmenudata.h>
@@ -122,7 +122,7 @@ Features:
-#include <kdrawutil.h>
-#include <kglobalsettings.h>
-#include <kpixmapeffect.h>
-+#include "liquiddeco.h"
++//#include "liquiddeco.h"
+#include <qapplication.h>
+#include <qpe/config.h>
+#include "effects.h"
@@ -146,10 +146,10 @@ Features:
-#include <kmenubar.h>
-#include <kipc.h>
+#include <qmenubar.h>
++#include <qprogressbar.h>
-#include <X11/X.h>
-#include <X11/Xlib.h>
-+
+#include <stdio.h>
#include "htmlmasks.h"
@@ -229,7 +229,7 @@ Features:
r.width(), r.height());
}
else{ // tear off menu
-@@ -121,82 +122,55 @@
+@@ -121,82 +122,53 @@
stripePixmap(*pix, p->colorGroup().button());
}
else{
@@ -239,18 +239,17 @@ Features:
+
pixDict.insert(p->winId(), pix);
+
-+ if (!p->inherits("QPopupMenu")) {
++ if ( !p->inherits("QPopupMenu"))
+ p->setBackgroundPixmap(*pix);
+
-+ QObjectList *ol = p-> queryList("QWidget");
-+ for ( QObjectListIt it( *ol ); it. current ( ); ++it ) {
-+ QWidget *wid = (QWidget *) it.current ( );
++ QObjectList *ol = p-> queryList("QWidget");
++ for ( QObjectListIt it( *ol ); it. current ( ); ++it ) {
++ QWidget *wid = (QWidget *) it.current ( );
+
-+ wid-> setBackgroundPixmap(*pix);
-+ wid-> setBackgroundOrigin(QWidget::ParentOrigin);
-+ }
-+ delete ol;
-+ }
++ wid-> setBackgroundPixmap(*pix);
++ wid-> setBackgroundOrigin(QWidget::ParentOrigin);
++ }
++ delete ol;
}
}
else if(ev->type() == QEvent::Hide){
@@ -285,13 +284,13 @@ Features:
- }
- }
+ pixDict.remove(p->winId());
-+ if (!p->inherits("QPopupMenu")) {
++ if ( !p->inherits("QPopupMenu"))
+ p->setBackgroundMode(QWidget::PaletteBackground);
- reloadSettings();
-+ QObjectList *ol = p-> queryList("QWidget");
-+ for ( QObjectListIt it( *ol ); it. current ( ); ++it ) {
-+ QWidget *wid = (QWidget *) it.current ( );
++ QObjectList *ol = p-> queryList("QWidget");
++ for ( QObjectListIt it( *ol ); it. current ( ); ++it ) {
++ QWidget *wid = (QWidget *) it.current ( );
- // Now repaint menubar if needed
- if(shadowText != oldShadow){
@@ -300,9 +299,10 @@ Features:
- ++it;
- if(w->inherits("QMenuBar")){
- w->repaint();
-- }
-- }
-+ wid-> setBackgroundMode( QWidget::PaletteBackground );
++ wid-> setBackgroundMode( QWidget::PaletteBackground );
+ }
++ delete ol;
+ }
}
- }
- else if(id == MOSFET_BUTTON_CHANGE){
@@ -323,11 +323,10 @@ Features:
- ++it;
- if(w->inherits("QPushButton")){
- ((LiquidStyle*)parent())->applyCustomAttributes((QPushButton *)w);
-+ delete ol;
- }
- }
+- }
+- }
-
- }
+- }
+ return(false);
}
@@ -343,7 +342,7 @@ Features:
btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true);
btnMaskBmp.setMask(btnMaskBmp);
htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true);
-@@ -711,7 +685,6 @@
+@@ -711,7 +683,6 @@
void LiquidStyle::polish(QPalette &appPal)
{
@@ -351,7 +350,7 @@ Features:
int i;
for(i=0; i < BITMAP_ITEMS; ++i){
if(pixmaps[i]){
-@@ -730,20 +703,29 @@
+@@ -730,20 +701,29 @@
}
loadCustomButtons();
@@ -388,7 +387,7 @@ Features:
// force button color to be different from background
QBrush btnBrush(QColor(200, 202, 228));
appPal.setBrush(QColorGroup::Button, btnBrush);
-@@ -794,15 +776,7 @@
+@@ -794,15 +774,7 @@
pagerBrush.setPixmap(*pix);
// background color stuff
@@ -405,7 +404,7 @@ Features:
c.hsv(&bH, &bS, &bV);
c.light(120).hsv(&bHoverH, &bHoverS, &bHoverV);
-@@ -817,21 +791,18 @@
+@@ -817,21 +789,18 @@
wallPaper.fill(c.rgb());
painter.begin(&wallPaper);
for(i=0; i < 32; i+=4){
@@ -430,7 +429,7 @@ Features:
QPixmap basePix;
basePix.resize(32, 32);
basePix.fill(c.rgb());
-@@ -856,52 +827,39 @@
+@@ -856,52 +825,37 @@
applyCustomAttributes((QPushButton *)w);
}
}
@@ -456,7 +455,9 @@ Features:
}
if(w->inherits("QPopupMenu"))
w->setBackgroundMode(QWidget::NoBackground);
-+ else if(w-> testWFlags(Qt::WType_Popup) && !w->inherits("QListBox")) {
++ else if(w-> testWFlags(Qt::WType_Popup) &&
++ !w->inherits("QListBox") &&
++ ( qstrcmp ( w-> name(), "automatic what's this? widget" ) != 0 )) {
+ w->installEventFilter(menuHandler);
+ }
@@ -486,12 +487,9 @@ Features:
- w->inherits("KPanelExtension")){ // FIXME - doesn't work
- w->setPalette(kapp->palette());
- }
-+
-+
-+ if ( !w-> inherits("QFrame") || (((QFrame*) w)-> frameShape () == QFrame::NoFrame ))
-+ w-> setBackgroundOrigin ( QWidget::ParentOrigin );
- if(w->inherits("QComboBox") ||
+- if(w->inherits("QComboBox") ||
++ if(w->inherits("QComboBox") || w->inherits("QProgressBar") ||
w->inherits("QLineEdit") || w->inherits("QRadioButton") ||
- w->inherits("QCheckBox") || w->inherits("QScrollBar") ||
- w->isA("AppletHandle") || w->inherits("KMiniPagerButton") ||
@@ -500,17 +498,18 @@ Features:
w->installEventFilter(this);
}
if(w->inherits("QLineEdit")){
-@@ -913,6 +871,9 @@
+@@ -913,6 +867,10 @@
applyCustomAttributes((QPushButton *)w);
w->installEventFilter(this);
}
+ if(w->inherits("QButton") || w-> inherits("QComboBox")){
+ w-> setBackgroundMode ( QWidget::PaletteBackground );
++ w->setBackgroundOrigin ( QWidget::ParentOrigin);
+ }
bool isViewport = qstrcmp(w->name(), "qt_viewport") == 0 ||
qstrcmp(w->name(), "qt_clipped_viewport") == 0;
-@@ -942,11 +903,14 @@
+@@ -942,11 +900,17 @@
w->setMouseTracking(true);
w->installEventFilter(this);
}
@@ -519,6 +518,9 @@ Features:
+ if ( flatTBButtons )
+ w->setBackgroundOrigin(QWidget::ParentOrigin);
+ }
++ if(w-> inherits("QToolBarSeparator")&&w->parent()->inherits("QToolBar")) {
++ ((QFrame *) w)-> setFrameShape ( QFrame::NoFrame );
++ }
if(w->ownPalette() && !w->inherits("QButton") && !w->inherits("QComboBox")){
return;
}
@@ -527,7 +529,7 @@ Features:
if(w->parent() && w->parent()->isWidgetType() && !((QWidget*)w->parent())->
palette().active().brush(QColorGroup::Background).pixmap()){
-@@ -954,17 +918,13 @@
+@@ -954,16 +918,21 @@
return;
}
if(!isViewport && !isViewportChild && !w->testWFlags(WType_Popup) &&
@@ -535,29 +537,39 @@ Features:
+ !( !w-> inherits("QLineEdit") && w-> parent() && w-> parent()-> isWidgetType ( ) && w-> parent()-> inherits ( "QMultiLineEdit" ))) {
if(w->backgroundMode() == QWidget::PaletteBackground ||
w->backgroundMode() == QWidget::PaletteButton){
- w->setBackgroundMode(QWidget::X11ParentRelative);
+- w->setBackgroundMode(QWidget::X11ParentRelative);
++ w->setBackgroundMode(w->parentWidget()->backgroundMode( )/*QWidget::X11ParentRelative*/);
++ w->setBackgroundOrigin(QWidget::ParentOrigin);
++// w->setBackgroundMode(QWidget::NoBackground);
}
}
- if(w->inherits("KToolBar")){
- w->installEventFilter(this);
- //w->setBackgroundMode(QWidget::NoBackground);
- return;
-- }
++ if ( !w-> inherits("QFrame") || (((QFrame*) w)-> frameShape () == QFrame::NoFrame ))
++ w-> setBackgroundOrigin ( QWidget::ParentOrigin );
++ else if ( w-> inherits("QFrame") )
++ w->setBackgroundOrigin ( QWidget::WidgetOrigin );
+
++ if ( w->parentWidget()->inherits ( "QWidgetStack" )) {
++ w->setBackgroundOrigin ( QWidget::WidgetOrigin );
+ }
}
- void LiquidStyle::unPolish(QWidget *w)
-@@ -977,6 +937,9 @@
+@@ -977,6 +946,11 @@
if(w->inherits("QPopupMenu"))
w->setBackgroundMode(QWidget::PaletteButton);
-+ else if(w-> testWFlags(Qt::WType_Popup) && !w->inherits("QListBox")) {
++ else if(w-> testWFlags(Qt::WType_Popup) &&
++ !w->inherits("QListBox") &&
++ ( qstrcmp ( w-> name(), "automatic what's this? widget" ) != 0 )) {
+ w->removeEventFilter(menuHandler);
+ }
if(w->isTopLevel())
return;
-@@ -986,7 +949,7 @@
+@@ -986,7 +960,7 @@
((qstrcmp(w->parent()->name(), "qt_viewport") == 0) ||
(qstrcmp(w->parent()->name(), "qt_clipped_viewport") == 0));
@@ -566,7 +578,7 @@ Features:
if(w->backgroundMode() == QWidget::X11ParentRelative || isViewportChild){
if(w->inherits("QPushButton"))
w->setBackgroundMode(QWidget::PaletteButton);
-@@ -1001,12 +964,14 @@
+@@ -1001,12 +975,14 @@
unapplyCustomAttributes((QPushButton *)w);
w->removeEventFilter(this);
}
@@ -585,7 +597,7 @@ Features:
w->removeEventFilter(this);
}
if(w->inherits("QButton") || w->inherits("QComboBox")){
-@@ -1014,9 +979,9 @@
+@@ -1014,9 +990,9 @@
w->setAutoMask(false);
}
}
@@ -597,7 +609,7 @@ Features:
return;
}
if(w->inherits("QHeader")){
-@@ -1028,20 +993,34 @@
+@@ -1028,22 +1004,98 @@
void LiquidStyle::polish(QApplication *app)
{
@@ -633,8 +645,72 @@ Features:
+// QApplication::qwsSetDecoration ( new QPEDecoration ( ));
}
++
++/* !! HACK !! Beware
++ *
++ * TT forgot to make the QProgressBar widget styleable in Qt 2.x
++ * So the only way to customize the drawing, is to intercept the
++ * paint event - since we have to use protected functions, we need
++ * to derive a "hack" class from QProgressBar and do the painting
++ * in there.
++ *
++ * - sandman
++ */
++
++class HackProgressBar : public QProgressBar {
++public:
++ HackProgressBar ( );
++
++ void paint ( QPaintEvent *event, const QColorGroup &g, QPixmap *pix )
++ {
++ QPainter p( this );
++
++ if ( !contentsRect().contains( event->rect() ) ) {
++ p.save();
++ p.setClipRegion( event->region().intersect(frameRect()) );
++ drawFrame( &p);
++ p.restore();
++ }
++ if ( event->rect().intersects( contentsRect() )) {
++ p.setClipRegion( event->region().intersect( contentsRect() ) );
++
++ int x, y, w, h;
++ contentsRect ( ). rect ( &x, &y, &w, &h );
++
++ int prog = progress ( );
++ int total = totalSteps ( );
++ if ( prog < 0 )
++ prog = 0;
++ if ( total <= 0 )
++ total = 1;
++ int bw = w * prog / total;
++ if ( bw > w )
++ bw = w;
++
++ p.setPen(g.button().dark(130));
++ p.drawRect(x, y, bw, h);
++ p.setPen(g.button().light(120));
++ p.drawRect(x+1, y+1, bw-2, h-2);
++
++ if(bw >= 4 && h >= 4 && pix)
++ p.drawTiledPixmap(x+2, y+2, bw-4, h-4, *pix);
++
++ if ( progress ( )>= 0 && totalSteps ( ) > 0 ) {
++ QString pstr;
++ pstr. sprintf ( "%d%%", 100 * progress()/totalSteps ());
++ p. setPen ( g.text());//g.highlightedText ( ));
++ p. drawText (x,y,w-1,h-1,AlignCenter,pstr);
++ }
++ }
++ }
++};
++
++
++
/*
-@@ -1063,7 +1042,7 @@
+ * This is a fun method ;-) Here's an overview. KToolBar grabs resize to
+ * force everything to erase and repaint on resize. This is going away, I'm
+@@ -1063,7 +1115,7 @@
*/
bool LiquidStyle::eventFilter(QObject *obj, QEvent *ev)
{
@@ -643,7 +719,7 @@ Features:
if(ev->type() == QEvent::Resize){
const QObjectList *tbChildList = obj->children();
QObjectListIt it(*tbChildList);
-@@ -1076,35 +1055,7 @@
+@@ -1076,35 +1128,7 @@
}
}
@@ -680,7 +756,7 @@ Features:
QWidget *btn = (QWidget *)obj;
if(ev->type() == QEvent::Enter){
if(btn->isEnabled()){
-@@ -1119,20 +1070,7 @@
+@@ -1119,20 +1143,7 @@
}
}
}
@@ -702,7 +778,33 @@ Features:
QToolButton *btn = (QToolButton *)btn;
if(!btn->autoRaise()){
if(btn->isEnabled()){
-@@ -1340,11 +1278,6 @@
+@@ -1290,7 +1301,24 @@
+ }
+ }
+ }
+- return(false);
++ else if (obj-> inherits( "QProgressBar" )) {
++ if ( ev->type() == QEvent::Paint ) {
++ HackProgressBar *p = (HackProgressBar *) obj;
++ const QColorGroup &g = p-> colorGroup ( );
++
++ QPixmap *pix = bevelFillDict.find(g.button().dark(120).rgb());
++ if(!pix){
++ int h, s, v;
++ g.button().dark(120).hsv(&h, &s, &v);
++ pix = new QPixmap(*bevelFillPix);
++ adjustHSV(*pix, h, s, v);
++ bevelFillDict.insert(g.button().dark(120).rgb(), pix);
++ }
++ p-> paint ((QPaintEvent *) ev, g, pix );
++ return true;
++ }
++ }
++ return false ;
+ }
+
+ void LiquidStyle::drawButton(QPainter *p, int x, int y, int w, int h,
+@@ -1340,11 +1368,6 @@
QColorGroup g = btn->colorGroup();
@@ -714,7 +816,7 @@ Features:
//int dw = buttonDefaultIndicatorWidth();
if(btn->hasFocus() || btn->isDefault()){
QColor c = btn->hasFocus() ? g.button().light(110) : g.background();
-@@ -1596,7 +1529,7 @@
+@@ -1596,7 +1619,7 @@
if(sbBuffer.size() != sb->size())
sbBuffer.resize(sb->size());
}
@@ -723,7 +825,7 @@ Features:
addB.setRect( addX,addY,buttonDim,buttonDim );
if(horiz)
subHC.setRect(addX-buttonDim,addY,buttonDim,buttonDim );
-@@ -1624,7 +1557,7 @@
+@@ -1624,7 +1647,7 @@
QPainter painter;
if(!horiz){
painter.begin(&sbBuffer);
@@ -732,7 +834,7 @@ Features:
if(sliderR.height() >= 8){
painter.drawPixmap(bgR.x()+1, bgR.y(), *vsbSliderFillPix, 0, 0,
13, 8);
-@@ -1690,7 +1623,7 @@
+@@ -1690,7 +1713,7 @@
}
else{
painter.begin(&sbBuffer);
@@ -741,7 +843,7 @@ Features:
if(sliderR.width() >= 8){
painter.drawPixmap(bgR.x(), bgR.y()+1, *vsbSliderFillPix, 0, 0,
8, 13);
-@@ -1761,10 +1694,10 @@
+@@ -1761,10 +1784,10 @@
addB.width()-8, addB.height()-8, g, !maxed);
}
if ( controls & SubLine ) {
@@ -756,7 +858,7 @@ Features:
drawSBButton(p, subHC, g, activeControl == SubLine);
drawArrow( p, horiz ? LeftArrow : UpArrow,
false, subHC.x()+4, subHC.y()+4,
-@@ -1865,8 +1798,8 @@
+@@ -1865,8 +1888,8 @@
else
buttonDim = ( length - b*2 )/2 - 1;
@@ -767,7 +869,7 @@ Features:
if ( sb->maxValue() == sb->minValue() ) {
sliderLength = maxLength;
-@@ -1914,8 +1847,8 @@
+@@ -1914,8 +1937,8 @@
return(QSize(16, 16));
}
@@ -778,7 +880,7 @@ Features:
bool down, bool)
{
bool isHover = highlightWidget == p->device();
-@@ -1957,8 +1890,8 @@
+@@ -1957,8 +1980,8 @@
return(QSize(20, 22));
}
@@ -789,7 +891,7 @@ Features:
{
bool isHover = highlightWidget == p->device();
bool isMasked = p->device() && p->device()->devType() == QInternal::Widget
-@@ -1996,8 +1929,8 @@
+@@ -1996,8 +2019,8 @@
}
}
@@ -800,7 +902,7 @@ Features:
{
// needed for some reason by KHtml, even tho it's all filled ;P
p->drawPixmap(x, y, *getPixmap(HTMLCB)->mask());
-@@ -2005,18 +1938,17 @@
+@@ -2005,18 +2028,17 @@
}
void LiquidStyle::drawSlider(QPainter *p, int x, int y, int w, int h,
@@ -822,7 +924,7 @@ Features:
Orientation orient, bool, bool)
{
p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider)->mask() :
-@@ -2065,203 +1997,26 @@
+@@ -2065,203 +2087,26 @@
p->drawLineSegments(a);
}
@@ -844,7 +946,7 @@ Features:
- p->drawPoint(x, y2);
- p->drawPoint(x2, y2);
-
--
+
-
- // p->drawRect(x, y, w, h);
- QPixmap *pix = bevelFillDict.find(g.button().rgb());
@@ -861,7 +963,9 @@ Features:
-
-void LiquidStyle::drawKMenuBar(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool mac, QBrush *)
--{
++void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
++ QMenuItem *mi, QColorGroup &g, bool /*enabled*/, bool active )
+ {
- if(p->device() && p->device()->devType() == QInternal::Widget &&
- ((KMenuBar *)p->device())->isTopLevelMenu()){
- p->setPen(Qt::black);
@@ -885,12 +989,10 @@ Features:
- }
-
-}
-
+-
-void LiquidStyle::drawKToolBar(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, KToolBarPos, QBrush *)
-+void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
-+ QMenuItem *mi, QColorGroup &g, bool /*enabled*/, bool active )
- {
+-{
- //p->fillRect(x, y, w, h, g.brush(QColorGroup::Background));
-}
-
@@ -1038,7 +1140,7 @@ Features:
g.background().dark(130);
}
else
-@@ -2300,8 +2055,8 @@
+@@ -2300,8 +2145,8 @@
}
void LiquidStyle::drawPopupPanel(QPainter *p, int x, int y, int w, int h,
@@ -1049,7 +1151,7 @@ Features:
{
QColor c;
switch(menuHandler->transType()){
-@@ -2336,8 +2091,6 @@
+@@ -2336,8 +2181,6 @@
maxpmw = QMAX( maxpmw, 20 );
@@ -1058,7 +1160,7 @@ Features:
bool dis = !enabled;
QColorGroup itemg = dis ? pal.disabled() : pal.active();
-@@ -2363,7 +2116,7 @@
+@@ -2363,7 +2206,7 @@
p->fillRect(x, y, w, h, menuBrush);
}
else{
@@ -1067,7 +1169,7 @@ Features:
if(pix)
p->drawPixmap(x, y, *pix, x, y, w, h);
}
-@@ -2508,25 +2261,6 @@
+@@ -2508,25 +2351,6 @@
return h;
}
@@ -1093,7 +1195,7 @@ Features:
void LiquidStyle::drawFocusRect(QPainter *p, const QRect &r,
const QColorGroup &g, const QColor *c,
-@@ -2540,25 +2274,25 @@
+@@ -2540,25 +2364,25 @@
return;
}
else{
@@ -1123,7 +1225,7 @@ Features:
return;
}
QPixmap tilePix;
-@@ -2671,7 +2405,7 @@
+@@ -2671,7 +2495,7 @@
vFrame = 8; // was 10
}
else
@@ -1132,7 +1234,7 @@ Features:
}
-@@ -2699,7 +2433,7 @@
+@@ -2699,7 +2523,7 @@
p->drawLine(x+1, y+1, x+1, y2-1);
}
else if(lineWidth != 2 || !sunken)
@@ -1141,7 +1243,7 @@ Features:
else{
QPen oldPen = p->pen();
int x2 = x+w-1;
-@@ -2726,105 +2460,6 @@
+@@ -2726,105 +2550,6 @@
}
}
@@ -1247,7 +1349,7 @@ Features:
void LiquidStyle::adjustHSV(QPixmap &pix, int h, int s, int v)
{
-@@ -2998,22 +2633,22 @@
+@@ -2998,22 +2723,22 @@
customBtnIconList.clear();
customBtnLabelList.clear();
@@ -1277,7 +1379,7 @@ Features:
while(labelStr != NULL){
QColor *c = new QColor;
c->setNamedColor(QString(colorStr));
-@@ -3022,7 +2657,7 @@
+@@ -3022,7 +2747,7 @@
QString tmpStr(iconStr);
if(!tmpStr.isEmpty()){
QPixmap *pixmap =
@@ -1286,7 +1388,7 @@ Features:
if(pixmap->isNull()){
delete pixmap;
customBtnIconList.append(NULL);
-@@ -3037,7 +2672,6 @@
+@@ -3037,7 +2762,6 @@
colorStr = colorList.next();
iconStr = iconList.next();
}
@@ -1294,7 +1396,7 @@ Features:
}
void LiquidStyle::applyCustomAttributes(QPushButton *btn)
-@@ -3087,7 +2721,7 @@
+@@ -3087,7 +2811,7 @@
}
}
@@ -1303,133 +1405,104 @@ Features:
---- - Sat Sep 21 05:31:48 2002
-+++ plugin.cpp Mon Jul 8 02:42:56 2002
-@@ -1,29 +1,113 @@
+--- - 2002-10-24 03:19:31.000000000 +0200
++++ plugin.cpp 2002-10-04 03:37:38.000000000 +0200
+@@ -1,29 +1,84 @@
++#include <qapplication.h>
++
#include "liquid.h"
-#include <klocale.h>
+#include "liquidset.h"
+#include "plugin.h"
-
--extern "C" {
-- KStyle* allocate();
-- int minor_version();
-- int major_version();
-- const char *description();
++
+
+
+LiquidInterface::LiquidInterface ( ) : ref ( 0 )
+{
++ m_widget = 0;
+}
+
+LiquidInterface::~LiquidInterface ( )
+{
+}
+
-+QStyle *LiquidInterface::create ( )
++QStyle *LiquidInterface::style ( )
+{
+ return new LiquidStyle ( );
+}
+
-+QString LiquidInterface::name ( )
++QString LiquidInterface::name ( ) const
++{
++ return qApp-> translate ( "Styles", "Liquid" );
++}
++
++QString LiquidInterface::description ( ) const
++{
++ return qApp-> translate ( "Styles", "High Performance Liquid style by Mosfet" );
++}
++
++bool LiquidInterface::hasSettings ( ) const
++{
++ return true;
++}
++
++QWidget *LiquidInterface::create ( QWidget *parent, const char *name )
+{
-+ return QObject::tr( "Liquid", "name" );
++ m_widget = new LiquidSettings ( parent, name ? name : "LIQUID-SETTINGS" );
+
+-extern "C" {
+- KStyle* allocate();
+- int minor_version();
+- int major_version();
+- const char *description();
++ return m_widget;
}
-KStyle* allocate()
-+QString LiquidInterface::description ( )
++bool LiquidInterface::accept ( )
{
- return(new LiquidStyle);
-+ return QObject::tr( "High Performance Liquid style by Mosfet", "description" );
++ if ( !m_widget )
++ return false;
++
++ return m_widget-> writeConfig ( );
}
-int minor_version()
-+QCString LiquidInterface::key ( )
++void LiquidInterface::reject ( )
{
- return(0);
-+ return QCString ( "liquid" );
}
-int major_version()
-+unsigned int LiquidInterface::version ( )
++
++QRESULT LiquidInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
{
- return(1);
-+ return 100; // 1.0.0 (\d+.\d.\d)
- }
-
--const char *description()
-+QRESULT LiquidInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
-+{
-+ static LiquidSettingsInterface *setiface = 0;
-+
+ *iface = 0;
+
+ if ( uuid == IID_QUnknown )
+ *iface = this;
+ else if ( uuid == IID_Style )
+ *iface = this;
-+ else if ( uuid == IID_StyleSettings ) {
-+ if ( !setiface )
-+ setiface = new LiquidSettingsInterface ( );
-+ *iface = setiface;
-+ }
++ else if ( uuid == IID_StyleExtended )
++ *iface = this;
+
+ if ( *iface )
+ (*iface)-> addRef ( );
+
+ return QS_OK;
-+}
-+
+ }
+
+-const char *description()
+Q_EXPORT_INTERFACE()
-+{
-+ Q_CREATE_INSTANCE( LiquidInterface )
-+}
-+
-+
-+LiquidSettingsInterface::LiquidSettingsInterface ( ) : ref ( 0 )
{
- return(i18n("High performance liquid plugin").utf8());
-+ m_widget = 0;
++ Q_CREATE_INSTANCE( LiquidInterface )
}
-+
-+LiquidSettingsInterface::~LiquidSettingsInterface ( )
-+{
-+}
-+
-+QWidget *LiquidSettingsInterface::create ( QWidget *parent, const char *name )
-+{
-+ m_widget = new LiquidSettings ( parent, name ? name : "LIQUID-SETTINGS" );
-+
-+ return m_widget;
-+}
-+
-+bool LiquidSettingsInterface::accept ( )
-+{
-+ if ( !m_widget )
-+ return false;
+
-+ return m_widget-> writeConfig ( );
-+}
+
-+void LiquidSettingsInterface::reject ( )
-+{
-+}
-+
-+QRESULT LiquidSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
-+{
-+ *iface = 0;
-+
-+
-+ if ( uuid == IID_QUnknown )
-+ *iface = this;
-+ else if ( uuid == IID_StyleSettings )
-+ *iface = this;
-+
-+ if ( *iface )
-+ (*iface)-> addRef ( );
-+
-+ return QS_OK;
-+}
++
+
+// Hack for Retail Z experiments
+extern "C" { QStyle *allocate ( ) { return new LiquidStyle ( ); } }