summaryrefslogtreecommitdiff
path: root/noncore
authorsandman <sandman>2002-07-01 09:41:55 (UTC)
committer sandman <sandman>2002-07-01 09:41:55 (UTC)
commit05d74acac3af056bfd784c6f2b7f72d313ea64bc (patch) (unidiff)
tree8138f495cdd08fa249bd429ddefc36df26b12a79 /noncore
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 (limited to 'noncore') (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
@@ -1828,6 +1828,6 @@ QSize LiquidStyle::exclusiveIndicatorSize() const
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{
@@ -1871,6 +1871,6 @@ QSize LiquidStyle::indicatorSize() const
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();
@@ -1910,6 +1910,6 @@ void LiquidStyle::drawIndicator(QPainter *p, int x, int y, int w, int h,
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
@@ -1919,16 +1919,15 @@ void LiquidStyle::drawIndicatorMask(QPainter *p, int x, int y, int w, int h,
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{
@@ -1981,5 +1980,5 @@ void LiquidStyle::drawArrow(QPainter *p, Qt::ArrowType type, bool on, int x,
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
@@ -2035,6 +2034,6 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
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;
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
@@ -4,5 +4,5 @@ Features:
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 @@
@@ -103,6 +103,6 @@ Features:
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
@@ -653,5 +653,60 @@ Features:
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 }
@@ -720,5 +775,5 @@ Features:
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));
@@ -867,5 +922,16 @@ Features:
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 );
@@ -876,5 +942,5 @@ Features:
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 }
@@ -885,5 +951,5 @@ Features:
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 }
@@ -911,5 +977,5 @@ Features:
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 }
@@ -941,5 +1007,5 @@ Features:
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 }
@@ -950,5 +1016,5 @@ Features:
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 }
@@ -959,5 +1025,5 @@ Features:
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 }
@@ -1065,5 +1131,5 @@ Features:
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();
@@ -1095,5 +1161,5 @@ Features:
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()){
@@ -1104,5 +1170,5 @@ Features:
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();
@@ -1112,5 +1178,5 @@ Features:
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 }
@@ -1121,5 +1187,5 @@ Features:
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 @@