-rw-r--r-- | noncore/styles/liquid/liquid.cpp | 28 | ||||
-rw-r--r-- | noncore/styles/liquid/liquid.h | 1 | ||||
-rw-r--r-- | noncore/styles/liquid/liquidset.cpp | 58 | ||||
-rw-r--r-- | noncore/styles/liquid/liquidset.h | 2 | ||||
-rw-r--r-- | noncore/styles/liquid/opie-liquid.diff | 350 |
5 files changed, 313 insertions, 126 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp index 87b5488..22bf8af 100644 --- a/noncore/styles/liquid/liquid.cpp +++ b/noncore/styles/liquid/liquid.cpp | |||
@@ -171,2 +171,4 @@ LiquidStyle::LiquidStyle() | |||
171 | 171 | ||
172 | flatTBButtons = false; | ||
173 | |||
172 | btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true); | 174 | btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true); |
@@ -833,2 +835,9 @@ void LiquidStyle::polish(QWidget *w) | |||
833 | w->setBackgroundMode(QWidget::PaletteBackground); | 835 | w->setBackgroundMode(QWidget::PaletteBackground); |
836 | w->setBackgroundOrigin(QWidget::ParentOrigin); | ||
837 | return; | ||
838 | } | ||
839 | if(w->inherits("QToolBar")){ | ||
840 | w->installEventFilter(this); | ||
841 | w->setBackgroundMode(QWidget::PaletteBackground); | ||
842 | w->setBackgroundOrigin(QWidget::WidgetOrigin); | ||
834 | return; | 843 | return; |
@@ -895,4 +904,6 @@ void LiquidStyle::polish(QWidget *w) | |||
895 | } | 904 | } |
896 | if(w-> inherits("QToolButton")) { | 905 | if(w-> inherits("QToolButton")&&w->parent()->inherits("QToolBar")) { |
897 | ((QToolButton*)w)->setAutoRaise (false); | 906 | ((QToolButton*)w)->setAutoRaise (flatTBButtons); |
907 | if ( flatTBButtons ) | ||
908 | w->setBackgroundOrigin(QWidget::ParentOrigin); | ||
898 | } | 909 | } |
@@ -914,7 +925,2 @@ void LiquidStyle::polish(QWidget *w) | |||
914 | } | 925 | } |
915 | if(w->inherits("QToolBar")){ | ||
916 | w->installEventFilter(this); | ||
917 | w->setBackgroundMode(QWidget::PaletteBackground); | ||
918 | return; | ||
919 | } | ||
920 | 926 | ||
@@ -1003,2 +1009,4 @@ void LiquidStyle::polish(QApplication *app) | |||
1003 | QApplication::qwsSetDecoration ( new LiquidDecoration ( )); | 1009 | QApplication::qwsSetDecoration ( new LiquidDecoration ( )); |
1010 | |||
1011 | flatTBButtons = config. readBoolEntry ( "FlatToolButtons", false ); | ||
1004 | } | 1012 | } |
@@ -2000,4 +2008,6 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, | |||
2000 | } | 2008 | } |
2001 | 2009 | ||
2002 | p-> fillRect ( x, y, w, h, g.brush(QColorGroup::Background)); | 2010 | QWidget *parent = (QWidget *)p->device(); |
2011 | p->setBrushOrigin(parent->pos()); | ||
2012 | parent->erase(x, y, w, h); | ||
2003 | 2013 | ||
diff --git a/noncore/styles/liquid/liquid.h b/noncore/styles/liquid/liquid.h index fb691ea..00cfb35 100644 --- a/noncore/styles/liquid/liquid.h +++ b/noncore/styles/liquid/liquid.h | |||
@@ -179,2 +179,3 @@ protected: | |||
179 | private: | 179 | private: |
180 | bool flatTBButtons; | ||
180 | bool highcolor; | 181 | bool highcolor; |
diff --git a/noncore/styles/liquid/liquidset.cpp b/noncore/styles/liquid/liquidset.cpp index 5ae19ba..1b9526f 100644 --- a/noncore/styles/liquid/liquidset.cpp +++ b/noncore/styles/liquid/liquidset.cpp | |||
@@ -30,3 +30,3 @@ | |||
30 | #include <qtoolbutton.h> | 30 | #include <qtoolbutton.h> |
31 | #include <qbuttongroup.h> | 31 | #include <qcombobox.h> |
32 | #include <qradiobutton.h> | 32 | #include <qradiobutton.h> |
@@ -74,2 +74,3 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl ) | |||
74 | int contrast = config. readNumEntry ( "StippleContrast", 5 ); | 74 | int contrast = config. readNumEntry ( "StippleContrast", 5 ); |
75 | m_flat = config. readBoolEntry ( "FlatToolButtons", false ); | ||
75 | 76 | ||
@@ -77,35 +78,15 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl ) | |||
77 | vbox-> setSpacing ( 3 ); | 78 | vbox-> setSpacing ( 3 ); |
78 | vbox-> setMargin ( 6 ); | 79 | vbox-> setMargin ( 4 ); |
79 | 80 | ||
80 | QButtonGroup *btngrp = new QButtonGroup ( this ); | 81 | QComboBox *cb = new QComboBox ( this ); |
81 | btngrp-> hide ( ); | 82 | cb-> insertItem ( tr( "No translucency" ), None ); |
82 | 83 | cb-> insertItem ( tr( "Stippled, background color" ), StippledBg ); | |
83 | QRadioButton *rad; | 84 | cb-> insertItem ( tr( "Stippled, button color" ), StippledBtn ); |
84 | 85 | cb-> insertItem ( tr( "Translucent stippled, background color" ), TransStippleBg ); | |
85 | rad = new QRadioButton ( tr( "No translucency" ), this ); | 86 | cb-> insertItem ( tr( "Translucent stippled, button color" ), TransStippleBtn ); |
86 | btngrp-> insert ( rad, None ); | 87 | cb-> insertItem ( tr( "Custom translucency" ), Custom ); |
87 | vbox-> addWidget ( rad ); | ||
88 | |||
89 | rad = new QRadioButton ( tr( "Stippled, background color" ), this ); | ||
90 | btngrp-> insert ( rad, StippledBg ); | ||
91 | vbox-> addWidget ( rad ); | ||
92 | |||
93 | rad = new QRadioButton ( tr( "Stippled, button color" ), this ); | ||
94 | btngrp-> insert ( rad, StippledBtn ); | ||
95 | vbox-> addWidget ( rad ); | ||
96 | |||
97 | rad = new QRadioButton ( tr( "Translucent stippled, background color" ), this ); | ||
98 | btngrp-> insert ( rad, TransStippleBg ); | ||
99 | vbox-> addWidget ( rad ); | ||
100 | |||
101 | rad = new QRadioButton ( tr( "Translucent stippled, button color" ), this ); | ||
102 | btngrp-> insert ( rad, TransStippleBtn ); | ||
103 | vbox-> addWidget ( rad ); | ||
104 | 88 | ||
105 | rad = new QRadioButton ( tr( "Custom translucency" ), this ); | 89 | cb-> setCurrentItem ( m_type ); |
106 | btngrp-> insert ( rad, Custom ); | 90 | vbox-> addWidget ( cb ); |
107 | vbox-> addWidget ( rad ); | ||
108 | 91 | ||
109 | btngrp-> setExclusive ( true ); | ||
110 | btngrp-> setButton ( m_type ); | ||
111 | 92 | ||
@@ -159,2 +140,8 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl ) | |||
159 | 140 | ||
141 | QCheckBox *flattb = new QCheckBox ( tr( "Make toolbar buttons appear flat" ), this ); | ||
142 | flattb-> setChecked ( m_flat ); | ||
143 | vbox-> addWidget ( flattb ); | ||
144 | |||
145 | vbox-> addSpacing ( 4 ); | ||
146 | |||
160 | QHBoxLayout *hbox = new QHBoxLayout ( vbox ); | 147 | QHBoxLayout *hbox = new QHBoxLayout ( vbox ); |
@@ -173,5 +160,6 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl ) | |||
173 | 160 | ||
174 | connect ( btngrp, SIGNAL( clicked ( int ) ), this, SLOT( changeType ( int ) ) ); | 161 | connect ( cb, SIGNAL( highlighted ( int ) ), this, SLOT( changeType ( int ) ) ); |
175 | connect ( shadow, SIGNAL( toggled ( bool ) ), this, SLOT( changeShadow ( bool ) ) ); | 162 | connect ( shadow, SIGNAL( toggled ( bool ) ), this, SLOT( changeShadow ( bool ) ) ); |
176 | connect ( windeco, SIGNAL( toggled ( bool ) ), this, SLOT( changeDeco ( bool ) ) ); | 163 | connect ( windeco, SIGNAL( toggled ( bool ) ), this, SLOT( changeDeco ( bool ) ) ); |
164 | connect ( flattb, SIGNAL( toggled ( bool ) ), this, SLOT( changeFlat ( bool ) ) ); | ||
177 | } | 165 | } |
@@ -214,2 +202,7 @@ void LiquidSettings::changeDeco ( bool b ) | |||
214 | 202 | ||
203 | void LiquidSettings::changeFlat ( bool b ) | ||
204 | { | ||
205 | m_flat = b; | ||
206 | } | ||
207 | |||
215 | 208 | ||
@@ -227,2 +220,3 @@ bool LiquidSettings::writeConfig ( ) | |||
227 | config. writeEntry ( "StippleContrast", m_contsld-> value ( )); | 220 | config. writeEntry ( "StippleContrast", m_contsld-> value ( )); |
221 | config. writeEntry ( "FlatToolButtons", m_flat ); | ||
228 | config. write ( ); | 222 | config. write ( ); |
diff --git a/noncore/styles/liquid/liquidset.h b/noncore/styles/liquid/liquidset.h index 7843513..bb1846c 100644 --- a/noncore/styles/liquid/liquidset.h +++ b/noncore/styles/liquid/liquidset.h | |||
@@ -22,2 +22,3 @@ public slots: | |||
22 | void changeDeco ( bool b ); | 22 | void changeDeco ( bool b ); |
23 | void changeFlat ( bool b ); | ||
23 | 24 | ||
@@ -31,2 +32,3 @@ private: | |||
31 | bool m_deco; | 32 | bool m_deco; |
33 | bool m_flat; | ||
32 | 34 | ||
diff --git a/noncore/styles/liquid/opie-liquid.diff b/noncore/styles/liquid/opie-liquid.diff index bcbdc8d..7dfd868 100644 --- a/noncore/styles/liquid/opie-liquid.diff +++ b/noncore/styles/liquid/opie-liquid.diff | |||
@@ -5,4 +5,4 @@ Features: | |||
5 | 5 | ||
6 | --- -Mon Jul 1 11:38:05 2002 | 6 | --- -Mon Jul 15 02:34:13 2002 |
7 | +++ liquid.hMon Jun 24 19:07:45 2002 | 7 | +++ liquid.hMon Jul 15 01:51:12 2002 |
8 | @@ -2,7 +2,7 @@ | 8 | @@ -2,7 +2,7 @@ |
@@ -104,4 +104,12 @@ Features: | |||
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 Jul 1 11:38:05 2002 | 105 | @@ -204,6 +177,7 @@ |
106 | +++ liquid.cppMon Jul 1 03:45:28 2002 | 106 | QPixmap* getPixmap(BitmapData item); |
107 | QPixmap* processEmbedded(const char *label, int h, int s, int v, bool blend=false); | ||
108 | private: | ||
109 | +bool flatTBButtons; | ||
110 | bool highcolor; | ||
111 | QColorGroup radioOnGrp; | ||
112 | QWidget *highlightWidget; | ||
113 | --- -Mon Jul 15 02:34:13 2002 | ||
114 | +++ liquid.cppMon Jul 15 02:31:59 2002 | ||
107 | @@ -10,12 +10,10 @@ | 115 | @@ -10,12 +10,10 @@ |
@@ -186,3 +194,3 @@ Features: | |||
186 | + Config config ( "qpe" ); | 194 | + Config config ( "qpe" ); |
187 | + config. setGroup ( "MosfetMenus" ); | 195 | + config. setGroup ( "Liquid-Style" ); |
188 | + | 196 | + |
@@ -223,3 +231,3 @@ Features: | |||
223 | else{ // tear off menu | 231 | else{ // tear off menu |
224 | @@ -121,82 +122,54 @@ | 232 | @@ -121,82 +122,55 @@ |
225 | stripePixmap(*pix, p->colorGroup().button()); | 233 | stripePixmap(*pix, p->colorGroup().button()); |
@@ -231,5 +239,5 @@ Features: | |||
231 | + | 239 | + |
232 | + if (p->inherits("QPopupMenu")) | ||
233 | pixDict.insert(p->winId(), pix); | 240 | pixDict.insert(p->winId(), pix); |
234 | + else { | 241 | + |
242 | + if (!p->inherits("QPopupMenu")) { | ||
235 | + p->setBackgroundPixmap(*pix); | 243 | + p->setBackgroundPixmap(*pix); |
@@ -256,4 +264,3 @@ Features: | |||
256 | -} | 264 | -} |
257 | +// qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width()); | 265 | - |
258 | |||
259 | -void TransMenuHandler::slotKIPCMessage(int id, int) | 266 | -void TransMenuHandler::slotKIPCMessage(int id, int) |
@@ -262,3 +269,4 @@ Features: | |||
262 | - bool oldShadow = shadowText; | 269 | - bool oldShadow = shadowText; |
263 | - | 270 | +// qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width()); |
271 | |||
264 | - KConfig *config = KGlobal::config(); | 272 | - KConfig *config = KGlobal::config(); |
@@ -278,6 +286,5 @@ Features: | |||
278 | - } | 286 | - } |
279 | + if (p->inherits("QPopupMenu")) | 287 | + pixDict.remove(p->winId()); |
280 | + pixDict.remove(p->winId()); | 288 | + if (!p->inherits("QPopupMenu")) { |
281 | + else { | 289 | + p->setBackgroundMode(QWidget::PaletteBackground); |
282 | + p->setBackgroundMode(QWidget::PaletteBackground); | ||
283 | 290 | ||
@@ -297,3 +304,4 @@ Features: | |||
297 | - } | 304 | - } |
298 | - } | 305 | + wid-> setBackgroundMode( QWidget::PaletteBackground ); |
306 | } | ||
299 | - } | 307 | - } |
@@ -309,4 +317,3 @@ Features: | |||
309 | - ((LiquidStyle*)parent())->unapplyCustomAttributes((QPushButton *)w); | 317 | - ((LiquidStyle*)parent())->unapplyCustomAttributes((QPushButton *)w); |
310 | + wid-> setBackgroundMode( QWidget::PaletteBackground ); | 318 | - } |
311 | } | ||
312 | - } | 319 | - } |
@@ -333,2 +340,4 @@ Features: | |||
333 | + | 340 | + |
341 | +flatTBButtons = false; | ||
342 | + | ||
334 | btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true); | 343 | btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true); |
@@ -336,3 +345,3 @@ Features: | |||
336 | htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true); | 345 | htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true); |
337 | @@ -730,20 +703,19 @@ | 346 | @@ -730,20 +704,26 @@ |
338 | } | 347 | } |
@@ -350,2 +359,9 @@ Features: | |||
350 | + Config config ( "qpe" ); | 359 | + Config config ( "qpe" ); |
360 | + config. setGroup ( "Liquid-Style" ); | ||
361 | +int contrast = config. readNumEntry ( "StippleContrast", 5 ); | ||
362 | +if ( contrast < 0 ) | ||
363 | + contrast = 0; | ||
364 | +else if ( contrast > 10 ) | ||
365 | + contrast = 10; | ||
366 | + | ||
351 | QPalette pal = QApplication::palette(); | 367 | QPalette pal = QApplication::palette(); |
@@ -362,3 +378,3 @@ Features: | |||
362 | appPal.setBrush(QColorGroup::Button, btnBrush); | 378 | appPal.setBrush(QColorGroup::Button, btnBrush); |
363 | @@ -794,15 +766,7 @@ | 379 | @@ -794,15 +774,7 @@ |
364 | pagerBrush.setPixmap(*pix); | 380 | pagerBrush.setPixmap(*pix); |
@@ -379,3 +395,13 @@ Features: | |||
379 | 395 | ||
380 | @@ -825,13 +789,10 @@ | 396 | @@ -817,21 +789,18 @@ |
397 | wallPaper.fill(c.rgb()); | ||
398 | painter.begin(&wallPaper); | ||
399 | for(i=0; i < 32; i+=4){ | ||
400 | - painter.setPen(c.dark(105)); | ||
401 | + painter.setPen(c.dark(100 + contrast)); | ||
402 | painter.drawLine(0, i, 32, i); | ||
403 | - painter.setPen(c.dark(103)); | ||
404 | + painter.setPen(c.dark(100 + 3 * contrast / 5 ) ); | ||
405 | painter.drawLine(0, i+1, 32, i+1); | ||
406 | }; | ||
381 | painter.end(); | 407 | painter.end(); |
@@ -394,3 +420,3 @@ Features: | |||
394 | basePix.fill(c.rgb()); | 420 | basePix.fill(c.rgb()); |
395 | @@ -857,51 +818,31 @@ | 421 | @@ -857,51 +826,39 @@ |
396 | } | 422 | } |
@@ -408,2 +434,9 @@ Features: | |||
408 | + w->setBackgroundMode(QWidget::PaletteBackground); | 434 | + w->setBackgroundMode(QWidget::PaletteBackground); |
435 | + w->setBackgroundOrigin(QWidget::ParentOrigin); | ||
436 | + return; | ||
437 | + } | ||
438 | + if(w->inherits("QToolBar")){ | ||
439 | + w->installEventFilter(this); | ||
440 | + w->setBackgroundMode(QWidget::PaletteBackground); | ||
441 | + w->setBackgroundOrigin(QWidget::WidgetOrigin); | ||
409 | return; | 442 | return; |
@@ -444,3 +477,4 @@ Features: | |||
444 | + | 477 | + |
445 | + w-> setBackgroundOrigin ( QWidget::ParentOrigin ); | 478 | + if ( !w-> inherits("QFrame") || (((QFrame*) w)-> frameShape () == QFrame::NoFrame )) |
479 | + w-> setBackgroundOrigin ( QWidget::ParentOrigin ); | ||
446 | 480 | ||
@@ -455,3 +489,3 @@ Features: | |||
455 | if(w->inherits("QLineEdit")){ | 489 | if(w->inherits("QLineEdit")){ |
456 | @@ -913,6 +854,9 @@ | 490 | @@ -913,6 +870,9 @@ |
457 | applyCustomAttributes((QPushButton *)w); | 491 | applyCustomAttributes((QPushButton *)w); |
@@ -465,3 +499,3 @@ Features: | |||
465 | qstrcmp(w->name(), "qt_clipped_viewport") == 0; | 499 | qstrcmp(w->name(), "qt_clipped_viewport") == 0; |
466 | @@ -942,11 +886,12 @@ | 500 | @@ -942,11 +902,14 @@ |
467 | w->setMouseTracking(true); | 501 | w->setMouseTracking(true); |
@@ -469,4 +503,6 @@ Features: | |||
469 | } | 503 | } |
470 | + if(w-> inherits("QToolButton")) { | 504 | + if(w-> inherits("QToolButton")&&w->parent()->inherits("QToolBar")) { |
471 | + ((QToolButton*)w)->setAutoRaise (false); | 505 | + ((QToolButton*)w)->setAutoRaise (flatTBButtons); |
506 | + if ( flatTBButtons ) | ||
507 | + w->setBackgroundOrigin(QWidget::ParentOrigin); | ||
472 | + } | 508 | + } |
@@ -480,3 +516,3 @@ Features: | |||
480 | palette().active().brush(QColorGroup::Background).pixmap()){ | 516 | palette().active().brush(QColorGroup::Background).pixmap()){ |
481 | @@ -954,17 +899,18 @@ | 517 | @@ -954,17 +917,13 @@ |
482 | return; | 518 | return; |
@@ -492,8 +528,6 @@ Features: | |||
492 | - if(w->inherits("KToolBar")){ | 528 | - if(w->inherits("KToolBar")){ |
493 | + if(w->inherits("QToolBar")){ | 529 | - w->installEventFilter(this); |
494 | w->installEventFilter(this); | ||
495 | - //w->setBackgroundMode(QWidget::NoBackground); | 530 | - //w->setBackgroundMode(QWidget::NoBackground); |
496 | + w->setBackgroundMode(QWidget::PaletteBackground); | 531 | - return; |
497 | return; | 532 | - } |
498 | } | ||
499 | + | 533 | + |
@@ -502,3 +536,3 @@ Features: | |||
502 | void LiquidStyle::unPolish(QWidget *w) | 536 | void LiquidStyle::unPolish(QWidget *w) |
503 | @@ -977,6 +923,9 @@ | 537 | @@ -977,6 +936,9 @@ |
504 | 538 | ||
@@ -512,3 +546,3 @@ Features: | |||
512 | return; | 546 | return; |
513 | @@ -1001,12 +950,14 @@ | 547 | @@ -1001,12 +963,14 @@ |
514 | unapplyCustomAttributes((QPushButton *)w); | 548 | unapplyCustomAttributes((QPushButton *)w); |
@@ -531,3 +565,3 @@ Features: | |||
531 | if(w->inherits("QButton") || w->inherits("QComboBox")){ | 565 | if(w->inherits("QButton") || w->inherits("QComboBox")){ |
532 | @@ -1014,9 +965,9 @@ | 566 | @@ -1014,9 +978,9 @@ |
533 | w->setAutoMask(false); | 567 | w->setAutoMask(false); |
@@ -543,3 +577,3 @@ Features: | |||
543 | if(w->inherits("QHeader")){ | 577 | if(w->inherits("QHeader")){ |
544 | @@ -1028,20 +979,28 @@ | 578 | @@ -1028,20 +992,34 @@ |
545 | void LiquidStyle::polish(QApplication *app) | 579 | void LiquidStyle::polish(QApplication *app) |
@@ -558,3 +592,9 @@ Features: | |||
558 | + | 592 | + |
559 | + QApplication::qwsSetDecoration ( new LiquidDecoration ( )); | 593 | + Config config ( "qpe" ); |
594 | + config. setGroup ( "Liquid-Style" ); | ||
595 | + | ||
596 | + if ( config. readBoolEntry ( "WinDecoration", true )) | ||
597 | + QApplication::qwsSetDecoration ( new LiquidDecoration ( )); | ||
598 | + | ||
599 | +flatTBButtons = config. readBoolEntry ( "FlatToolButtons", false ); | ||
560 | } | 600 | } |
@@ -574,3 +614,3 @@ Features: | |||
574 | /* | 614 | /* |
575 | @@ -1063,7 +1022,7 @@ | 615 | @@ -1063,7 +1041,7 @@ |
576 | */ | 616 | */ |
@@ -583,3 +623,3 @@ Features: | |||
583 | QObjectListIt it(*tbChildList); | 623 | QObjectListIt it(*tbChildList); |
584 | @@ -1076,35 +1035,7 @@ | 624 | @@ -1076,35 +1054,7 @@ |
585 | 625 | ||
@@ -620,3 +660,3 @@ Features: | |||
620 | if(btn->isEnabled()){ | 660 | if(btn->isEnabled()){ |
621 | @@ -1119,20 +1050,7 @@ | 661 | @@ -1119,20 +1069,7 @@ |
622 | } | 662 | } |
@@ -642,3 +682,3 @@ Features: | |||
642 | if(btn->isEnabled()){ | 682 | if(btn->isEnabled()){ |
643 | @@ -1340,11 +1258,6 @@ | 683 | @@ -1340,11 +1277,6 @@ |
644 | QColorGroup g = btn->colorGroup(); | 684 | QColorGroup g = btn->colorGroup(); |
@@ -654,3 +694,56 @@ Features: | |||
654 | QColor c = btn->hasFocus() ? g.button().light(110) : g.background(); | 694 | QColor c = btn->hasFocus() ? g.button().light(110) : g.background(); |
655 | @@ -1914,8 +1827,8 @@ | 695 | @@ -1596,7 +1528,7 @@ |
696 | if(sbBuffer.size() != sb->size()) | ||
697 | sbBuffer.resize(sb->size()); | ||
698 | } | ||
699 | - subB.setRect( subX,subY,buttonDim,buttonDim ); | ||
700 | + subB.setRect( subX,subY,0,0); // buttonDim,buttonDim ); | ||
701 | addB.setRect( addX,addY,buttonDim,buttonDim ); | ||
702 | if(horiz) | ||
703 | subHC.setRect(addX-buttonDim,addY,buttonDim,buttonDim ); | ||
704 | @@ -1624,7 +1556,7 @@ | ||
705 | QPainter painter; | ||
706 | if(!horiz){ | ||
707 | painter.begin(&sbBuffer); | ||
708 | - QRect bgR(0, subB.bottom()+1, sb->width(), (len-(buttonDim*3))+1); | ||
709 | + QRect bgR(0, subB.bottom()+1, sb->width(), (len-(buttonDim*2))+1); | ||
710 | if(sliderR.height() >= 8){ | ||
711 | painter.drawPixmap(bgR.x()+1, bgR.y(), *vsbSliderFillPix, 0, 0, | ||
712 | 13, 8); | ||
713 | @@ -1690,7 +1622,7 @@ | ||
714 | } | ||
715 | else{ | ||
716 | painter.begin(&sbBuffer); | ||
717 | - QRect bgR(subB.right()+1, 0, (len-(buttonDim*3))+1, sb->height()); | ||
718 | + QRect bgR(subB.right()+1, 0, (len-(buttonDim*2))+1, sb->height()); | ||
719 | if(sliderR.width() >= 8){ | ||
720 | painter.drawPixmap(bgR.x(), bgR.y()+1, *vsbSliderFillPix, 0, 0, | ||
721 | 8, 13); | ||
722 | @@ -1761,10 +1693,10 @@ | ||
723 | addB.width()-8, addB.height()-8, g, !maxed); | ||
724 | } | ||
725 | if ( controls & SubLine ) { | ||
726 | - drawSBButton(p, subB, g, activeControl == SubLine); | ||
727 | - drawArrow( p, horiz ? LeftArrow : UpArrow, | ||
728 | - false, subB.x()+4, subB.y()+4, | ||
729 | - subB.width()-8, subB.height()-8, g, !maxed); | ||
730 | + // drawSBButton(p, subB, g, activeControl == SubLine); | ||
731 | + // drawArrow( p, horiz ? LeftArrow : UpArrow, | ||
732 | + // false, subB.x()+4, subB.y()+4, | ||
733 | + // subB.width()-8, subB.height()-8, g, !maxed); | ||
734 | drawSBButton(p, subHC, g, activeControl == SubLine); | ||
735 | drawArrow( p, horiz ? LeftArrow : UpArrow, | ||
736 | false, subHC.x()+4, subHC.y()+4, | ||
737 | @@ -1865,8 +1797,8 @@ | ||
738 | else | ||
739 | buttonDim = ( length - b*2 )/2 - 1; | ||
740 | |||
741 | - sliderMin = b + buttonDim; | ||
742 | - maxLength = length - b*2 - buttonDim*3; | ||
743 | + sliderMin = b + 0; // buttonDim; | ||
744 | + maxLength = length - b*2 - buttonDim*2; // 3; | ||
745 | |||
746 | if ( sb->maxValue() == sb->minValue() ) { | ||
747 | sliderLength = maxLength; | ||
748 | @@ -1914,8 +1846,8 @@ | ||
656 | return(QSize(16, 16)); | 749 | return(QSize(16, 16)); |
@@ -665,3 +758,3 @@ Features: | |||
665 | bool isHover = highlightWidget == p->device(); | 758 | bool isHover = highlightWidget == p->device(); |
666 | @@ -1957,8 +1870,8 @@ | 759 | @@ -1957,8 +1889,8 @@ |
667 | return(QSize(20, 22)); | 760 | return(QSize(20, 22)); |
@@ -676,3 +769,3 @@ Features: | |||
676 | bool isMasked = p->device() && p->device()->devType() == QInternal::Widget | 769 | bool isMasked = p->device() && p->device()->devType() == QInternal::Widget |
677 | @@ -1996,8 +1909,8 @@ | 770 | @@ -1996,8 +1928,8 @@ |
678 | } | 771 | } |
@@ -687,3 +780,3 @@ Features: | |||
687 | p->drawPixmap(x, y, *getPixmap(HTMLCB)->mask()); | 780 | p->drawPixmap(x, y, *getPixmap(HTMLCB)->mask()); |
688 | @@ -2005,18 +1918,17 @@ | 781 | @@ -2005,18 +1937,17 @@ |
689 | } | 782 | } |
@@ -709,3 +802,3 @@ Features: | |||
709 | p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider)->mask() : | 802 | p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider)->mask() : |
710 | @@ -2065,203 +1977,24 @@ | 803 | @@ -2065,203 +1996,26 @@ |
711 | p->drawLineSegments(a); | 804 | p->drawLineSegments(a); |
@@ -780,7 +873,3 @@ Features: | |||
780 | -} | 873 | -} |
781 | + x -= 2; // Bug in Qt/E | 874 | - |
782 | + y -= 2; | ||
783 | + w += 2; | ||
784 | + h += 2; | ||
785 | |||
786 | -void LiquidStyle::drawKToolBarButton(QPainter *p, int x, int y, int w, int h, | 875 | -void LiquidStyle::drawKToolBarButton(QPainter *p, int x, int y, int w, int h, |
@@ -900,7 +989,11 @@ Features: | |||
900 | - 0, 0, g, false); | 989 | - 0, 0, g, false); |
901 | - } | 990 | + if(active){ |
991 | + x -= 2; // Bug in Qt/E | ||
992 | + y -= 2; | ||
993 | + w += 2; | ||
994 | + h += 2; | ||
995 | } | ||
902 | -} | 996 | -} |
903 | + p-> fillRect ( x, y, w, h, g.brush(QColorGroup::Background)); | ||
904 | |||
905 | - | 997 | - |
998 | |||
906 | -void LiquidStyle::drawKMenuItem(QPainter *p, int x, int y, int w, int h, | 999 | -void LiquidStyle::drawKMenuItem(QPainter *p, int x, int y, int w, int h, |
@@ -911,3 +1004,5 @@ Features: | |||
911 | - p->setFont( KGlobalSettings::menuFont() ); | 1004 | - p->setFont( KGlobalSettings::menuFont() ); |
912 | + w -= 2; | 1005 | + QWidget *parent = (QWidget *)p->device(); |
1006 | + p->setBrushOrigin(parent->pos()); | ||
1007 | + parent->erase(x, y, w, h); | ||
913 | 1008 | ||
@@ -923,3 +1018,3 @@ Features: | |||
923 | else | 1018 | else |
924 | @@ -2300,8 +2033,8 @@ | 1019 | @@ -2300,8 +2054,8 @@ |
925 | } | 1020 | } |
@@ -934,3 +1029,3 @@ Features: | |||
934 | switch(menuHandler->transType()){ | 1029 | switch(menuHandler->transType()){ |
935 | @@ -2336,8 +2069,6 @@ | 1030 | @@ -2336,8 +2090,6 @@ |
936 | 1031 | ||
@@ -943,3 +1038,3 @@ Features: | |||
943 | QColorGroup itemg = dis ? pal.disabled() : pal.active(); | 1038 | QColorGroup itemg = dis ? pal.disabled() : pal.active(); |
944 | @@ -2363,7 +2094,7 @@ | 1039 | @@ -2363,7 +2115,7 @@ |
945 | p->fillRect(x, y, w, h, menuBrush); | 1040 | p->fillRect(x, y, w, h, menuBrush); |
@@ -952,3 +1047,3 @@ Features: | |||
952 | } | 1047 | } |
953 | @@ -2508,25 +2239,6 @@ | 1048 | @@ -2508,25 +2260,6 @@ |
954 | return h; | 1049 | return h; |
@@ -978,3 +1073,3 @@ Features: | |||
978 | const QColorGroup &g, const QColor *c, | 1073 | const QColorGroup &g, const QColor *c, |
979 | @@ -2540,25 +2252,25 @@ | 1074 | @@ -2540,25 +2273,25 @@ |
980 | return; | 1075 | return; |
@@ -1008,3 +1103,3 @@ Features: | |||
1008 | QPixmap tilePix; | 1103 | QPixmap tilePix; |
1009 | @@ -2671,7 +2383,7 @@ | 1104 | @@ -2671,7 +2404,7 @@ |
1010 | vFrame = 8; // was 10 | 1105 | vFrame = 8; // was 10 |
@@ -1017,3 +1112,3 @@ Features: | |||
1017 | 1112 | ||
1018 | @@ -2699,7 +2411,7 @@ | 1113 | @@ -2699,7 +2432,7 @@ |
1019 | p->drawLine(x+1, y+1, x+1, y2-1); | 1114 | p->drawLine(x+1, y+1, x+1, y2-1); |
@@ -1026,3 +1121,3 @@ Features: | |||
1026 | int x2 = x+w-1; | 1121 | int x2 = x+w-1; |
1027 | @@ -2726,105 +2438,6 @@ | 1122 | @@ -2726,105 +2459,6 @@ |
1028 | } | 1123 | } |
@@ -1132,3 +1227,3 @@ Features: | |||
1132 | { | 1227 | { |
1133 | @@ -2998,22 +2611,22 @@ | 1228 | @@ -2998,22 +2632,22 @@ |
1134 | customBtnIconList.clear(); | 1229 | customBtnIconList.clear(); |
@@ -1162,3 +1257,3 @@ Features: | |||
1162 | c->setNamedColor(QString(colorStr)); | 1257 | c->setNamedColor(QString(colorStr)); |
1163 | @@ -3022,7 +2635,7 @@ | 1258 | @@ -3022,7 +2656,7 @@ |
1164 | QString tmpStr(iconStr); | 1259 | QString tmpStr(iconStr); |
@@ -1171,3 +1266,3 @@ Features: | |||
1171 | customBtnIconList.append(NULL); | 1266 | customBtnIconList.append(NULL); |
1172 | @@ -3037,7 +2650,6 @@ | 1267 | @@ -3037,7 +2671,6 @@ |
1173 | colorStr = colorList.next(); | 1268 | colorStr = colorList.next(); |
@@ -1179,3 +1274,3 @@ Features: | |||
1179 | void LiquidStyle::applyCustomAttributes(QPushButton *btn) | 1274 | void LiquidStyle::applyCustomAttributes(QPushButton *btn) |
1180 | @@ -3087,7 +2699,7 @@ | 1275 | @@ -3087,7 +2720,7 @@ |
1181 | } | 1276 | } |
@@ -1188,10 +1283,11 @@ Features: | |||
1188 | 1283 | ||
1189 | --- -Mon Jul 1 11:38:05 2002 | 1284 | --- -Mon Jul 15 02:34:13 2002 |
1190 | +++ plugin.cppFri Jun 28 13:25:25 2002 | 1285 | +++ plugin.cppFri Jul 12 00:41:40 2002 |
1191 | @@ -1,29 +1,29 @@ | 1286 | @@ -1,29 +1,113 @@ |
1192 | #include "liquid.h" | 1287 | #include "liquid.h" |
1193 | -#include <klocale.h> | 1288 | -#include <klocale.h> |
1194 | + | 1289 | +#include "liquidset.h" |
1290 | +#include "plugin.h" | ||
1195 | 1291 | ||
1196 | extern "C" { | 1292 | -extern "C" { |
1197 | - KStyle* allocate(); | 1293 | - KStyle* allocate(); |
@@ -1200,6 +1296,20 @@ Features: | |||
1200 | - const char *description(); | 1296 | - const char *description(); |
1201 | + QStyle* allocate ( ); | 1297 | + |
1202 | + int minor_version ( ); | 1298 | + |
1203 | + int major_version ( ); | 1299 | +LiquidInterface::LiquidInterface ( ) : ref ( 0 ) |
1204 | + const char *description ( ); | 1300 | +{ |
1301 | +} | ||
1302 | + | ||
1303 | +LiquidInterface::~LiquidInterface ( ) | ||
1304 | +{ | ||
1305 | +} | ||
1306 | + | ||
1307 | +QStyle *LiquidInterface::create ( ) | ||
1308 | +{ | ||
1309 | +return new LiquidStyle ( ); | ||
1310 | +} | ||
1311 | + | ||
1312 | +QString LiquidInterface::name ( ) | ||
1313 | +{ | ||
1314 | +return QObject::tr( "Liquid", "name" ); | ||
1205 | } | 1315 | } |
@@ -1207,6 +1317,6 @@ Features: | |||
1207 | -KStyle* allocate() | 1317 | -KStyle* allocate() |
1208 | +QStyle* allocate ( ) | 1318 | +QString LiquidInterface::description ( ) |
1209 | { | 1319 | { |
1210 | - return(new LiquidStyle); | 1320 | - return(new LiquidStyle); |
1211 | + return new LiquidStyle ( ); | 1321 | +return QObject::tr( "High Performance Liquid style by Mosfet", "description" ); |
1212 | } | 1322 | } |
@@ -1214,6 +1324,6 @@ Features: | |||
1214 | -int minor_version() | 1324 | -int minor_version() |
1215 | +int minor_version ( ) | 1325 | +QCString LiquidInterface::key ( ) |
1216 | { | 1326 | { |
1217 | - return(0); | 1327 | - return(0); |
1218 | + return 0; | 1328 | +return QCString ( "liquid" ); |
1219 | } | 1329 | } |
@@ -1221,6 +1331,6 @@ Features: | |||
1221 | -int major_version() | 1331 | -int major_version() |
1222 | +int major_version ( ) | 1332 | +unsigned int LiquidInterface::version ( ) |
1223 | { | 1333 | { |
1224 | - return(1); | 1334 | - return(1); |
1225 | + return 1; | 1335 | +return 100; // 1.0.0 (\d+.\d.\d) |
1226 | } | 1336 | } |
@@ -1228,6 +1338,76 @@ Features: | |||
1228 | -const char *description() | 1338 | -const char *description() |
1229 | +const char *description ( ) | 1339 | +QRESULT LiquidInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) |
1340 | +{ | ||
1341 | +static LiquidSettingsInterface *setiface = 0; | ||
1342 | + | ||
1343 | +*iface = 0; | ||
1344 | + | ||
1345 | +if ( uuid == IID_QUnknown ) | ||
1346 | + *iface = this; | ||
1347 | +else if ( uuid == IID_Style ) | ||
1348 | + *iface = this; | ||
1349 | +else if ( uuid == IID_StyleSettings ) { | ||
1350 | + if ( !setiface ) | ||
1351 | + setiface = new LiquidSettingsInterface ( ); | ||
1352 | + *iface = setiface; | ||
1353 | +} | ||
1354 | + | ||
1355 | +if ( *iface ) | ||
1356 | + (*iface)-> addRef ( ); | ||
1357 | + | ||
1358 | +return QS_OK; | ||
1359 | +} | ||
1360 | + | ||
1361 | +Q_EXPORT_INTERFACE() | ||
1362 | +{ | ||
1363 | +Q_CREATE_INSTANCE( LiquidInterface ) | ||
1364 | +} | ||
1365 | + | ||
1366 | + | ||
1367 | +LiquidSettingsInterface::LiquidSettingsInterface ( ) : ref ( 0 ) | ||
1230 | { | 1368 | { |
1231 | - return(i18n("High performance liquid plugin").utf8()); | 1369 | - return(i18n("High performance liquid plugin").utf8()); |
1232 | + return "High Performance Liquid"; | 1370 | +m_widget = 0; |
1233 | } | 1371 | } |
1372 | + | ||
1373 | +LiquidSettingsInterface::~LiquidSettingsInterface ( ) | ||
1374 | +{ | ||
1375 | +} | ||
1376 | + | ||
1377 | +QWidget *LiquidSettingsInterface::create ( QWidget *parent, const char *name ) | ||
1378 | +{ | ||
1379 | +m_widget = new LiquidSettings ( parent, name ? name : "LIQUID-SETTINGS" ); | ||
1380 | + | ||
1381 | +return m_widget; | ||
1382 | +} | ||
1383 | + | ||
1384 | +bool LiquidSettingsInterface::accept ( ) | ||
1385 | +{ | ||
1386 | +if ( !m_widget ) | ||
1387 | + return false; | ||
1388 | + | ||
1389 | +return m_widget-> writeConfig ( ); | ||
1390 | +} | ||
1391 | + | ||
1392 | +void LiquidSettingsInterface::reject ( ) | ||
1393 | +{ | ||
1394 | +} | ||
1395 | + | ||
1396 | +QRESULT LiquidSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | ||
1397 | +{ | ||
1398 | +*iface = 0; | ||
1399 | + | ||
1400 | + | ||
1401 | +if ( uuid == IID_QUnknown ) | ||
1402 | + *iface = this; | ||
1403 | +else if ( uuid == IID_StyleSettings ) | ||
1404 | + *iface = this; | ||
1405 | + | ||
1406 | +if ( *iface ) | ||
1407 | + (*iface)-> addRef ( ); | ||
1408 | + | ||
1409 | +return QS_OK; | ||
1410 | +} | ||
1411 | + | ||
1412 | +// Hack for Retail Z experiments | ||
1413 | +extern "C" { QStyle *allocate ( ) { return new LiquidStyle ( ); } } | ||