[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/runtime/kstyles/oxygen
From: Huynh Huu Long <long.upcase () googlemail ! com>
Date: 2008-06-22 21:28:24
Message-ID: 1214170104.763897.22773.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 823246 by huynhhuu:
Draw a frame around combobox popups
M +33 -0 oxygen.cpp
--- trunk/KDE/kdebase/runtime/kstyles/oxygen/oxygen.cpp #823245:823246
@@ -2098,6 +2098,10 @@
{
widget->installEventFilter(this);
}
+ else if (widget->inherits("QComboBoxPrivateContainer"))
+ {
+ widget->installEventFilter(this);
+ }
KStyle::polish(widget);
}
@@ -2153,6 +2157,10 @@
{
widget->removeEventFilter(this);
}
+ else if (widget->inherits("QComboBoxPrivateContainer"))
+ {
+ widget->removeEventFilter(this);
+ }
KStyle::unpolish(widget);
}
@@ -3233,6 +3241,31 @@
}
QWidget *widget = static_cast<QWidget*>(obj);
+ if (widget->inherits("QComboBoxPrivateContainer")) {
+ switch(ev->type()) {
+ case QEvent::Show:
+ case QEvent::Resize:
+ {
+ int x, y, w, h;
+ widget->rect().getRect(&x, &y, &w, &h);
+ QRegion reg(x+4, y, w-8, h);
+ reg += QRegion(x, y+4, w, h-8);
+ reg += QRegion(x+2, y+1, w-4, h-2);
+ reg += QRegion(x+1, y+2, w-2, h-4);
+ if(widget->mask() != reg)
+ widget->setMask(reg);
+ return false;
+ }
+ case QEvent::Paint:
+ {
+ QPainter p(widget);
+ _helper.drawFloatFrame(&p, widget->rect(), widget->palette().color(QPalette::Window));
+ }
+ default:
+ return false;
+ }
+ }
+
if (widget->isWindow() && widget->isVisible()) {
if (ev->type() == QEvent::Paint)
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic