[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.0/kdelibs/kdeui/widgets
From: Urs Wolfer <uwolfer () kde ! org>
Date: 2008-02-19 18:53:13
Message-ID: 1203447193.305015.29722.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 777102 by uwolfer:
Backport:
SVN commit 777098 by uwolfer:
Properly initialize the QStyleOptionFrame. That's why this protected function is there in QLineEdit.
Fixes margin problems with Oxygen style and works also fine with Plastique.
M +2 -5 klineedit.cpp
--- branches/KDE/4.0/kdelibs/kdeui/widgets/klineedit.cpp #777101:777102
@@ -1558,12 +1558,9 @@
// qlineedit uses an internal qstyleoption set to figure this out
// and then adds a hardcoded 2 pixel interior to that.
// probably requires fixes to Qt itself to do this cleanly
+ // see define horizontalMargin 2 in qlineedit.cpp
QStyleOptionFrame opt;
- opt.init( this );
- opt.rect = contentsRect();
- opt.lineWidth = hasFrame() ? style()->pixelMetric( QStyle::PM_DefaultFrameWidth ) : 0;
- opt.midLineWidth = 0;
- opt.state |= QStyle::State_Sunken;
+ initStyleOption( &opt );
QRect cr = style()->subElementRect( QStyle::SE_LineEditContents, &opt, this );
cr.setLeft( cr.left() + 2 );
cr.setRight( cr.right() - 2 );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic