summaryrefslogtreecommitdiff
authorsandman <sandman>2002-11-29 11:35:14 (UTC)
committer sandman <sandman>2002-11-29 11:35:14 (UTC)
commit3abc1725d255b507f42bcf060018d3ce0b461f4d (patch) (unidiff)
treeaf6b2ca73fbc570f104f44223ba7d7d201553cc6
parent96d75cae7e5f270a543b0eb6138c6967577f2b11 (diff)
downloadopie-3abc1725d255b507f42bcf060018d3ce0b461f4d.zip
opie-3abc1725d255b507f42bcf060018d3ce0b461f4d.tar.gz
opie-3abc1725d255b507f42bcf060018d3ce0b461f4d.tar.bz2
Not making at least qDebug outputs on every QToolButton redraw may speed
things up a bit ;)
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/styles/liquid/liquid.cpp7
-rw-r--r--noncore/styles/liquid/opie-liquid.diff137
2 files changed, 61 insertions, 83 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp
index daac22c..e6d8310 100644
--- a/noncore/styles/liquid/liquid.cpp
+++ b/noncore/styles/liquid/liquid.cpp
@@ -1106,4 +1106,2 @@ bool LiquidStyle::eventFilter(QObject *obj, QEvent *ev)
1106 btn->repaint(false); 1106 btn->repaint(false);
1107
1108 qDebug ( "TB FOCUS IN [%p]", btn );
1109 } 1107 }
@@ -1114,4 +1112,2 @@ bool LiquidStyle::eventFilter(QObject *obj, QEvent *ev)
1114 btn->repaint(false); 1112 btn->repaint(false);
1115
1116 qDebug ( "TB FOCUS OUT [%p]", btn );
1117 } 1113 }
@@ -1249,7 +1245,4 @@ void LiquidStyle::drawToolButton(QPainter *p, int x, int y, int w, int h,
1249 p->drawTiledPixmap(x+2, y+2, w-4, h-4, *pix); 1245 p->drawTiledPixmap(x+2, y+2, w-4, h-4, *pix);
1250 qDebug ( "DRAW TOOLBUTTON IN PIXMAP" );
1251 } 1246 }
1252 else{ 1247 else{
1253 qDebug ( "DRAW TOOLBUTTON sunken=%d/high=%p/device=%p", sunken, highlightWidget,p->device() );
1254
1255 drawClearBevel(p, x, y, w, h, sunken ? g.button() : 1248 drawClearBevel(p, x, y, w, h, sunken ? g.button() :
diff --git a/noncore/styles/liquid/opie-liquid.diff b/noncore/styles/liquid/opie-liquid.diff
index d90433c..9ae24cc 100644
--- a/noncore/styles/liquid/opie-liquid.diff
+++ b/noncore/styles/liquid/opie-liquid.diff
@@ -5,3 +5,3 @@ Features:
5 5
6 --- -2002-11-21 20:45:47.000000000 +0100 6 --- -2002-11-29 12:30:34.000000000 +0100
7 +++ liquid.h2002-11-18 03:32:40.000000000 +0100 7 +++ liquid.h2002-11-18 03:32:40.000000000 +0100
@@ -143,4 +143,4 @@ Features:
143 QPixmap *pixmaps[BITMAP_ITEMS]; 143 QPixmap *pixmaps[BITMAP_ITEMS];
144 --- -2002-11-21 20:45:47.000000000 +0100 144 --- -2002-11-29 12:30:34.000000000 +0100
145 +++ liquid.cpp2002-11-21 20:27:48.000000000 +0100 145 +++ liquid.cpp2002-11-29 12:30:24.000000000 +0100
146@@ -2,6 +2,9 @@ 146@@ -2,6 +2,9 @@
@@ -273,3 +273,3 @@ Features:
273 else{ // tear off menu 273 else{ // tear off menu
274@@ -121,82 +126,61 @@ 274@@ -121,82 +126,62 @@
275 stripePixmap(*pix, p->colorGroup().button()); 275 stripePixmap(*pix, p->colorGroup().button());
@@ -343,7 +343,6 @@ Features:
343- w->repaint(); 343- w->repaint();
344- }
345- }
344 + wid-> setBackgroundMode( QWidget::PaletteBackground ); 346 + wid-> setBackgroundMode( QWidget::PaletteBackground );
345 } 347 }
346 + delete ol;
347 }
348 }
349- } 348- }
@@ -367,4 +366,5 @@ Features:
367- ((LiquidStyle*)parent())->applyCustomAttributes((QPushButton *)w); 366- ((LiquidStyle*)parent())->applyCustomAttributes((QPushButton *)w);
368- } 367 + delete ol;
369- } 368 }
369 }
370+ return(false); 370+ return(false);
@@ -389,2 +389,3 @@ Features:
389 +flatTBButtons = false; 389 +flatTBButtons = false;
390 +currentHeader = 0;
390+ 391+
@@ -393,3 +394,3 @@ Features:
393 htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true); 394 htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true);
394@@ -207,12 +191,8 @@ 395@@ -207,12 +192,8 @@
395 btnDict.setAutoDelete(true); 396 btnDict.setAutoDelete(true);
@@ -406,3 +407,3 @@ Features:
406 btnBlendPix = new QPixmap; 407 btnBlendPix = new QPixmap;
407@@ -572,131 +552,119 @@ 408@@ -572,131 +553,119 @@
408 case HTMLBtnBorderDown: 409 case HTMLBtnBorderDown:
@@ -496,6 +497,6 @@ Features:
496+ pixmaps[CBDown] = processEmbedded("checkboxdown", btnH, btnS, btnV /*, true*/); 497+ pixmaps[CBDown] = processEmbedded("checkboxdown", btnH, btnS, btnV /*, true*/);
497+ break; 498 break;
498+ case CBDownHover: 499+ case CBDownHover:
499+ pixmaps[CBDownHover] = processEmbedded("checkboxdown", btnHoverH, btnHoverS, btnHoverV /*, true*/); 500+ pixmaps[CBDownHover] = processEmbedded("checkboxdown", btnHoverH, btnHoverS, btnHoverV /*, true*/);
500 break; 501+ break;
501+ 502+
@@ -601,3 +602,3 @@ Features:
601 case HSBSliderMidBg: 602 case HSBSliderMidBg:
602@@ -711,7 +679,6 @@ 603@@ -711,7 +680,6 @@
603 604
@@ -609,3 +610,3 @@ Features:
609 if(pixmaps[i]){ 610 if(pixmaps[i]){
610@@ -719,31 +686,28 @@ 611@@ -719,31 +687,28 @@
611 pixmaps[i] = NULL; 612 pixmaps[i] = NULL;
@@ -656,3 +657,3 @@ Features:
656 appPal.setBrush(QColorGroup::Button, btnBrush); 657 appPal.setBrush(QColorGroup::Button, btnBrush);
657@@ -778,8 +742,8 @@ 658@@ -778,8 +743,8 @@
658 adjustHSV(*pix, h, s, v); 659 adjustHSV(*pix, h, s, v);
@@ -667,3 +668,3 @@ Features:
667 pix = smallBevelFillDict.find(c.rgb()); // better be NULL ;-) 668 pix = smallBevelFillDict.find(c.rgb()); // better be NULL ;-)
668@@ -790,19 +754,13 @@ 669@@ -790,19 +755,13 @@
669 adjustHSV(*pix, h, s, v); 670 adjustHSV(*pix, h, s, v);
@@ -692,3 +693,3 @@ Features:
692 693
693@@ -817,101 +775,50 @@ 694@@ -817,101 +776,50 @@
694 wallPaper.fill(c.rgb()); 695 wallPaper.fill(c.rgb());
@@ -815,3 +816,3 @@ Features:
815 bool isViewport = qstrcmp(w->name(), "qt_viewport") == 0 || 816 bool isViewport = qstrcmp(w->name(), "qt_viewport") == 0 ||
816@@ -942,11 +849,20 @@ 817@@ -942,11 +850,20 @@
817 w->setMouseTracking(true); 818 w->setMouseTracking(true);
@@ -838,3 +839,3 @@ Features:
838 palette().active().brush(QColorGroup::Background).pixmap()){ 839 palette().active().brush(QColorGroup::Background).pixmap()){
839@@ -954,16 +870,21 @@ 840@@ -954,16 +871,21 @@
840 return; 841 return;
@@ -866,3 +867,3 @@ Features:
866 867
867@@ -977,6 +898,11 @@ 868@@ -977,6 +899,11 @@
868 869
@@ -878,3 +879,3 @@ Features:
878 return; 879 return;
879@@ -986,7 +912,7 @@ 880@@ -986,7 +913,7 @@
880 ((qstrcmp(w->parent()->name(), "qt_viewport") == 0) || 881 ((qstrcmp(w->parent()->name(), "qt_viewport") == 0) ||
@@ -887,3 +888,3 @@ Features:
887 w->setBackgroundMode(QWidget::PaletteButton); 888 w->setBackgroundMode(QWidget::PaletteButton);
888@@ -997,16 +923,12 @@ 889@@ -997,16 +924,12 @@
889 if(isViewportChild) 890 if(isViewportChild)
@@ -909,3 +910,3 @@ Features:
909 if(w->inherits("QButton") || w->inherits("QComboBox")){ 910 if(w->inherits("QButton") || w->inherits("QComboBox")){
910@@ -1014,9 +936,12 @@ 911@@ -1014,9 +937,12 @@
911 w->setAutoMask(false); 912 w->setAutoMask(false);
@@ -924,3 +925,3 @@ Features:
924 if(w->inherits("QHeader")){ 925 if(w->inherits("QHeader")){
925@@ -1028,22 +953,118 @@ 926@@ -1028,22 +954,118 @@
926 void LiquidStyle::polish(QApplication *app) 927 void LiquidStyle::polish(QApplication *app)
@@ -1045,3 +1046,3 @@ Features:
1045 * force everything to erase and repaint on resize. This is going away, I'm 1046 * force everything to erase and repaint on resize. This is going away, I'm
1046@@ -1063,7 +1084,7 @@ 1047@@ -1063,7 +1085,7 @@
1047 */ 1048 */
@@ -1054,3 +1055,3 @@ Features:
1054 QObjectListIt it(*tbChildList); 1055 QObjectListIt it(*tbChildList);
1055@@ -1076,116 +1097,27 @@ 1056@@ -1076,116 +1098,23 @@
1056 1057
@@ -1123,4 +1124,2 @@ Features:
1123 btn->repaint(false); 1124 btn->repaint(false);
1124+
1125 + qDebug ( "TB FOCUS IN [%p]", btn );
1126 } 1125 }
@@ -1133,4 +1132,2 @@ Features:
1133 btn->repaint(false); 1132 btn->repaint(false);
1134+
1135+ qDebug ( "TB FOCUS OUT [%p]", btn );
1136 } 1133 }
@@ -1182,3 +1179,3 @@ Features:
1182 else if(obj->inherits("QRadioButton") || obj->inherits("QCheckBox")){ 1179 else if(obj->inherits("QRadioButton") || obj->inherits("QCheckBox")){
1183@@ -1201,6 +1133,7 @@ 1180@@ -1201,6 +1130,7 @@
1184 QSize sz = isRadio ? exclusiveIndicatorSize() 1181 QSize sz = isRadio ? exclusiveIndicatorSize()
@@ -1190,3 +1187,3 @@ Features:
1190 p.setPen(btn->colorGroup().button().dark(140)); 1187 p.setPen(btn->colorGroup().button().dark(140));
1191@@ -1209,6 +1142,7 @@ 1188@@ -1209,6 +1139,7 @@
1192 p.drawLine(r.right(), r.y()+1, r.right(), r.bottom()-1); 1189 p.drawLine(r.right(), r.y()+1, r.right(), r.bottom()-1);
@@ -1198,3 +1195,3 @@ Features:
1198 if(isRadio) 1195 if(isRadio)
1199@@ -1228,36 +1162,6 @@ 1196@@ -1228,36 +1159,6 @@
1200 p.end(); 1197 p.end();
@@ -1235,3 +1232,3 @@ Features:
1235 QHeader *hw = (QHeader *)obj; 1232 QHeader *hw = (QHeader *)obj;
1236@@ -1290,7 +1194,24 @@ 1233@@ -1290,7 +1191,24 @@
1237 } 1234 }
@@ -1261,15 +1258,3 @@ Features:
1261 void LiquidStyle::drawButton(QPainter *p, int x, int y, int w, int h, 1258 void LiquidStyle::drawButton(QPainter *p, int x, int y, int w, int h,
1262@@ -1325,8 +1246,11 @@ 1259@@ -1340,11 +1258,6 @@
1263 }
1264
1265 p->drawTiledPixmap(x+2, y+2, w-4, h-4, *pix);
1266+ qDebug ( "DRAW TOOLBUTTON IN PIXMAP" );
1267 }
1268 else{
1269 + qDebug ( "DRAW TOOLBUTTON sunken=%d/high=%p/device=%p", sunken, highlightWidget,p->device() );
1270+
1271 drawClearBevel(p, x, y, w, h, sunken ? g.button() :
1272 highlightWidget == p->device() ? g.button().light(110) :
1273 g.background(), g.background());
1274@@ -1340,11 +1264,6 @@
1275 QColorGroup g = btn->colorGroup(); 1260 QColorGroup g = btn->colorGroup();
@@ -1285,3 +1270,3 @@ Features:
1285 QColor c = btn->hasFocus() ? g.button().light(110) : g.background(); 1270 QColor c = btn->hasFocus() ? g.button().light(110) : g.background();
1286@@ -1488,7 +1407,20 @@ 1271@@ -1488,7 +1401,20 @@
1287 const QColorGroup &g, bool sunken, 1272 const QColorGroup &g, bool sunken,
@@ -1307,3 +1292,3 @@ Features:
1307 isMasked = ((QWidget*)painter->device())->autoMask(); 1292 isMasked = ((QWidget*)painter->device())->autoMask();
1308@@ -1498,7 +1430,7 @@ 1293@@ -1498,7 +1424,7 @@
1309 1294
@@ -1316,3 +1301,3 @@ Features:
1316 sunken, false, isMasked); 1301 sunken, false, isMasked);
1317@@ -1550,16 +1482,17 @@ 1302@@ -1550,16 +1476,17 @@
1318 return(QRect(x+9, y+3, w - (h / 3) - 20, h-6)); 1303 return(QRect(x+9, y+3, w - (h / 3) - 20, h-6));
@@ -1337,3 +1322,3 @@ Features:
1337 1322
1338@@ -1596,7 +1529,7 @@ 1323@@ -1596,7 +1523,7 @@
1339 if(sbBuffer.size() != sb->size()) 1324 if(sbBuffer.size() != sb->size())
@@ -1346,3 +1331,3 @@ Features:
1346 subHC.setRect(addX-buttonDim,addY,buttonDim,buttonDim ); 1331 subHC.setRect(addX-buttonDim,addY,buttonDim,buttonDim );
1347@@ -1624,7 +1557,7 @@ 1332@@ -1624,7 +1551,7 @@
1348 QPainter painter; 1333 QPainter painter;
@@ -1355,3 +1340,3 @@ Features:
1355 13, 8); 1340 13, 8);
1356@@ -1648,25 +1581,15 @@ 1341@@ -1648,25 +1575,15 @@
1357 } 1342 }
@@ -1386,3 +1371,3 @@ Features:
1386 painter.setPen(g.button().dark(210)); 1371 painter.setPen(g.button().dark(210));
1387@@ -1674,7 +1597,6 @@ 1372@@ -1674,7 +1591,6 @@
1388 13, sliderR.height()); 1373 13, sliderR.height());
@@ -1394,3 +1379,3 @@ Features:
1394 } 1379 }
1395@@ -1690,7 +1612,7 @@ 1380@@ -1690,7 +1606,7 @@
1396 } 1381 }
@@ -1403,3 +1388,3 @@ Features:
1403 8, 13); 1388 8, 13);
1404@@ -1715,22 +1637,17 @@ 1389@@ -1715,22 +1631,17 @@
1405 if(controls & Slider){ 1390 if(controls & Slider){
@@ -1429,3 +1414,3 @@ Features:
1429 else{ 1414 else{
1430@@ -1738,8 +1655,7 @@ 1415@@ -1738,8 +1649,7 @@
1431 drawRoundRect(&painter, sliderR.x(), sliderR.y()+1, 1416 drawRoundRect(&painter, sliderR.x(), sliderR.y()+1,
@@ -1439,3 +1424,3 @@ Features:
1439 } 1424 }
1440@@ -1761,10 +1677,10 @@ 1425@@ -1761,10 +1671,10 @@
1441 addB.width()-8, addB.height()-8, g, !maxed); 1426 addB.width()-8, addB.height()-8, g, !maxed);
@@ -1454,3 +1439,3 @@ Features:
1454 false, subHC.x()+4, subHC.y()+4, 1439 false, subHC.x()+4, subHC.y()+4,
1455@@ -1865,8 +1781,8 @@ 1440@@ -1865,8 +1775,8 @@
1456 else 1441 else
@@ -1465,3 +1450,3 @@ Features:
1465 sliderLength = maxLength; 1450 sliderLength = maxLength;
1466@@ -1914,31 +1830,31 @@ 1451@@ -1914,31 +1824,31 @@
1467 return(QSize(16, 16)); 1452 return(QSize(16, 16));
@@ -1504,3 +1489,3 @@ Features:
1504 } 1489 }
1505@@ -1957,25 +1873,25 @@ 1490@@ -1957,25 +1867,25 @@
1506 return(QSize(20, 22)); 1491 return(QSize(20, 22));
@@ -1536,3 +1521,3 @@ Features:
1536 if(state == QButton::On){ 1521 if(state == QButton::On){
1537@@ -1992,12 +1908,12 @@ 1522@@ -1992,12 +1902,12 @@
1538 }*/ 1523 }*/
@@ -1552,3 +1537,3 @@ Features:
1552 p->drawPixmap(x, y, *getPixmap(HTMLCB)->mask()); 1537 p->drawPixmap(x, y, *getPixmap(HTMLCB)->mask());
1553@@ -2005,18 +1921,17 @@ 1538@@ -2005,18 +1915,17 @@
1554 } 1539 }
@@ -1574,3 +1559,3 @@ Features:
1574 p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider)->mask() : 1559 p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider)->mask() :
1575@@ -2065,243 +1980,76 @@ 1560@@ -2065,243 +1974,76 @@
1576 p->drawLineSegments(a); 1561 p->drawLineSegments(a);
@@ -1635,5 +1620,5 @@ Features:
1635- } 1620- }
1636
1637-}
1638- 1621-
1622-}
1623
1639-void LiquidStyle::drawKToolBar(QPainter *p, int x, int y, int w, int h, 1624-void LiquidStyle::drawKToolBar(QPainter *p, int x, int y, int w, int h,
@@ -1847,3 +1832,3 @@ Features:
1847 switch(menuHandler->transType()){ 1832 switch(menuHandler->transType()){
1848@@ -2336,8 +2084,6 @@ 1833@@ -2336,8 +2078,6 @@
1849 1834
@@ -1856,3 +1841,3 @@ Features:
1856 QColorGroup itemg = dis ? pal.disabled() : pal.active(); 1841 QColorGroup itemg = dis ? pal.disabled() : pal.active();
1857@@ -2363,7 +2109,7 @@ 1842@@ -2363,7 +2103,7 @@
1858 p->fillRect(x, y, w, h, menuBrush); 1843 p->fillRect(x, y, w, h, menuBrush);
@@ -1865,3 +1850,3 @@ Features:
1865 } 1850 }
1866@@ -2508,25 +2254,6 @@ 1851@@ -2508,25 +2248,6 @@
1867 return h; 1852 return h;
@@ -1891,3 +1876,3 @@ Features:
1891 const QColorGroup &g, const QColor *c, 1876 const QColorGroup &g, const QColor *c,
1892@@ -2536,29 +2263,29 @@ 1877@@ -2536,29 +2257,29 @@
1893 if(p->device()->devType() == QInternal::Widget){ 1878 if(p->device()->devType() == QInternal::Widget){
@@ -1926,3 +1911,3 @@ Features:
1926 QPixmap tilePix; 1911 QPixmap tilePix;
1927@@ -2671,7 +2398,7 @@ 1912@@ -2671,7 +2392,7 @@
1928 vFrame = 8; // was 10 1913 vFrame = 8; // was 10
@@ -1935,3 +1920,3 @@ Features:
1935 1920
1936@@ -2699,7 +2426,7 @@ 1921@@ -2699,7 +2420,7 @@
1937 p->drawLine(x+1, y+1, x+1, y2-1); 1922 p->drawLine(x+1, y+1, x+1, y2-1);
@@ -1944,3 +1929,3 @@ Features:
1944 int x2 = x+w-1; 1929 int x2 = x+w-1;
1945@@ -2726,105 +2453,6 @@ 1930@@ -2726,105 +2447,6 @@
1946 } 1931 }
@@ -2050,3 +2035,3 @@ Features:
2050 { 2035 {
2051@@ -2988,110 +2616,5 @@ 2036@@ -2988,110 +2610,5 @@
2052 } 2037 }
@@ -2161,3 +2146,3 @@ Features:
2161 /* vim: set noet sw=8 ts=8: */ 2146 /* vim: set noet sw=8 ts=8: */
2162 --- -2002-11-21 20:45:47.000000000 +0100 2147 --- -2002-11-29 12:30:35.000000000 +0100
2163 +++ plugin.cpp2002-11-18 18:11:41.000000000 +0100 2148 +++ plugin.cpp2002-11-18 18:11:41.000000000 +0100