Review Request: Fix vertical positionning of "click" message in klineedit
Thomas Lübking
thomas.luebking at web.de
Thu May 20 23:01:15 BST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4042/#review5741
-----------------------------------------------------------
/trunk/KDE/kdelibs/kdeui/widgets/klineedit.cpp
<http://reviewboard.kde.org/r/4042/#comment5385>
cr.adjust(left, top, -right, -bottom);
/trunk/KDE/kdelibs/kdeui/widgets/klineedit.cpp
<http://reviewboard.kde.org/r/4042/#comment5416>
Superflous, you don't care about left/right align anyway
-> va = alignment() & Qt::AlignVertical_Mask
/trunk/KDE/kdelibs/kdeui/widgets/klineedit.cpp
<http://reviewboard.kde.org/r/4042/#comment5418>
have you tried to just
cr.setTop(cr.top() + (cr.height() - fm.height()) % 2)
here (or merge it into the above adjustment) and
p.drawText(cr, Qt::AlignLeft|(alignment()&Qt::AlignVertical_Mask) , d->clickMessage);
- Thomas
On 2010-05-19 05:48:15, Hugo Pereira Da Costa wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4042/
> -----------------------------------------------------------
>
> (Updated 2010-05-19 05:48:15)
>
>
> Review request for kdelibs.
>
>
> Summary
> -------
>
> This patch makes a better job at painting klineEdit 'click' message (e.g. in systemsettings 'search' bar) in a way that is similar to what qlineedit::paintEvent does for normal text.
> This notably fixes the vertical alignment of the "click" message for some styles, including oxygen (see attached screenshot)
>
>
> Diffs
> -----
>
> /trunk/KDE/kdelibs/kdeui/widgets/klineedit.cpp 1127445
>
> Diff: http://reviewboard.kde.org/r/4042/diff
>
>
> Testing
> -------
>
> Tested with oxygen, plastique, skulpture, and bespin. It was checked that the "click message" is vertically positioned the same as normal text (from user input) is, with all styles
>
>
> Screenshots
> -----------
>
> vertically centered "click" message in systemsettings
> http://reviewboard.kde.org/r/4042/s/399/
>
>
> Thanks,
>
> Hugo
>
>
More information about the kde-core-devel
mailing list