summaryrefslogtreecommitdiff
path: root/noncore
authorsandman <sandman>2002-07-08 00:42:56 (UTC)
committer sandman <sandman>2002-07-08 00:42:56 (UTC)
commit923a6290c8cc93914d54e583f1d79a6bae638fab (patch) (unidiff)
treeb2562e4dbf6d71631b358021f8c4ec29f36a6d12 /noncore
parent895f43bd1850b3e0c43edaaad18a7d7f2613033b (diff)
downloadopie-923a6290c8cc93914d54e583f1d79a6bae638fab.zip
opie-923a6290c8cc93914d54e583f1d79a6bae638fab.tar.gz
opie-923a6290c8cc93914d54e583f1d79a6bae638fab.tar.bz2
- Fix a memory leak (bg pixmaps for taskbar applets were never freed)
- Try to be more intelligent about stipple alignment in child widgets (in every app I tested the stipple is now always aligned right)
Diffstat (limited to 'noncore') (more/less context) (show whitespace changes)
-rw-r--r--noncore/styles/liquid/liquid.cpp8
-rw-r--r--noncore/styles/liquid/plugin.cpp2
2 files changed, 6 insertions, 4 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp
index 67e53e9..fc925b8 100644
--- a/noncore/styles/liquid/liquid.cpp
+++ b/noncore/styles/liquid/liquid.cpp
@@ -122,15 +122,15 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev)
122 stripePixmap(*pix, p->colorGroup().button()); 122 stripePixmap(*pix, p->colorGroup().button());
123 } 123 }
124 else{ 124 else{
125 QPixmapEffect::fade(*pix, (((float)opacity)+80)*0.01, color); 125 QPixmapEffect::fade(*pix, (((float)opacity)+80)*0.01, color);
126 } 126 }
127 127
128 if (p->inherits("QPopupMenu"))
129 pixDict.insert(p->winId(), pix); 128 pixDict.insert(p->winId(), pix);
130 else { 129
130 if (!p->inherits("QPopupMenu")) {
131 p->setBackgroundPixmap(*pix); 131 p->setBackgroundPixmap(*pix);
132 132
133 QObjectList *ol = p-> queryList("QWidget"); 133 QObjectList *ol = p-> queryList("QWidget");
134 for ( QObjectListIt it( *ol ); it. current ( ); ++it ) { 134 for ( QObjectListIt it( *ol ); it. current ( ); ++it ) {
135 QWidget *wid = (QWidget *) it.current ( ); 135 QWidget *wid = (QWidget *) it.current ( );
136 136
@@ -143,15 +143,14 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev)
143 } 143 }
144 else if(ev->type() == QEvent::Hide){ 144 else if(ev->type() == QEvent::Hide){
145 if(type == TransStippleBg || type == TransStippleBtn || 145 if(type == TransStippleBg || type == TransStippleBtn ||
146 type == Custom){ 146 type == Custom){
147// qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width()); 147// qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width());
148 148
149 if (p->inherits("QPopupMenu"))
150 pixDict.remove(p->winId()); 149 pixDict.remove(p->winId());
151 else { 150 if (!p->inherits("QPopupMenu")) {
152 p->setBackgroundMode(QWidget::PaletteBackground); 151 p->setBackgroundMode(QWidget::PaletteBackground);
153 152
154 QObjectList *ol = p-> queryList("QWidget"); 153 QObjectList *ol = p-> queryList("QWidget");
155 for ( QObjectListIt it( *ol ); it. current ( ); ++it ) { 154 for ( QObjectListIt it( *ol ); it. current ( ); ++it ) {
156 QWidget *wid = (QWidget *) it.current ( ); 155 QWidget *wid = (QWidget *) it.current ( );
157 156
@@ -842,12 +841,13 @@ void LiquidStyle::polish(QWidget *w)
842 841
843 if(w->isTopLevel()){ 842 if(w->isTopLevel()){
844 return; 843 return;
845 } 844 }
846 845
847 846
847 if ( !w-> inherits("QFrame") || (((QFrame*) w)-> frameShape () == QFrame::NoFrame ))
848 w-> setBackgroundOrigin ( QWidget::ParentOrigin ); 848 w-> setBackgroundOrigin ( QWidget::ParentOrigin );
849 849
850 if(w->inherits("QComboBox") || 850 if(w->inherits("QComboBox") ||
851 w->inherits("QLineEdit") || w->inherits("QRadioButton") || 851 w->inherits("QLineEdit") || w->inherits("QRadioButton") ||
852 w->inherits("QCheckBox") || w->inherits("QScrollBar")) { 852 w->inherits("QCheckBox") || w->inherits("QScrollBar")) {
853 w->installEventFilter(this); 853 w->installEventFilter(this);
diff --git a/noncore/styles/liquid/plugin.cpp b/noncore/styles/liquid/plugin.cpp
index f149c29..5f4c8e5 100644
--- a/noncore/styles/liquid/plugin.cpp
+++ b/noncore/styles/liquid/plugin.cpp
@@ -106,6 +106,8 @@ QRESULT LiquidSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInt
106 if ( *iface ) 106 if ( *iface )
107 (*iface)-> addRef ( ); 107 (*iface)-> addRef ( );
108 108
109 return QS_OK; 109 return QS_OK;
110} 110}
111 111
112// Hack for Retail Z experiments
113extern "C" { QStyle *allocate ( ) { return new LiquidStyle ( ); } }