KateModeMenuList: improve word wrap
Summary:
- Use QFontMetrics::horizontalAdvance(text) instead of QFontMetrics::boundingRect(text).width(), since it obtains a more precise value over the width of a text.
- Allow word wrap in section titles.
Reviewers: KTextEditor, cullmann, dhaumann
Reviewed By: KTextEditor, dhaumann
Subscribers: kwrite-devel, kde-frameworks-devel
Tags: Kate, Frameworks
Differential Revision: https://phabricator.kde.org/D24983