[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kstyles/keramik
From: Maks Orlovich <mo002j () mail ! rochester ! edu>
Date: 2003-09-06 22:02:49
[Download RAW message or body]
CVS commit by orlovich:
Don't be so overzelaous in chosing things to consider form widgets (the printer combo in the
print dialog for a web page doesn't count!)
M +18 -3 keramik.cpp 1.116
--- kdelibs/kstyles/keramik/keramik.cpp #1.115:1.116
@@ -1285,7 +1285,22 @@ void KeramikStyle::drawKStylePrimitive(
bool KeramikStyle::isFormWidget(const QWidget* widget) const
{
- if (widget->parent() && widget->parent()->parent() && widget->parent()->parent()->parent() )
- return !qstrcmp(widget->parent()->parent()->parent()->className(), "KHTMLView");
+ //Form widgets are in the KHTMLView, but that has 2 further inner levels
+ //of widgets - QClipperWidget, and outside of that, QViewportWidget
+ QWidget* potentialClipPort = widget->parentWidget();
+ if ( !potentialClipPort || potentialClipPort->isTopLevel() )
return false;
+
+ QWidget* potentialViewPort = potentialClipPort->parentWidget();
+ if (!potentialViewPort || potentialViewPort->isTopLevel() ||
+ qstrcmp(potentialViewPort->name(), "qt_viewport") )
+ return false;
+
+ QWidget* potentialKHTML = potentialViewPort->parentWidget();
+ if (!potentialKHTML || potentialKHTML->isTopLevel() ||
+ qstrcmp(potentialKHTML->className(), "KHTMLView") )
+ return false;
+
+
+ return true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic