Fonts KCM: Fix text readability regression

Authored by rkflx on Jun 6 2018, 9:44 PM.

Description

Fonts KCM: Fix text readability regression

Summary:
Porting the Fonts KCM to QML in 24b960f92284 set the state of the font
preview labels to disabled, resulting in a light gray text with too
little contrast to enable a usable preview of the chosen font.

In the QWidgets based KCM the following code was used:

QLabel::setFrameStyle(QFrame::StyledPanel | QFrame::Sunken)

As that property is not available from QML, we use an alternative
approach by setting the state to readOnly. To also indicate
visually that nothing can be typed into the textedit, we add
Kirigami.Theme.inherit: true which results in changing the
background from white to grey.

Test Plan:
Font previews for each category in kcmshell5 kcm_fonts should be
readable again.

Before:


After:

How it looked like in Plasma 5.12:

Reviewers: mart

Reviewed By: mart

Subscribers: mart, broulik, Zren, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D13390

Details

Committed
rkflxJun 8 2018, 12:36 PM
Reviewer
mart
Differential Revision
D13390: Fonts KCM: Fix text readability regression
Parents
R119:0292bf40037a: Update version number for 5.13.0 GIT_SILENT
Branches
Unknown
Tags
Unknown