<table><tr><td style="">ahmadsamir created this revision.<br />ahmadsamir added reviewers: Plasma, davidedmundson, broulik, ervin, meven.<br />Herald added a project: Plasma.<br />ahmadsamir 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/D27830">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>KConfig will clear the styleName font property for "Regular"-like font<br />
styles (so that setBold(true) can work properly); this means that when<br />
opening the font selection dialog it may highlight the wrong style for<br />
the font currently set in kdeglobals, i.e. if the styleName property is<br />
empty, QFontDialog will always select the first style in the list.</p>
<p>Workaround the issue by setting the "Regular"-like font style of the<br />
initial font.</p>
<p>adjustAllFonts() doesn't take any arguments, change the QML code accordingly.</p>
<p>Depends on <a href="https://phabricator.kde.org/D27808" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D27808</a><br />
Depends on <a href="https://phabricator.kde.org/D27785" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D27785</a></p>
<p>See also <a href="https://phabricator.kde.org/D27735" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/D27735</a> (KConfig)</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">Apply this diff and the other two it depends on</li>
<li class="remarkup-list-item">Edit kdeglobals and remove ",Regular|Normal|Book|Roman" from the *font*= entries; append e.g. ",Bold" to one of those entries (pick a font family that has a bold style)</li>
<li class="remarkup-list-item">Open the fonts kcm, and open the font selection dialog for a font, the correct "Regular"-like style should be selected</li>
<li class="remarkup-list-item">Open the font selection dialog for the font you set as Bold; Bold should be highlighted</li>
<li class="remarkup-list-item">Open the "Adjust all fonts" dialog, again the correct style should be selected</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br /><div><strong>BRANCH</strong><div><div>l-qfontdlg-fix-initial (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D27830">https://phabricator.kde.org/D27830</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kcms/fonts/fonts.cpp<br />
kcms/fonts/fonts.h<br />
kcms/fonts/package/contents/ui/FontWidget.qml<br />
kcms/fonts/package/contents/ui/main.qml</div></div></div><br /><div><strong>To: </strong>ahmadsamir, Plasma, davidedmundson, broulik, ervin, meven<br /><strong>Cc: </strong>plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>