Review Request 129414: KMessageWidget: fix layout when word-wrap is enabled without actions
Elvis Angelaccio
elvis.angelaccio at kde.org
Wed Nov 16 16:11:04 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129414/
-----------------------------------------------------------
(Updated Nov. 16, 2016, 4:11 p.m.)
Review request for KDE Frameworks and Christoph Feck.
Changes
-------
Use top-vertical alignment for close button
Repository: kwidgetsaddons
Description
-------
If we enable word-wrap on a vanilla KMessageWidget (with no additional tool buttons added), the close button is placed on row number 1 (in the grid layout), resulting in wasted space (see first messagewidget in the screenshots).
This patch places the close button on row number 1 only when we actually have other buttons in the messagewidget. This way we save space in the normal case.
Diffs (updated)
-----
src/kmessagewidget.cpp e8b25f6427534a4991bb1dfe9f820cb651238e18
tests/kmessagewidgettest.cpp 441e961ac9b851ccc713ab1713e797bd20389efd
Diff: https://git.reviewboard.kde.org/r/129414/diff/
Testing
-------
Manual testing in the (expanded) kmessagewidgettest.
File Attachments
----------------
Before: wasted space in the first messagewidget
https://git.reviewboard.kde.org/media/uploaded/files/2016/11/16/e2fb5bce-e249-44fc-9ece-d49c0cf656e1__Spectacle.E12435.png
After: no wasted space in the first messagewidget
https://git.reviewboard.kde.org/media/uploaded/files/2016/11/16/09986a2d-f1be-48ad-92f0-87d264873ad9__Spectacle.J13060.png
Before (with text wrapped)
https://git.reviewboard.kde.org/media/uploaded/files/2016/11/16/ab594606-7f90-4ca8-949d-9baafd448252__Spectacle.X22288.png
After (with text wrapped)
https://git.reviewboard.kde.org/media/uploaded/files/2016/11/16/f574d6e6-7c92-443a-b1de-345cb3ed3ad3__Spectacle.J21199.png
Thanks,
Elvis Angelaccio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161116/3e2b2cea/attachment.html>
More information about the Kde-frameworks-devel
mailing list