From 1c71f040e297b14fb88a604ddaa686b24cbcaf8b Mon Sep 17 00:00:00 2001 From: Tim Beaulen Date: Sun, 22 Jan 2006 12:44:42 +0000 Subject: [PATCH] * Panel is renamed to Frame * Use a QStyleOptionFrame * Add the rect to the QStyleOptionFrame * Set the palette to the widget palette * style default = state none * Draw the primitive with these options I didn't use QStyleOptionFrameV2 because I don't know if kde will require Qt4.1 or higher. Version 2 supports flat frames and is available from Qt4.1. svn path=/trunk/KDE/kdebase/workspace/; revision=501144 --- popupinfo.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/popupinfo.cpp b/popupinfo.cpp index e4c7aec565..848ce64434 100644 --- a/popupinfo.cpp +++ b/popupinfo.cpp @@ -29,6 +29,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include #include +#include // specify externals before namespace @@ -76,8 +77,11 @@ void PopupInfo::reset() void PopupInfo::paintEvent( QPaintEvent* ) { QPainter p( this ); -#warning Somebody with QStyle knowledge, please fix. -// style()->drawPrimitive( QStyle::PE_Frame, &p, QRect( 0, 0, width(), height() ), colorGroup(), QStyle::Style_Default ); + QStyleOptionFrame *so = new QStyleOptionFrame; + so->rect = QRect( 0, 0, width(), height() ); + so->palette = palette(); + so->state = QStyle::State_None; + style()->drawPrimitive( QStyle::PE_Frame, so, &p ); paintContents(); }