<table><tr><td style="">rkflx created this revision.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.<br />rkflx requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D13390">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Porting the Fonts KCM to QML in <a href="https://phabricator.kde.org/R119:24b960f922844d76b050730c1ea42a4abbefe11c" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">24b960f92284</a> set the state of the font<br />
preview labels to <tt style="background: #ebebeb; font-size: 13px;">disabled</tt>, resulting in a light gray text with too<br />
little contrast to enable a usable preview of the chosen font.</p>
<p>In the <tt style="background: #ebebeb; font-size: 13px;">QWidgets</tt> based KCM the following code was used:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">QLabel::setFrameStyle(QFrame::StyledPanel | QFrame::Sunken)</pre></div>
<p>As that property is not available from QML, we reset the text colour to<br />
solve the problem. It's still not using the proper frame colour, though,<br />
but that does not seem like too much of an issue.</p>
<p>Alternatively we could use a <tt style="background: #ebebeb; font-size: 13px;">Frame</tt> and a <tt style="background: #ebebeb; font-size: 13px;">Label</tt>, but this approach<br />
has even more problems, e.g. the frame does not respect the rounded<br />
border mandated by Breeze, and the horizontal alignment of each row<br />
would need to be adapted.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Font previews for each category in <tt style="background: #ebebeb; font-size: 13px;">kcmshell5 kcm_fonts</tt> should be<br />
readable again.</p>
<p>Before: <a href="https://phabricator.kde.org/F5894425" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F5894425: fonts-kcm-before.png</a><br />
After: <a href="https://phabricator.kde.org/F5894424" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F5894424: fonts-kcm-after.png</a><br />
Ideal look (Plasma 5.12): <a href="https://phabricator.kde.org/F5894423" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F5894423: fonts-kcm-5.12.png</a></p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br /><div><strong>BRANCH</strong><div><div>fonts-kcm-readability (branched from Plasma/5.13)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13390">https://phabricator.kde.org/D13390</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kcms/fonts/package/contents/ui/FontWidget.qml</div></div></div><br /><div><strong>To: </strong>rkflx<br /><strong>Cc: </strong>plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>