summaryrefslogtreecommitdiff
authorsandman <sandman>2002-07-01 09:41:55 (UTC)
committer sandman <sandman>2002-07-01 09:41:55 (UTC)
commit05d74acac3af056bfd784c6f2b7f72d313ea64bc (patch) (unidiff)
tree8138f495cdd08fa249bd429ddefc36df26b12a79
parentd538fa9811906117a3ea68e3d434a1de7f46fc67 (diff)
downloadopie-05d74acac3af056bfd784c6f2b7f72d313ea64bc.zip
opie-05d74acac3af056bfd784c6f2b7f72d313ea64bc.tar.gz
opie-05d74acac3af056bfd784c6f2b7f72d313ea64bc.tar.bz2
- Fix a bug in the original liquid regarding slider handles and bg
pixmaps (volume-applet, reported by Harlekin) - Fix some "unused variable" compiler warnings - Regenerated QPL diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/liquid/liquid.cpp25
-rw-r--r--noncore/styles/liquid/opie-liquid.diff100
2 files changed, 95 insertions, 30 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp
index 9a7d2dd..313d52c 100644
--- a/noncore/styles/liquid/liquid.cpp
+++ b/noncore/styles/liquid/liquid.cpp
@@ -1818,26 +1818,26 @@ QStyle::ScrollControl LiquidStyle::scrollBarPointOver(const QScrollBar *sb,
1818 1818
1819 return SubLine; 1819 return SubLine;
1820} 1820}
1821 1821
1822#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2) 1822#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
1823 1823
1824 1824
1825QSize LiquidStyle::exclusiveIndicatorSize() const 1825QSize LiquidStyle::exclusiveIndicatorSize() const
1826{ 1826{
1827 return(QSize(16, 16)); 1827 return(QSize(16, 16));
1828} 1828}
1829 1829
1830void LiquidStyle::drawExclusiveIndicator(QPainter *p, int x, int y, int w, 1830void LiquidStyle::drawExclusiveIndicator(QPainter *p, int x, int y, int /*w*/,
1831 int h, const QColorGroup &g, bool on, 1831 int /*h*/, const QColorGroup &/*g*/, bool on,
1832 bool down, bool) 1832 bool down, bool)
1833{ 1833{
1834 bool isHover = highlightWidget == p->device(); 1834 bool isHover = highlightWidget == p->device();
1835 bool isMasked = p->device() && p->device()->devType() == QInternal::Widget 1835 bool isMasked = p->device() && p->device()->devType() == QInternal::Widget
1836 && ((QWidget*)p->device())->autoMask(); 1836 && ((QWidget*)p->device())->autoMask();
1837 1837
1838 if(isMasked){ 1838 if(isMasked){
1839 if(on || down){ 1839 if(on || down){
1840 p->drawPixmap(x, y, isHover ? *getPixmap(HTMLRadioDownHover) : 1840 p->drawPixmap(x, y, isHover ? *getPixmap(HTMLRadioDownHover) :
1841 *getPixmap(HTMLRadioDown)); 1841 *getPixmap(HTMLRadioDown));
1842 } 1842 }
1843 else 1843 else
@@ -1861,26 +1861,26 @@ void LiquidStyle::drawExclusiveIndicatorMask(QPainter *p, int x, int y, int w,
1861{ 1861{
1862 p->fillRect(x, y, w, h, Qt::color0); 1862 p->fillRect(x, y, w, h, Qt::color0);
1863 p->setPen(Qt::color1); 1863 p->setPen(Qt::color1);
1864 p->drawPixmap(x, y, *getPixmap(RadioOn)->mask()); 1864 p->drawPixmap(x, y, *getPixmap(RadioOn)->mask());
1865} 1865}
1866 1866
1867 1867
1868QSize LiquidStyle::indicatorSize() const 1868QSize LiquidStyle::indicatorSize() const
1869{ 1869{
1870 return(QSize(20, 22)); 1870 return(QSize(20, 22));
1871} 1871}
1872 1872
1873void LiquidStyle::drawIndicator(QPainter *p, int x, int y, int w, int h, 1873void LiquidStyle::drawIndicator(QPainter *p, int x, int y, int /*w*/, int /*h*/,
1874 const QColorGroup &g, int state, bool down, bool) 1874 const QColorGroup &/*g*/, int state, bool /*down*/, bool)
1875{ 1875{
1876 bool isHover = highlightWidget == p->device(); 1876 bool isHover = highlightWidget == p->device();
1877 bool isMasked = p->device() && p->device()->devType() == QInternal::Widget 1877 bool isMasked = p->device() && p->device()->devType() == QInternal::Widget
1878 && ((QWidget*)p->device())->autoMask(); 1878 && ((QWidget*)p->device())->autoMask();
1879 if(isMasked){ 1879 if(isMasked){
1880 if(state != QButton::Off){ 1880 if(state != QButton::Off){
1881 p->drawPixmap(x, y, isHover ? *getPixmap(HTMLCBDownHover) : 1881 p->drawPixmap(x, y, isHover ? *getPixmap(HTMLCBDownHover) :
1882 *getPixmap(HTMLCBDown)); 1882 *getPixmap(HTMLCBDown));
1883 } 1883 }
1884 else 1884 else
1885 p->drawPixmap(x, y, isHover ? *getPixmap(HTMLCBHover) : 1885 p->drawPixmap(x, y, isHover ? *getPixmap(HTMLCBHover) :
1886 *getPixmap(HTMLCB)); 1886 *getPixmap(HTMLCB));
@@ -1900,45 +1900,44 @@ void LiquidStyle::drawIndicator(QPainter *p, int x, int y, int w, int h,
1900 p->drawRect(x+2, y+2, w-4, h-4); 1900 p->drawRect(x+2, y+2, w-4, h-4);
1901 p->setPen(Qt::black); 1901 p->setPen(Qt::black);
1902 p->drawLine(x+3, (y+h)/2-2, x+w-4, (y+h)/2-2); 1902 p->drawLine(x+3, (y+h)/2-2, x+w-4, (y+h)/2-2);
1903 p->drawLine(x+3, (y+h)/2, x+w-4, (y+h)/2); 1903 p->drawLine(x+3, (y+h)/2, x+w-4, (y+h)/2);
1904 p->drawLine(x+3, (y+h)/2+2, x+w-4, (y+h)/2+2); 1904 p->drawLine(x+3, (y+h)/2+2, x+w-4, (y+h)/2+2);
1905 }*/ 1905 }*/
1906 } 1906 }
1907 else 1907 else
1908 p->drawPixmap(x, y, isHover ? *getPixmap(CBHover) : *getPixmap(CB)); 1908 p->drawPixmap(x, y, isHover ? *getPixmap(CBHover) : *getPixmap(CB));
1909 } 1909 }
1910} 1910}
1911 1911
1912void LiquidStyle::drawIndicatorMask(QPainter *p, int x, int y, int w, int h, 1912void LiquidStyle::drawIndicatorMask(QPainter *p, int x, int y, int /*w*/, int /*h*/,
1913 int state) 1913 int /*state*/)
1914{ 1914{
1915 // needed for some reason by KHtml, even tho it's all filled ;P 1915 // needed for some reason by KHtml, even tho it's all filled ;P
1916 p->drawPixmap(x, y, *getPixmap(HTMLCB)->mask()); 1916 p->drawPixmap(x, y, *getPixmap(HTMLCB)->mask());
1917 1917
1918} 1918}
1919 1919
1920void LiquidStyle::drawSlider(QPainter *p, int x, int y, int w, int h, 1920void LiquidStyle::drawSlider(QPainter *p, int x, int y, int w, int h,
1921 const QColorGroup &g, Orientation orient, 1921 const QColorGroup &/*g*/, Orientation orient,
1922 bool, bool) 1922 bool, bool)
1923{ 1923{
1924 QWidget *parent = (QWidget *)p->device(); 1924 QWidget *parent = (QWidget *)p->device();
1925 p->setBrushOrigin(parent->pos()); 1925 p->setBrushOrigin(parent->pos());
1926 p->fillRect(x, y, w, h, 1926 parent->erase(x, y, w, h);
1927 QApplication::palette().active().brush(QColorGroup::Background));
1928 p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider) : 1927 p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider) :
1929 *getPixmap(VSlider)); 1928 *getPixmap(VSlider));
1930} 1929}
1931 1930
1932void LiquidStyle::drawSliderMask(QPainter *p, int x, int y, int w, int h, 1931void LiquidStyle::drawSliderMask(QPainter *p, int x, int y, int /*w*/, int /*h*/,
1933 Orientation orient, bool, bool) 1932 Orientation orient, bool, bool)
1934{ 1933{
1935 p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider)->mask() : 1934 p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider)->mask() :
1936 *getPixmap(VSlider)->mask()); 1935 *getPixmap(VSlider)->mask());
1937} 1936}
1938 1937
1939int LiquidStyle::sliderLength() const 1938int LiquidStyle::sliderLength() const
1940{ 1939{
1941 return(10); 1940 return(10);
1942} 1941}
1943 1942
1944#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2) 1943#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
@@ -1971,25 +1970,25 @@ void LiquidStyle::drawArrow(QPainter *p, Qt::ArrowType type, bool on, int x,
1971 break; 1970 break;
1972 default: 1971 default:
1973 a.setPoints(QCOORDARRLEN(r_arrow), r_arrow); 1972 a.setPoints(QCOORDARRLEN(r_arrow), r_arrow);
1974 break; 1973 break;
1975 } 1974 }
1976 1975
1977 a.translate(x, y); 1976 a.translate(x, y);
1978 p->drawLineSegments(a); 1977 p->drawLineSegments(a);
1979} 1978}
1980 1979
1981 1980
1982void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, 1981void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
1983 QMenuItem *mi, QColorGroup &g, bool enabled, bool active ) 1982 QMenuItem *mi, QColorGroup &g, bool /*enabled*/, bool active )
1984 { 1983 {
1985 x -= 2; // Bug in Qt/E 1984 x -= 2; // Bug in Qt/E
1986 y -= 2; 1985 y -= 2;
1987 w += 2; 1986 w += 2;
1988 h += 2; 1987 h += 2;
1989 1988
1990 p-> fillRect ( x, y, w, h, g.brush(QColorGroup::Background)); 1989 p-> fillRect ( x, y, w, h, g.brush(QColorGroup::Background));
1991 1990
1992 w -= 2; 1991 w -= 2;
1993 1992
1994 if(menuHandler->useShadowText()){ 1993 if(menuHandler->useShadowText()){
1995 QColor shadow; 1994 QColor shadow;
@@ -2025,26 +2024,26 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
2025 } 2024 }
2026 else{ 2025 else{
2027 if(active) 2026 if(active)
2028 drawClearBevel(p, x+1, y+1, w-1, h-1, g.button(), g.background()); 2027 drawClearBevel(p, x+1, y+1, w-1, h-1, g.button(), g.background());
2029 QApplication::style().drawItem(p, x, y, w, h, 2028 QApplication::style().drawItem(p, x, y, w, h,
2030 AlignCenter|ShowPrefix|DontClip|SingleLine, 2029 AlignCenter|ShowPrefix|DontClip|SingleLine,
2031 g, mi->isEnabled(), NULL, mi->text(), 2030 g, mi->isEnabled(), NULL, mi->text(),
2032 -1, &g.text()); 2031 -1, &g.text());
2033 } 2032 }
2034} 2033}
2035 2034
2036void LiquidStyle::drawPopupPanel(QPainter *p, int x, int y, int w, int h, 2035void LiquidStyle::drawPopupPanel(QPainter *p, int x, int y, int w, int h,
2037 const QColorGroup &g, int lineWidth, 2036 const QColorGroup &g, int /*lineWidth*/,
2038 const QBrush * fill) 2037 const QBrush * /*fill*/)
2039{ 2038{
2040 QColor c; 2039 QColor c;
2041 switch(menuHandler->transType()){ 2040 switch(menuHandler->transType()){
2042 case None: 2041 case None:
2043 case StippledBg: 2042 case StippledBg:
2044 case TransStippleBg: 2043 case TransStippleBg:
2045 c = g.background(); 2044 c = g.background();
2046 break; 2045 break;
2047 case StippledBtn: 2046 case StippledBtn:
2048 case TransStippleBtn: 2047 case TransStippleBtn:
2049 c = g.button(); 2048 c = g.button();
2050 break; 2049 break;
diff --git a/noncore/styles/liquid/opie-liquid.diff b/noncore/styles/liquid/opie-liquid.diff
index ef7300d..bcbdc8d 100644
--- a/noncore/styles/liquid/opie-liquid.diff
+++ b/noncore/styles/liquid/opie-liquid.diff
@@ -1,18 +1,18 @@
1This is a patch to mosfet's liquid 0.7. 1This is a patch to mosfet's liquid 0.7.
2Features: 2Features:
3 - Qt-only 3 - Qt-only
4 - works with Qt/E on QPE/OPIE 4 - works with Qt/E on QPE/OPIE
5 5
6 --- -Sun Jun 30 22:38:02 2002 6 --- -Mon Jul 1 11:38:05 2002
7 +++ liquid.hMon Jun 24 19:07:45 2002 7 +++ liquid.hMon Jun 24 19:07:45 2002
8@@ -2,7 +2,7 @@ 8@@ -2,7 +2,7 @@
9 #define LIQUID_STYLE_H 9 #define LIQUID_STYLE_H
10 10
11 11
12-#include <kstyle.h> 12-#include <kstyle.h>
13+#include <qwindowsstyle.h> 13+#include <qwindowsstyle.h>
14 #include <qpainter.h> 14 #include <qpainter.h>
15 #include <qdrawutil.h> 15 #include <qdrawutil.h>
16 #include <qpalette.h> 16 #include <qpalette.h>
17@@ -20,7 +20,7 @@ 17@@ -20,7 +20,7 @@
18 * Copyright (C)QPL 2001 Daniel M. Duley. All rights reserved. 18 * Copyright (C)QPL 2001 Daniel M. Duley. All rights reserved.
@@ -93,26 +93,26 @@ Features:
93 void drawToolButton(QPainter *p, int x, int y, int w, 93 void drawToolButton(QPainter *p, int x, int y, int w,
94 int h, const QColorGroup &g, 94 int h, const QColorGroup &g,
95 bool sunken, const QBrush *fill); 95 bool sunken, const QBrush *fill);
96- void drawKickerAppletHandle(QPainter *p, int x, int y, int w, int h, 96- void drawKickerAppletHandle(QPainter *p, int x, int y, int w, int h,
97- const QColorGroup &g, QBrush *); 97- const QColorGroup &g, QBrush *);
98- void drawKickerTaskButton(QPainter *p, int x, int y, int w, int h, 98- void drawKickerTaskButton(QPainter *p, int x, int y, int w, int h,
99- const QColorGroup &g, 99- const QColorGroup &g,
100- const QString &title, bool active, 100- const QString &title, bool active,
101- QPixmap *icon, QBrush *fill); 101- QPixmap *icon, QBrush *fill);
102 // for repainting toolbuttons when the toolbar is resized 102 // for repainting toolbuttons when the toolbar is resized
103 bool eventFilter(QObject *obj, QEvent *ev); 103 bool eventFilter(QObject *obj, QEvent *ev);
104 void drawSliderGroove(QPainter * p, int x, int y, int w, int h, 104 void drawSliderGroove(QPainter * p, int x, int y, int w, int h,
105 --- -Sun Jun 30 22:38:02 2002 105 --- -Mon Jul 1 11:38:05 2002
106 +++ liquid.cppSun Jun 30 22:37:56 2002 106 +++ liquid.cppMon Jul 1 03:45:28 2002
107@@ -10,12 +10,10 @@ 107@@ -10,12 +10,10 @@
108 108
109 #include <qmenudata.h> 109 #include <qmenudata.h>
110 #include "liquid.h" 110 #include "liquid.h"
111-#include <kapp.h> 111-#include <kapp.h>
112-#include <kglobal.h> 112-#include <kglobal.h>
113-#include <kconfig.h> 113-#include <kconfig.h>
114-#include <kdrawutil.h> 114-#include <kdrawutil.h>
115-#include <kglobalsettings.h> 115-#include <kglobalsettings.h>
116-#include <kpixmapeffect.h> 116-#include <kpixmapeffect.h>
117+#include "liquiddeco.h" 117+#include "liquiddeco.h"
118+#include <qapplication.h> 118+#include <qapplication.h>
@@ -643,25 +643,80 @@ Features:
643@@ -1340,11 +1258,6 @@ 643@@ -1340,11 +1258,6 @@
644 QColorGroup g = btn->colorGroup(); 644 QColorGroup g = btn->colorGroup();
645 645
646 646
647- QColor testColor; 647- QColor testColor;
648- if(btn->parent() && btn->parent()->isWidgetType()){ 648- if(btn->parent() && btn->parent()->isWidgetType()){
649- testColor = p->backgroundColor(); // remove me 649- testColor = p->backgroundColor(); // remove me
650- } 650- }
651- 651-
652 //int dw = buttonDefaultIndicatorWidth(); 652 //int dw = buttonDefaultIndicatorWidth();
653 if(btn->hasFocus() || btn->isDefault()){ 653 if(btn->hasFocus() || btn->isDefault()){
654 QColor c = btn->hasFocus() ? g.button().light(110) : g.background(); 654 QColor c = btn->hasFocus() ? g.button().light(110) : g.background();
655@@ -2065,203 +1978,24 @@ 655@@ -1914,8 +1827,8 @@
656 return(QSize(16, 16));
657 }
658
659-void LiquidStyle::drawExclusiveIndicator(QPainter *p, int x, int y, int w,
660- int h, const QColorGroup &g, bool on,
661+void LiquidStyle::drawExclusiveIndicator(QPainter *p, int x, int y, int /*w*/,
662+ int /*h*/, const QColorGroup &/*g*/, bool on,
663 bool down, bool)
664 {
665 bool isHover = highlightWidget == p->device();
666@@ -1957,8 +1870,8 @@
667 return(QSize(20, 22));
668 }
669
670-void LiquidStyle::drawIndicator(QPainter *p, int x, int y, int w, int h,
671- const QColorGroup &g, int state, bool down, bool)
672+void LiquidStyle::drawIndicator(QPainter *p, int x, int y, int /*w*/, int /*h*/,
673+ const QColorGroup &/*g*/, int state, bool /*down*/, bool)
674 {
675 bool isHover = highlightWidget == p->device();
676 bool isMasked = p->device() && p->device()->devType() == QInternal::Widget
677@@ -1996,8 +1909,8 @@
678 }
679 }
680
681-void LiquidStyle::drawIndicatorMask(QPainter *p, int x, int y, int w, int h,
682- int state)
683+void LiquidStyle::drawIndicatorMask(QPainter *p, int x, int y, int /*w*/, int /*h*/,
684+ int /*state*/)
685 {
686 // needed for some reason by KHtml, even tho it's all filled ;P
687 p->drawPixmap(x, y, *getPixmap(HTMLCB)->mask());
688@@ -2005,18 +1918,17 @@
689 }
690
691 void LiquidStyle::drawSlider(QPainter *p, int x, int y, int w, int h,
692- const QColorGroup &g, Orientation orient,
693+ const QColorGroup &/*g*/, Orientation orient,
694 bool, bool)
695 {
696 QWidget *parent = (QWidget *)p->device();
697 p->setBrushOrigin(parent->pos());
698- p->fillRect(x, y, w, h,
699- QApplication::palette().active().brush(QColorGroup::Background));
700+ parent->erase(x, y, w, h);
701 p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider) :
702 *getPixmap(VSlider));
703 }
704
705-void LiquidStyle::drawSliderMask(QPainter *p, int x, int y, int w, int h,
706+void LiquidStyle::drawSliderMask(QPainter *p, int x, int y, int /*w*/, int /*h*/,
707 Orientation orient, bool, bool)
708 {
709 p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider)->mask() :
710@@ -2065,203 +1977,24 @@
656 p->drawLineSegments(a); 711 p->drawLineSegments(a);
657 } 712 }
658 713
659-void LiquidStyle::drawKBarHandle(QPainter *p, int x, int y, int w, int h, 714-void LiquidStyle::drawKBarHandle(QPainter *p, int x, int y, int w, int h,
660- const QColorGroup &g, KToolBarPos, 715- const QColorGroup &g, KToolBarPos,
661- QBrush *) 716- QBrush *)
662-{ 717-{
663- p->setPen(g.button().dark(120)); 718- p->setPen(g.button().dark(120));
664- int x2 = x+w-1; 719- int x2 = x+w-1;
665- int y2 = y+h-1; 720- int y2 = y+h-1;
666- p->drawLine(x+1, y, x2-1, y); 721- p->drawLine(x+1, y, x2-1, y);
667- p->drawLine(x+1, y2, x2-1, y2); 722- p->drawLine(x+1, y2, x2-1, y2);
@@ -710,25 +765,25 @@ Features:
710- p->drawLine(x2-4, y+1, x2-6, y+1); 765- p->drawLine(x2-4, y+1, x2-6, y+1);
711- } 766- }
712- else{ 767- else{
713- qDrawShadePanel(p, x, y, w, h, g, false, 1, 768- qDrawShadePanel(p, x, y, w, h, g, false, 1,
714- &g.brush(QColorGroup::Background)); 769- &g.brush(QColorGroup::Background));
715- } 770- }
716- 771-
717-} 772-}
718 773
719-void LiquidStyle::drawKToolBar(QPainter *p, int x, int y, int w, int h, 774-void LiquidStyle::drawKToolBar(QPainter *p, int x, int y, int w, int h,
720- const QColorGroup &g, KToolBarPos, QBrush *) 775- const QColorGroup &g, KToolBarPos, QBrush *)
721+void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, 776+void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
722+ QMenuItem *mi, QColorGroup &g, bool enabled, bool active ) 777+ QMenuItem *mi, QColorGroup &g, bool /*enabled*/, bool active )
723 { 778 {
724- //p->fillRect(x, y, w, h, g.brush(QColorGroup::Background)); 779- //p->fillRect(x, y, w, h, g.brush(QColorGroup::Background));
725-} 780-}
726+ x -= 2; // Bug in Qt/E 781+ x -= 2; // Bug in Qt/E
727+ y -= 2; 782+ y -= 2;
728+ w += 2; 783+ w += 2;
729+ h += 2; 784+ h += 2;
730 785
731-void LiquidStyle::drawKToolBarButton(QPainter *p, int x, int y, int w, int h, 786-void LiquidStyle::drawKToolBarButton(QPainter *p, int x, int y, int w, int h,
732- const QColorGroup &g, bool sunken, 787- const QColorGroup &g, bool sunken,
733- bool raised, bool enabled, bool popup, 788- bool raised, bool enabled, bool popup,
734- KToolButtonType icontext, 789- KToolButtonType icontext,
@@ -857,43 +912,54 @@ Features:
857+ w -= 2; 912+ w -= 2;
858 913
859 if(menuHandler->useShadowText()){ 914 if(menuHandler->useShadowText()){
860 QColor shadow; 915 QColor shadow;
861 if(p->device() && p->device()->devType() == QInternal::Widget && 916 if(p->device() && p->device()->devType() == QInternal::Widget &&
862- ((QWidget *)p->device())->inherits("KMenuBar")){ 917- ((QWidget *)p->device())->inherits("KMenuBar")){
863- shadow = ((KMenuBar*)p->device())->isTopLevel() ? g.button().dark(130) : 918- shadow = ((KMenuBar*)p->device())->isTopLevel() ? g.button().dark(130) :
864+ ((QWidget *)p->device())->inherits("QMenuBar")){ 919+ ((QWidget *)p->device())->inherits("QMenuBar")){
865+ shadow = ((QMenuBar*)p->device())->isTopLevel() ? g.button().dark(130) : 920+ shadow = ((QMenuBar*)p->device())->isTopLevel() ? g.button().dark(130) :
866 g.background().dark(130); 921 g.background().dark(130);
867 } 922 }
868 else 923 else
869@@ -2336,8 +2070,6 @@ 924@@ -2300,8 +2033,8 @@
925 }
926
927 void LiquidStyle::drawPopupPanel(QPainter *p, int x, int y, int w, int h,
928- const QColorGroup &g, int lineWidth,
929- const QBrush * fill)
930+ const QColorGroup &g, int /*lineWidth*/,
931+ const QBrush * /*fill*/)
932 {
933 QColor c;
934 switch(menuHandler->transType()){
935@@ -2336,8 +2069,6 @@
870 936
871 maxpmw = QMAX( maxpmw, 20 ); 937 maxpmw = QMAX( maxpmw, 20 );
872 938
873- if ( p->font() == KGlobalSettings::generalFont() ) 939- if ( p->font() == KGlobalSettings::generalFont() )
874- p->setFont( KGlobalSettings::menuFont() ); 940- p->setFont( KGlobalSettings::menuFont() );
875 941
876 bool dis = !enabled; 942 bool dis = !enabled;
877 QColorGroup itemg = dis ? pal.disabled() : pal.active(); 943 QColorGroup itemg = dis ? pal.disabled() : pal.active();
878@@ -2363,7 +2095,7 @@ 944@@ -2363,7 +2094,7 @@
879 p->fillRect(x, y, w, h, menuBrush); 945 p->fillRect(x, y, w, h, menuBrush);
880 } 946 }
881 else{ 947 else{
882- KPixmap *pix = menuHandler->pixmap(((QWidget*)p->device())->winId()); 948- KPixmap *pix = menuHandler->pixmap(((QWidget*)p->device())->winId());
883+ QPixmap *pix = menuHandler->pixmap(((QWidget*)p->device())->winId()); 949+ QPixmap *pix = menuHandler->pixmap(((QWidget*)p->device())->winId());
884 if(pix) 950 if(pix)
885 p->drawPixmap(x, y, *pix, x, y, w, h); 951 p->drawPixmap(x, y, *pix, x, y, w, h);
886 } 952 }
887@@ -2508,25 +2240,6 @@ 953@@ -2508,25 +2239,6 @@
888 return h; 954 return h;
889 } 955 }
890 956
891-void LiquidStyle::drawKProgressBlock(QPainter *p, int x, int y, int w, int h, 957-void LiquidStyle::drawKProgressBlock(QPainter *p, int x, int y, int w, int h,
892- const QColorGroup &g, QBrush *fill) 958- const QColorGroup &g, QBrush *fill)
893-{ 959-{
894- p->setPen(g.button().dark(130)); 960- p->setPen(g.button().dark(130));
895- p->drawRect(x, y, w, h); 961- p->drawRect(x, y, w, h);
896- p->setPen(g.button().light(120)); 962- p->setPen(g.button().light(120));
897- p->drawRect(x+1, y+1, w-2, h-2); 963- p->drawRect(x+1, y+1, w-2, h-2);
898- if(w >= 4 && h >= 4){ 964- if(w >= 4 && h >= 4){
899- QPixmap *pix = bevelFillDict.find(g.button().dark(120).rgb()); 965- QPixmap *pix = bevelFillDict.find(g.button().dark(120).rgb());
@@ -901,25 +967,25 @@ Features:
901- int h, s, v; 967- int h, s, v;
902- g.button().dark(120).hsv(&h, &s, &v); 968- g.button().dark(120).hsv(&h, &s, &v);
903- pix = new QPixmap(*bevelFillPix); 969- pix = new QPixmap(*bevelFillPix);
904- adjustHSV(*pix, h, s, v); 970- adjustHSV(*pix, h, s, v);
905- bevelFillDict.insert(g.button().dark(120).rgb(), pix); 971- bevelFillDict.insert(g.button().dark(120).rgb(), pix);
906- } 972- }
907- p->drawTiledPixmap(x+2, y+2, w-4, h-4, *pix); 973- p->drawTiledPixmap(x+2, y+2, w-4, h-4, *pix);
908- } 974- }
909-} 975-}
910 976
911 void LiquidStyle::drawFocusRect(QPainter *p, const QRect &r, 977 void LiquidStyle::drawFocusRect(QPainter *p, const QRect &r,
912 const QColorGroup &g, const QColor *c, 978 const QColorGroup &g, const QColor *c,
913@@ -2540,25 +2253,25 @@ 979@@ -2540,25 +2252,25 @@
914 return; 980 return;
915 } 981 }
916 else{ 982 else{
917- KStyle::drawFocusRect(p, r, g, c, atBorder); 983- KStyle::drawFocusRect(p, r, g, c, atBorder);
918+ QWindowsStyle::drawFocusRect(p, r, g, c, atBorder); 984+ QWindowsStyle::drawFocusRect(p, r, g, c, atBorder);
919 } 985 }
920 } 986 }
921 else 987 else
922- KStyle::drawFocusRect(p, r, g, c, atBorder); 988- KStyle::drawFocusRect(p, r, g, c, atBorder);
923+ QWindowsStyle::drawFocusRect(p, r, g, c, atBorder); 989+ QWindowsStyle::drawFocusRect(p, r, g, c, atBorder);
924 990
925 } 991 }
@@ -931,43 +997,43 @@ Features:
931+ QWindowsStyle::polishPopupMenu(mnu); 997+ QWindowsStyle::polishPopupMenu(mnu);
932 } 998 }
933 999
934 void LiquidStyle::drawTab(QPainter *p, const QTabBar *tabBar, QTab *tab, 1000 void LiquidStyle::drawTab(QPainter *p, const QTabBar *tabBar, QTab *tab,
935 bool selected) 1001 bool selected)
936 { 1002 {
937 if(tabBar->shape() != QTabBar::RoundedAbove){ 1003 if(tabBar->shape() != QTabBar::RoundedAbove){
938- KStyle::drawTab(p, tabBar, tab, selected); 1004- KStyle::drawTab(p, tabBar, tab, selected);
939+ QWindowsStyle::drawTab(p, tabBar, tab, selected); 1005+ QWindowsStyle::drawTab(p, tabBar, tab, selected);
940 return; 1006 return;
941 } 1007 }
942 QPixmap tilePix; 1008 QPixmap tilePix;
943@@ -2671,7 +2384,7 @@ 1009@@ -2671,7 +2383,7 @@
944 vFrame = 8; // was 10 1010 vFrame = 8; // was 10
945 } 1011 }
946 else 1012 else
947- KStyle::tabbarMetrics(t, hFrame, vFrame, overlap); 1013- KStyle::tabbarMetrics(t, hFrame, vFrame, overlap);
948+ QWindowsStyle::tabbarMetrics(t, hFrame, vFrame, overlap); 1014+ QWindowsStyle::tabbarMetrics(t, hFrame, vFrame, overlap);
949 } 1015 }
950 1016
951 1017
952@@ -2699,7 +2412,7 @@ 1018@@ -2699,7 +2411,7 @@
953 p->drawLine(x+1, y+1, x+1, y2-1); 1019 p->drawLine(x+1, y+1, x+1, y2-1);
954 } 1020 }
955 else if(lineWidth != 2 || !sunken) 1021 else if(lineWidth != 2 || !sunken)
956- KStyle::drawPanel(p, x, y, w, h, g, sunken, lineWidth, fill); 1022- KStyle::drawPanel(p, x, y, w, h, g, sunken, lineWidth, fill);
957+ QWindowsStyle::drawPanel(p, x, y, w, h, g, sunken, lineWidth, fill); 1023+ QWindowsStyle::drawPanel(p, x, y, w, h, g, sunken, lineWidth, fill);
958 else{ 1024 else{
959 QPen oldPen = p->pen(); 1025 QPen oldPen = p->pen();
960 int x2 = x+w-1; 1026 int x2 = x+w-1;
961@@ -2726,105 +2439,6 @@ 1027@@ -2726,105 +2438,6 @@
962 } 1028 }
963 } 1029 }
964 1030
965-void LiquidStyle::drawKickerAppletHandle(QPainter *p, int x, int y, int w, int h, 1031-void LiquidStyle::drawKickerAppletHandle(QPainter *p, int x, int y, int w, int h,
966- const QColorGroup &g, QBrush *) 1032- const QColorGroup &g, QBrush *)
967-{ 1033-{
968- p->fillRect(x, y, w, h, g.brush(QColorGroup::Background)); 1034- p->fillRect(x, y, w, h, g.brush(QColorGroup::Background));
969- drawClearBevel(p, x, y, w, h, highlightWidget == p->device() ? 1035- drawClearBevel(p, x, y, w, h, highlightWidget == p->device() ?
970- g.button().light(120) : g.button(), g.button()); 1036- g.button().light(120) : g.button(), g.button());
971- /* 1037- /*
972- if(h > w){ 1038- if(h > w){
973- int y2 = y+h-1; 1039- int y2 = y+h-1;
@@ -1055,25 +1121,25 @@ Features:
1055- } 1121- }
1056- 1122-
1057- p->setPen(g.buttonText()); 1123- p->setPen(g.buttonText());
1058- 1124-
1059- p->drawText(br.x()+ textPos, -1, w-textPos, h, 1125- p->drawText(br.x()+ textPos, -1, w-textPos, h,
1060- AlignLeft|AlignVCenter, s); 1126- AlignLeft|AlignVCenter, s);
1061- } 1127- }
1062- 1128-
1063-} 1129-}
1064 1130
1065 void LiquidStyle::adjustHSV(QPixmap &pix, int h, int s, int v) 1131 void LiquidStyle::adjustHSV(QPixmap &pix, int h, int s, int v)
1066 { 1132 {
1067@@ -2998,22 +2612,22 @@ 1133@@ -2998,22 +2611,22 @@
1068 customBtnIconList.clear(); 1134 customBtnIconList.clear();
1069 customBtnLabelList.clear(); 1135 customBtnLabelList.clear();
1070 1136
1071- KConfig *config = KGlobal::config(); 1137- KConfig *config = KGlobal::config();
1072- QString oldGrp = config->group(); 1138- QString oldGrp = config->group();
1073- config->setGroup("MosfetButtons"); 1139- config->setGroup("MosfetButtons");
1074+// KConfig *config = KGlobal::config(); 1140+// KConfig *config = KGlobal::config();
1075+// QString oldGrp = config->group(); 1141+// QString oldGrp = config->group();
1076+// config->setGroup("MosfetButtons"); 1142+// config->setGroup("MosfetButtons");
1077 1143
1078 QStrList iconList, colorList; //temp, we store QPixmaps and QColors 1144 QStrList iconList, colorList; //temp, we store QPixmaps and QColors
1079 iconList.setAutoDelete(true); 1145 iconList.setAutoDelete(true);
@@ -1085,51 +1151,51 @@ Features:
1085+// config->readListEntry("Icons", iconList); 1151+// config->readListEntry("Icons", iconList);
1086+// config->readListEntry("Colors", colorList); 1152+// config->readListEntry("Colors", colorList);
1087 1153
1088 const char *labelStr = customBtnLabelList.first(); 1154 const char *labelStr = customBtnLabelList.first();
1089 const char *colorStr = colorList.first(); 1155 const char *colorStr = colorList.first();
1090 const char *iconStr = iconList.first(); 1156 const char *iconStr = iconList.first();
1091 1157
1092- KIconLoader *ldr = KGlobal::iconLoader(); 1158- KIconLoader *ldr = KGlobal::iconLoader();
1093+// KIconLoader *ldr = KGlobal::iconLoader(); 1159+// KIconLoader *ldr = KGlobal::iconLoader();
1094 while(labelStr != NULL){ 1160 while(labelStr != NULL){
1095 QColor *c = new QColor; 1161 QColor *c = new QColor;
1096 c->setNamedColor(QString(colorStr)); 1162 c->setNamedColor(QString(colorStr));
1097@@ -3022,7 +2636,7 @@ 1163@@ -3022,7 +2635,7 @@
1098 QString tmpStr(iconStr); 1164 QString tmpStr(iconStr);
1099 if(!tmpStr.isEmpty()){ 1165 if(!tmpStr.isEmpty()){
1100 QPixmap *pixmap = 1166 QPixmap *pixmap =
1101- new QPixmap(ldr->loadIcon(tmpStr, KIcon::Small)); 1167- new QPixmap(ldr->loadIcon(tmpStr, KIcon::Small));
1102+ new QPixmap();//ldr->loadIcon(tmpStr, KIcon::Small)); 1168+ new QPixmap();//ldr->loadIcon(tmpStr, KIcon::Small));
1103 if(pixmap->isNull()){ 1169 if(pixmap->isNull()){
1104 delete pixmap; 1170 delete pixmap;
1105 customBtnIconList.append(NULL); 1171 customBtnIconList.append(NULL);
1106@@ -3037,7 +2651,6 @@ 1172@@ -3037,7 +2650,6 @@
1107 colorStr = colorList.next(); 1173 colorStr = colorList.next();
1108 iconStr = iconList.next(); 1174 iconStr = iconList.next();
1109 } 1175 }
1110- config->setGroup(oldGrp); 1176- config->setGroup(oldGrp);
1111 } 1177 }
1112 1178
1113 void LiquidStyle::applyCustomAttributes(QPushButton *btn) 1179 void LiquidStyle::applyCustomAttributes(QPushButton *btn)
1114@@ -3087,7 +2700,7 @@ 1180@@ -3087,7 +2699,7 @@
1115 } 1181 }
1116 } 1182 }
1117 1183
1118-#include "liquid.moc" 1184-#include "liquid.moc"
1119+// #include "liquid.moc" 1185+// #include "liquid.moc"
1120 1186
1121 1187
1122 1188
1123 --- -Sun Jun 30 22:38:02 2002 1189 --- -Mon Jul 1 11:38:05 2002
1124 +++ plugin.cppFri Jun 28 13:25:25 2002 1190 +++ plugin.cppFri Jun 28 13:25:25 2002
1125@@ -1,29 +1,29 @@ 1191@@ -1,29 +1,29 @@
1126 #include "liquid.h" 1192 #include "liquid.h"
1127-#include <klocale.h> 1193-#include <klocale.h>
1128+ 1194+
1129 1195
1130 extern "C" { 1196 extern "C" {
1131- KStyle* allocate(); 1197- KStyle* allocate();
1132- int minor_version(); 1198- int minor_version();
1133- int major_version(); 1199- int major_version();
1134- const char *description(); 1200- const char *description();
1135+ QStyle* allocate ( ); 1201+ QStyle* allocate ( );