Review Request 120147: Add frame arount KTextEditor::View, with proper handling of focus and mouse over, for widget themes that support it
Hugo Pereira Da Costa
hugo.pereira at free.fr
Thu Sep 11 21:24:10 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120147/
-----------------------------------------------------------
(Updated Sept. 11, 2014, 9:24 p.m.)
Review request for KDE Frameworks and Christoph Cullmann.
Changes
-------
Fixed issues. Rebased to master.
Bugs: 158379
https://bugs.kde.org/show_bug.cgi?id=158379
Repository: ktexteditor
Description
-------
Short description is in title and bug report.
The idea is to implement sunken frame in KTextEditor::View (kate, kwrite, etc.) with 'native' focus and mouse-over effects for styles that support it.
This makes KateView look again like QTextEdit
Some changes are needed to the layouting in order to accomodate a frame either around the contents only, or around contents+scrollbar, depending on style hint.
The detail changes are:
- Use QGridLayout for setting up View layout
- Added QSpacerItems in order to properly implement frame around edition area.
- properly account for whether style requires frame around contents only, or around contents + scrollbars
- Call style primitive (CE_ShapedFrame) in order to render a frame around the said area, with proper mouse-over and focus set.
- Adjust scrollbar background based on whether frame must be drawn around contents only, or scrollbars+contents
- Force update of widget and scrollbars on focusIn and focusOut events
Diffs (updated)
-----
src/view/kateview.h 624072e
src/view/kateview.cpp 08b4d28
Diff: https://git.reviewboard.kde.org/r/120147/diff/
Testing
-------
Tested with Breeze, Oxygen, Virtuality, and fusion.
The first three have focus and mouse-over effect.
The last one does not, but still, the "correct" frame is rendered, with proper margins.
Tested in Kate, KWrite and KDevelop.
Screenshots attached with kate.
File Attachments
----------------
before
https://git.reviewboard.kde.org/media/uploaded/files/2014/09/11/d8a70e3b-e5ea-4fae-aeee-df073c801d86__kate-old.png
after (breeze)
https://git.reviewboard.kde.org/media/uploaded/files/2014/09/11/b9968e2b-9104-4022-ab7d-e89b2ce73116__kate-new-breeze.png
after (oxygen)
https://git.reviewboard.kde.org/media/uploaded/files/2014/09/11/1be8a8d2-053d-4002-9d83-ad2afd129042__kate-new-oxygen.png
Thanks,
Hugo Pereira Da Costa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140911/a60882e4/attachment.html>
More information about the Kde-frameworks-devel
mailing list