summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/liquid/opie-liquid.diff167
1 files changed, 110 insertions, 57 deletions
diff --git a/noncore/styles/liquid/opie-liquid.diff b/noncore/styles/liquid/opie-liquid.diff
index f902cb8..ef7300d 100644
--- a/noncore/styles/liquid/opie-liquid.diff
+++ b/noncore/styles/liquid/opie-liquid.diff
@@ -4,6 +4,6 @@ Features:
4 - works with Qt/E on QPE/OPIE 4 - works with Qt/E on QPE/OPIE
5 5
6 --- -Mon Jun 24 19:05:49 2002 6 --- -Sun Jun 30 22:38:02 2002
7 +++ liquid.hFri Jun 21 14:48:21 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
@@ -103,7 +103,7 @@ 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 --- -Mon Jun 24 19:05:49 2002 105 --- -Sun Jun 30 22:38:02 2002
106 +++ liquid.cppFri Jun 21 22:02:55 2002 106 +++ liquid.cppSun Jun 30 22:37:56 2002
107@@ -10,12 +10,9 @@ 107@@ -10,12 +10,10 @@
108 108
109 #include <qmenudata.h> 109 #include <qmenudata.h>
@@ -115,4 +115,5 @@ Features:
115-#include <kglobalsettings.h> 115-#include <kglobalsettings.h>
116-#include <kpixmapeffect.h> 116-#include <kpixmapeffect.h>
117+#include "liquiddeco.h"
117+#include <qapplication.h> 118+#include <qapplication.h>
118+#include <qpe/config.h> 119+#include <qpe/config.h>
@@ -121,5 +122,5 @@ Features:
121 #include <qbitmap.h> 122 #include <qbitmap.h>
122 #include <qtabbar.h> 123 #include <qtabbar.h>
123@@ -25,28 +22,29 @@ 124@@ -25,28 +23,29 @@
124 #include <qtimer.h> 125 #include <qtimer.h>
125 #include <qpixmapcache.h> 126 #include <qpixmapcache.h>
@@ -161,5 +162,5 @@ Features:
161 int r, g, b; 162 int r, g, b;
162 for(y=0; y < img.height(); y+=3){ 163 for(y=0; y < img.height(); y+=3){
163@@ -71,24 +69,21 @@ 164@@ -71,35 +70,37 @@
164 : QObject(parent) 165 : QObject(parent)
165 { 166 {
@@ -190,9 +191,18 @@ Features:
190+ fgColor = QColor ( config. readEntry("TextColor", QApplication::palette().active().text().name())); 191+ fgColor = QColor ( config. readEntry("TextColor", QApplication::palette().active().text().name()));
191+ opacity = config. readNumEntry("Opacity", 10); 192+ opacity = config. readNumEntry("Opacity", 10);
193+ if ( opacity < -20 )
194 + opacity = 20;
195+ else if ( opacity > 20 )
196 + opacity = 20;
197+
192+ shadowText = config. readBoolEntry("ShadowText", true); 198+ shadowText = config. readBoolEntry("ShadowText", true);
193 } 199 }
194 200
195 bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev) 201 bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev)
196@@ -99,7 +94,7 @@ 202 {
203- QPopupMenu *p = (QPopupMenu *)obj;
204+ QWidget *p = (QWidget *)obj;
205
206 if(ev->type() == QEvent::Show){
197 if(type == TransStippleBg || type == TransStippleBtn || 207 if(type == TransStippleBg || type == TransStippleBtn ||
198 type == Custom){ 208 type == Custom){
@@ -203,5 +213,5 @@ Features:
203 QRect r(p->x(), p->y(), p->width(), p->height()); 213 QRect r(p->x(), p->y(), p->width(), p->height());
204 QRect deskR = QApplication::desktop()->rect(); 214 QRect deskR = QApplication::desktop()->rect();
205@@ -107,7 +102,7 @@ 215@@ -107,7 +108,7 @@
206 r.setBottom(deskR.bottom()); 216 r.setBottom(deskR.bottom());
207 r.setRight(deskR.right()); 217 r.setRight(deskR.right());
@@ -212,5 +222,5 @@ Features:
212 } 222 }
213 else{ // tear off menu 223 else{ // tear off menu
214@@ -121,7 +116,7 @@ 224@@ -121,82 +122,54 @@
215 stripePixmap(*pix, p->colorGroup().button()); 225 stripePixmap(*pix, p->colorGroup().button());
216 } 226 }
@@ -219,17 +229,31 @@ Features:
219+ QPixmapEffect::fade(*pix, (((float)opacity)+80)*0.01, color); 229+ QPixmapEffect::fade(*pix, (((float)opacity)+80)*0.01, color);
220 } 230 }
231+
232+ if (p->inherits("QPopupMenu"))
221 pixDict.insert(p->winId(), pix); 233 pixDict.insert(p->winId(), pix);
234+ else {
235 + p->setBackgroundPixmap(*pix);
236 +
237 + QObjectList *ol = p-> queryList("QWidget");
238 + for ( QObjectListIt it( *ol ); it. current ( ); ++it ) {
239 + QWidget *wid = (QWidget *) it.current ( );
240 +
241 + wid-> setBackgroundPixmap(*pix);
242 + wid-> setBackgroundOrigin(QWidget::ParentOrigin);
243+ }
244 + delete ol;
245 + }
222 } 246 }
223@@ -129,74 +124,19 @@ 247 }
224 else if(ev->type() == QEvent::Hide){ 248 else if(ev->type() == QEvent::Hide){
225 if(type == TransStippleBg || type == TransStippleBtn || 249 if(type == TransStippleBg || type == TransStippleBtn ||
226 type == Custom){ 250 type == Custom){
227- qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width()); 251- qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width());
252- pixDict.remove(p->winId());
253- }
254- }
255- return(false);
256-}
228+// qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width()); 257+// qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width());
229 pixDict.remove(p->winId());
230 }
231 }
232 return(false);
233 }
234 258
235-void TransMenuHandler::slotKIPCMessage(int id, int) 259-void TransMenuHandler::slotKIPCMessage(int id, int)
@@ -253,7 +277,14 @@ Features:
253- } 277- }
254- } 278- }
255- 279+ if (p->inherits("QPopupMenu"))
280+ pixDict.remove(p->winId());
281+ else {
282 + p->setBackgroundMode(QWidget::PaletteBackground);
283
256- reloadSettings(); 284- reloadSettings();
257- 285 + QObjectList *ol = p-> queryList("QWidget");
286 + for ( QObjectListIt it( *ol ); it. current ( ); ++it ) {
287 + QWidget *wid = (QWidget *) it.current ( );
288
258- // Now repaint menubar if needed 289- // Now repaint menubar if needed
259- if(shadowText != oldShadow){ 290- if(shadowText != oldShadow){
@@ -277,5 +308,6 @@ Features:
277- if(w->inherits("QPushButton")){ 308- if(w->inherits("QPushButton")){
278- ((LiquidStyle*)parent())->unapplyCustomAttributes((QPushButton *)w); 309- ((LiquidStyle*)parent())->unapplyCustomAttributes((QPushButton *)w);
279- } 310 + wid-> setBackgroundMode( QWidget::PaletteBackground );
311 }
280- } 312- }
281- ((LiquidStyle*)parent())->loadCustomButtons(); 313- ((LiquidStyle*)parent())->loadCustomButtons();
@@ -285,10 +317,13 @@ Features:
285- if(w->inherits("QPushButton")){ 317- if(w->inherits("QPushButton")){
286- ((LiquidStyle*)parent())->applyCustomAttributes((QPushButton *)w); 318- ((LiquidStyle*)parent())->applyCustomAttributes((QPushButton *)w);
287- } 319 + delete ol;
288- } 320 }
321 }
289- 322-
290- } 323 }
291-} 324+ return(false);
325 }
292 326
327+
293 LiquidStyle::LiquidStyle() 328 LiquidStyle::LiquidStyle()
294- :KStyle() 329- :KStyle()
@@ -300,5 +335,5 @@ Features:
300 btnMaskBmp.setMask(btnMaskBmp); 335 btnMaskBmp.setMask(btnMaskBmp);
301 htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true); 336 htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true);
302@@ -730,20 +670,19 @@ 337@@ -730,20 +703,19 @@
303 } 338 }
304 339
@@ -326,5 +361,5 @@ Features:
326 QBrush btnBrush(QColor(200, 202, 228)); 361 QBrush btnBrush(QColor(200, 202, 228));
327 appPal.setBrush(QColorGroup::Button, btnBrush); 362 appPal.setBrush(QColorGroup::Button, btnBrush);
328@@ -794,15 +733,7 @@ 363@@ -794,15 +766,7 @@
329 pagerBrush.setPixmap(*pix); 364 pagerBrush.setPixmap(*pix);
330 365
@@ -343,5 +378,5 @@ Features:
343 c.light(120).hsv(&bHoverH, &bHoverS, &bHoverV); 378 c.light(120).hsv(&bHoverH, &bHoverS, &bHoverV);
344 379
345@@ -825,13 +756,10 @@ 380@@ -825,13 +789,10 @@
346 painter.end(); 381 painter.end();
347 bgBrush.setColor(c); 382 bgBrush.setColor(c);
@@ -358,5 +393,5 @@ Features:
358 basePix.resize(32, 32); 393 basePix.resize(32, 32);
359 basePix.fill(c.rgb()); 394 basePix.fill(c.rgb());
360@@ -857,51 +785,27 @@ 395@@ -857,51 +818,31 @@
361 } 396 }
362 } 397 }
@@ -376,4 +411,7 @@ Features:
376 if(w->inherits("QPopupMenu")) 411 if(w->inherits("QPopupMenu"))
377 w->setBackgroundMode(QWidget::NoBackground); 412 w->setBackgroundMode(QWidget::NoBackground);
413+ else if(w-> testWFlags(Qt::WType_Popup) && !w->inherits("QListBox")) {
414 + w->installEventFilter(menuHandler);
415+ }
378 416
379 if(w->isTopLevel()){ 417 if(w->isTopLevel()){
@@ -403,4 +441,5 @@ Features:
403- w->setPalette(kapp->palette()); 441- w->setPalette(kapp->palette());
404- } 442- }
443+
405+ 444+
406+ w-> setBackgroundOrigin ( QWidget::ParentOrigin ); 445+ w-> setBackgroundOrigin ( QWidget::ParentOrigin );
@@ -415,5 +454,5 @@ Features:
415 } 454 }
416 if(w->inherits("QLineEdit")){ 455 if(w->inherits("QLineEdit")){
417@@ -913,6 +817,9 @@ 456@@ -913,6 +854,9 @@
418 applyCustomAttributes((QPushButton *)w); 457 applyCustomAttributes((QPushButton *)w);
419 w->installEventFilter(this); 458 w->installEventFilter(this);
@@ -425,5 +464,5 @@ Features:
425 bool isViewport = qstrcmp(w->name(), "qt_viewport") == 0 || 464 bool isViewport = qstrcmp(w->name(), "qt_viewport") == 0 ||
426 qstrcmp(w->name(), "qt_clipped_viewport") == 0; 465 qstrcmp(w->name(), "qt_clipped_viewport") == 0;
427@@ -942,11 +849,12 @@ 466@@ -942,11 +886,12 @@
428 w->setMouseTracking(true); 467 w->setMouseTracking(true);
429 w->installEventFilter(this); 468 w->installEventFilter(this);
@@ -440,5 +479,5 @@ Features:
440 if(w->parent() && w->parent()->isWidgetType() && !((QWidget*)w->parent())-> 479 if(w->parent() && w->parent()->isWidgetType() && !((QWidget*)w->parent())->
441 palette().active().brush(QColorGroup::Background).pixmap()){ 480 palette().active().brush(QColorGroup::Background).pixmap()){
442@@ -954,17 +862,18 @@ 481@@ -954,17 +899,18 @@
443 return; 482 return;
444 } 483 }
@@ -462,5 +501,15 @@ Features:
462 501
463 void LiquidStyle::unPolish(QWidget *w) 502 void LiquidStyle::unPolish(QWidget *w)
464@@ -1001,12 +910,14 @@ 503@@ -977,6 +923,9 @@
504
505 if(w->inherits("QPopupMenu"))
506 w->setBackgroundMode(QWidget::PaletteButton);
507+ else if(w-> testWFlags(Qt::WType_Popup) && !w->inherits("QListBox")) {
508 + w->removeEventFilter(menuHandler);
509+ }
510
511 if(w->isTopLevel())
512 return;
513@@ -1001,12 +950,14 @@
465 unapplyCustomAttributes((QPushButton *)w); 514 unapplyCustomAttributes((QPushButton *)w);
466 w->removeEventFilter(this); 515 w->removeEventFilter(this);
@@ -481,5 +530,5 @@ Features:
481 } 530 }
482 if(w->inherits("QButton") || w->inherits("QComboBox")){ 531 if(w->inherits("QButton") || w->inherits("QComboBox")){
483@@ -1014,9 +925,9 @@ 532@@ -1014,9 +965,9 @@
484 w->setAutoMask(false); 533 w->setAutoMask(false);
485 } 534 }
@@ -493,5 +542,5 @@ Features:
493 } 542 }
494 if(w->inherits("QHeader")){ 543 if(w->inherits("QHeader")){
495@@ -1028,20 +939,24 @@ 544@@ -1028,20 +979,28 @@
496 void LiquidStyle::polish(QApplication *app) 545 void LiquidStyle::polish(QApplication *app)
497 { 546 {
@@ -507,4 +556,6 @@ Features:
507 + 556 +
508+ qt_set_draw_menu_bar_impl((QDrawMenuBarItemImpl) &LiquidStyle::drawMenuBarItem); 557+ qt_set_draw_menu_bar_impl((QDrawMenuBarItemImpl) &LiquidStyle::drawMenuBarItem);
558+
559+ QApplication::qwsSetDecoration ( new LiquidDecoration ( ));
509 } 560 }
510 561
@@ -517,8 +568,10 @@ Features:
517+ 568+
518+ qt_set_draw_menu_bar_impl ( 0 ); 569+ qt_set_draw_menu_bar_impl ( 0 );
570+
571+ QApplication::qwsSetDecoration ( new QPEDecoration ( ));
519 } 572 }
520 573
521 /* 574 /*
522@@ -1063,7 +978,7 @@ 575@@ -1063,7 +1022,7 @@
523 */ 576 */
524 bool LiquidStyle::eventFilter(QObject *obj, QEvent *ev) 577 bool LiquidStyle::eventFilter(QObject *obj, QEvent *ev)
@@ -529,5 +582,5 @@ Features:
529 const QObjectList *tbChildList = obj->children(); 582 const QObjectList *tbChildList = obj->children();
530 QObjectListIt it(*tbChildList); 583 QObjectListIt it(*tbChildList);
531@@ -1076,35 +991,7 @@ 584@@ -1076,35 +1035,7 @@
532 585
533 } 586 }
@@ -566,5 +619,5 @@ Features:
566 if(ev->type() == QEvent::Enter){ 619 if(ev->type() == QEvent::Enter){
567 if(btn->isEnabled()){ 620 if(btn->isEnabled()){
568@@ -1119,20 +1006,7 @@ 621@@ -1119,20 +1050,7 @@
569 } 622 }
570 } 623 }
@@ -588,5 +641,5 @@ Features:
588 if(!btn->autoRaise()){ 641 if(!btn->autoRaise()){
589 if(btn->isEnabled()){ 642 if(btn->isEnabled()){
590@@ -1340,11 +1214,6 @@ 643@@ -1340,11 +1258,6 @@
591 QColorGroup g = btn->colorGroup(); 644 QColorGroup g = btn->colorGroup();
592 645
@@ -600,5 +653,5 @@ Features:
600 if(btn->hasFocus() || btn->isDefault()){ 653 if(btn->hasFocus() || btn->isDefault()){
601 QColor c = btn->hasFocus() ? g.button().light(110) : g.background(); 654 QColor c = btn->hasFocus() ? g.button().light(110) : g.background();
602@@ -2065,203 +1934,24 @@ 655@@ -2065,203 +1978,24 @@
603 p->drawLineSegments(a); 656 p->drawLineSegments(a);
604 } 657 }
@@ -661,7 +714,7 @@ Features:
661- &g.brush(QColorGroup::Background)); 714- &g.brush(QColorGroup::Background));
662- } 715- }
663
664-}
665- 716-
717-}
718
666-void LiquidStyle::drawKToolBar(QPainter *p, int x, int y, int w, int h, 719-void LiquidStyle::drawKToolBar(QPainter *p, int x, int y, int w, int h,
667- const QColorGroup &g, KToolBarPos, QBrush *) 720- const QColorGroup &g, KToolBarPos, QBrush *)
@@ -694,6 +747,5 @@ Features:
694- if(sunken) 747- if(sunken)
695- ++x, ++y; 748- ++x, ++y;
696+ p-> fillRect ( x, y, w, h, g.brush(QColorGroup::Background)); 749-
697
698- QColor btnColor(sunken ? g.button() : raised ? g.button().light(110) : 750- QColor btnColor(sunken ? g.button() : raised ? g.button().light(110) :
699- g.background()); 751- g.background());
@@ -794,5 +846,6 @@ Features:
794- } 846- }
795-} 847-}
796- 848+ p-> fillRect ( x, y, w, h, g.brush(QColorGroup::Background));
849
797- 850-
798-void LiquidStyle::drawKMenuItem(QPainter *p, int x, int y, int w, int h, 851-void LiquidStyle::drawKMenuItem(QPainter *p, int x, int y, int w, int h,
@@ -814,5 +867,5 @@ Features:
814 } 867 }
815 else 868 else
816@@ -2336,8 +2026,6 @@ 869@@ -2336,8 +2070,6 @@
817 870
818 maxpmw = QMAX( maxpmw, 20 ); 871 maxpmw = QMAX( maxpmw, 20 );
@@ -823,5 +876,5 @@ Features:
823 bool dis = !enabled; 876 bool dis = !enabled;
824 QColorGroup itemg = dis ? pal.disabled() : pal.active(); 877 QColorGroup itemg = dis ? pal.disabled() : pal.active();
825@@ -2363,7 +2051,7 @@ 878@@ -2363,7 +2095,7 @@
826 p->fillRect(x, y, w, h, menuBrush); 879 p->fillRect(x, y, w, h, menuBrush);
827 } 880 }
@@ -832,5 +885,5 @@ Features:
832 p->drawPixmap(x, y, *pix, x, y, w, h); 885 p->drawPixmap(x, y, *pix, x, y, w, h);
833 } 886 }
834@@ -2508,25 +2196,6 @@ 887@@ -2508,25 +2240,6 @@
835 return h; 888 return h;
836 } 889 }
@@ -858,5 +911,5 @@ Features:
858 void LiquidStyle::drawFocusRect(QPainter *p, const QRect &r, 911 void LiquidStyle::drawFocusRect(QPainter *p, const QRect &r,
859 const QColorGroup &g, const QColor *c, 912 const QColorGroup &g, const QColor *c,
860@@ -2540,25 +2209,25 @@ 913@@ -2540,25 +2253,25 @@
861 return; 914 return;
862 } 915 }
@@ -888,5 +941,5 @@ Features:
888 } 941 }
889 QPixmap tilePix; 942 QPixmap tilePix;
890@@ -2671,7 +2340,7 @@ 943@@ -2671,7 +2384,7 @@
891 vFrame = 8; // was 10 944 vFrame = 8; // was 10
892 } 945 }
@@ -897,5 +950,5 @@ Features:
897 950
898 951
899@@ -2699,7 +2368,7 @@ 952@@ -2699,7 +2412,7 @@
900 p->drawLine(x+1, y+1, x+1, y2-1); 953 p->drawLine(x+1, y+1, x+1, y2-1);
901 } 954 }
@@ -906,5 +959,5 @@ Features:
906 QPen oldPen = p->pen(); 959 QPen oldPen = p->pen();
907 int x2 = x+w-1; 960 int x2 = x+w-1;
908@@ -2726,105 +2395,6 @@ 961@@ -2726,105 +2439,6 @@
909 } 962 }
910 } 963 }
@@ -1012,5 +1065,5 @@ Features:
1012 void LiquidStyle::adjustHSV(QPixmap &pix, int h, int s, int v) 1065 void LiquidStyle::adjustHSV(QPixmap &pix, int h, int s, int v)
1013 { 1066 {
1014@@ -2998,22 +2568,22 @@ 1067@@ -2998,22 +2612,22 @@
1015 customBtnIconList.clear(); 1068 customBtnIconList.clear();
1016 customBtnLabelList.clear(); 1069 customBtnLabelList.clear();
@@ -1042,5 +1095,5 @@ Features:
1042 QColor *c = new QColor; 1095 QColor *c = new QColor;
1043 c->setNamedColor(QString(colorStr)); 1096 c->setNamedColor(QString(colorStr));
1044@@ -3022,7 +2592,7 @@ 1097@@ -3022,7 +2636,7 @@
1045 QString tmpStr(iconStr); 1098 QString tmpStr(iconStr);
1046 if(!tmpStr.isEmpty()){ 1099 if(!tmpStr.isEmpty()){
@@ -1051,5 +1104,5 @@ Features:
1051 delete pixmap; 1104 delete pixmap;
1052 customBtnIconList.append(NULL); 1105 customBtnIconList.append(NULL);
1053@@ -3037,7 +2607,6 @@ 1106@@ -3037,7 +2651,6 @@
1054 colorStr = colorList.next(); 1107 colorStr = colorList.next();
1055 iconStr = iconList.next(); 1108 iconStr = iconList.next();
@@ -1059,5 +1112,5 @@ Features:
1059 1112
1060 void LiquidStyle::applyCustomAttributes(QPushButton *btn) 1113 void LiquidStyle::applyCustomAttributes(QPushButton *btn)
1061@@ -3087,7 +2656,7 @@ 1114@@ -3087,7 +2700,7 @@
1062 } 1115 }
1063 } 1116 }
@@ -1068,6 +1121,6 @@ Features:
1068 1121
1069 1122
1070 --- -Mon Jun 24 19:05:49 2002 1123 --- -Sun Jun 30 22:38:02 2002
1071 +++ plugin.cppThu Jun 20 20:01:37 2002 1124 +++ plugin.cppFri Jun 28 13:25:25 2002
1072@@ -1,29 +1,29 @@ 1125@@ -1,29 +1,29 @@
1073 #include "liquid.h" 1126 #include "liquid.h"
@@ -1111,4 +1164,4 @@ Features:
1111 { 1164 {
1112- return(i18n("High performance liquid plugin").utf8()); 1165- return(i18n("High performance liquid plugin").utf8());
1113+ return "High performance liquid plugin"; 1166+ return "High Performance Liquid";
1114 } 1167 }