summaryrefslogtreecommitdiff
path: root/noncore/styles/liquid/liquid.cpp
Unidiff
Diffstat (limited to 'noncore/styles/liquid/liquid.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/liquid/liquid.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp
index bac882c..51814e7 100644
--- a/noncore/styles/liquid/liquid.cpp
+++ b/noncore/styles/liquid/liquid.cpp
@@ -8,18 +8,25 @@
8 8
9 9
10#ifndef INCLUDE_MENUITEM_DEF 10#ifndef INCLUDE_MENUITEM_DEF
11#define INCLUDE_MENUITEM_DEF 11#define INCLUDE_MENUITEM_DEF
12#endif 12#endif
13 13
14#include <qmenudata.h>
15#include "liquid.h" 14#include "liquid.h"
16//#include "liquiddeco.h" 15#include "effects.h"
17#include <qapplication.h> 16#include "htmlmasks.h"
17#include "embeddata.h"
18
19/* OPIE */
20#include <opie2/odebug.h>
18#include <qpe/config.h> 21#include <qpe/config.h>
19#include "effects.h" 22using namespace Opie::Core;
23
24/* QT */
25#include <qmenudata.h>
26#include <qapplication.h>
20#include <qpalette.h> 27#include <qpalette.h>
21#include <qbitmap.h> 28#include <qbitmap.h>
22#include <qtabbar.h> 29#include <qtabbar.h>
23#include <qpopupmenu.h> 30#include <qpopupmenu.h>
24#include <qobjectlist.h> 31#include <qobjectlist.h>
25#include <qimage.h> 32#include <qimage.h>
@@ -28,23 +35,21 @@
28#include <qradiobutton.h> 35#include <qradiobutton.h>
29#include <qcombobox.h> 36#include <qcombobox.h>
30#include <qdrawutil.h> 37#include <qdrawutil.h>
31#include <qwidgetlist.h> 38#include <qwidgetlist.h>
32#include <qtoolbutton.h> 39#include <qtoolbutton.h>
33#include <qheader.h> 40#include <qheader.h>
34#include <unistd.h>
35#include <qmenubar.h> 41#include <qmenubar.h>
36#include <qprogressbar.h> 42#include <qprogressbar.h>
37#include <qlineedit.h> 43#include <qlineedit.h>
38#include <qlistbox.h> 44#include <qlistbox.h>
39 45
46/* STD */
47#include <unistd.h>
40#include <stdio.h> 48#include <stdio.h>
41 49
42#include "htmlmasks.h"
43#include "embeddata.h"
44
45 50
46typedef void (QStyle::*QDrawMenuBarItemImpl) (QPainter *, int, int, int, int, QMenuItem *, 51typedef void (QStyle::*QDrawMenuBarItemImpl) (QPainter *, int, int, int, int, QMenuItem *,
47 QColorGroup &, bool, bool); 52 QColorGroup &, bool, bool);
48 53
49QDrawMenuBarItemImpl qt_set_draw_menu_bar_impl(QDrawMenuBarItemImpl impl); 54QDrawMenuBarItemImpl qt_set_draw_menu_bar_impl(QDrawMenuBarItemImpl impl);
50 55
@@ -146,13 +151,13 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev)
146 delete ol; 151 delete ol;
147 } 152 }
148 } 153 }
149 else if(ev->type() == QEvent::Hide){ 154 else if(ev->type() == QEvent::Hide){
150 if(type == TransStippleBg || type == TransStippleBtn || 155 if(type == TransStippleBg || type == TransStippleBtn ||
151 type == Custom){ 156 type == Custom){
152// qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width()); 157// owarn << "Deleting menu pixmap, width " << pixDict.find(p->winId())->width() << "" << oendl;
153 158
154 pixDict.remove(p->winId()); 159 pixDict.remove(p->winId());
155 if ( !p->inherits("QPopupMenu")) 160 if ( !p->inherits("QPopupMenu"))
156 p->setBackgroundMode(QWidget::PaletteBackground); 161 p->setBackgroundMode(QWidget::PaletteBackground);
157 162
158 QObjectList *ol = p-> queryList("QWidget"); 163 QObjectList *ol = p-> queryList("QWidget");
@@ -491,13 +496,13 @@ void LiquidStyle::drawRoundButton(QPainter *painter, const QColor &c,
491QPixmap* LiquidStyle::processEmbedded(const char *label, int h, int s, int v, 496QPixmap* LiquidStyle::processEmbedded(const char *label, int h, int s, int v,
492 bool blend) 497 bool blend)
493{ 498{
494 QImage img(qembed_findImage(label)); 499 QImage img(qembed_findImage(label));
495 img.detach(); 500 img.detach();
496 if(img.isNull()){ // shouldn't happen, been tested 501 if(img.isNull()){ // shouldn't happen, been tested
497 qWarning("Invalid embedded label %s", label); 502 owarn << "Invalid embedded label " << label << "" << oendl;
498 return(NULL); 503 return(NULL);
499 } 504 }
500 if(img.depth() != 32) 505 if(img.depth() != 32)
501 img = img.convertDepth(32); 506 img = img.convertDepth(32);
502 unsigned int *data = (unsigned int *)img.bits(); 507 unsigned int *data = (unsigned int *)img.bits();
503 int total = img.width()*img.height(); 508 int total = img.width()*img.height();
@@ -857,13 +862,13 @@ void LiquidStyle::polish(QWidget *w)
857 if(w->ownPalette() && !w->inherits("QButton") && !w->inherits("QComboBox")){ 862 if(w->ownPalette() && !w->inherits("QButton") && !w->inherits("QComboBox")){
858 return; 863 return;
859 } 864 }
860 865
861 if(w->parent() && w->parent()->isWidgetType() && !((QWidget*)w->parent())-> 866 if(w->parent() && w->parent()->isWidgetType() && !((QWidget*)w->parent())->
862 palette().active().brush(QColorGroup::Background).pixmap()){ 867 palette().active().brush(QColorGroup::Background).pixmap()){
863 qWarning("No parent pixmap for child widget %s", w->className()); 868 owarn << "No parent pixmap for child widget " << w->className() << "" << oendl;
864 return; 869 return;
865 } 870 }
866 if(!isViewport && !isViewportChild && !w->testWFlags(WType_Popup) && 871 if(!isViewport && !isViewportChild && !w->testWFlags(WType_Popup) &&
867 !( !w-> inherits("QLineEdit") && w-> parent() && w-> parent()-> isWidgetType ( ) && w-> parent()-> inherits ( "QMultiLineEdit" ))) { 872 !( !w-> inherits("QLineEdit") && w-> parent() && w-> parent()-> isWidgetType ( ) && w-> parent()-> inherits ( "QMultiLineEdit" ))) {
868 if(w->backgroundMode() == QWidget::PaletteBackground || 873 if(w->backgroundMode() == QWidget::PaletteBackground ||
869 w->backgroundMode() == QWidget::PaletteButton){ 874 w->backgroundMode() == QWidget::PaletteButton){