<table><tr><td style="">ahmadsamir updated this revision to Diff 77268.<br />ahmadsamir retitled this revision from "[Fonts KCM] Change how nearestExistingFonts() finds a matching font" to "[Fonts KCM] Change setNearestExistingFonts() to set the fonts only when necessary".<br />ahmadsamir edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-qzopg3ze7nupntx/">(Show Details)</a><br />ahmadsamir edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-h5cgnogx5jbwkmp/">(Show Details)</a><br />ahmadsamir added a subscriber: bport.<br />ahmadsamir added a comment.
</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/D27785">View Revision</a></tr></table><br /><div><div><p>Tweak commit message</p></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div>is "Regular|Normal|Book|Roman".<br />
<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Due to the change to clear font styleName property when saving via</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Change setNearestExistingFonts() to set the fonts only if nearestExistingFont()<br />
returns a different font.<br />
<br />
Also remove setNeedsSave(false) from load() method, doesn't seem to be needed<br />
any more (Partially reverting commit 0c4da0774e4388b6937b).<br />
<br />
[Fonts KCM] Port KFontDialog/KFontChooser to QFontDialog<br />
<br />
QFontDialog doesn't have the capability that KFontDialog had, where with<br />
the latter when using adjustAllFonts() you could change only one of</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">KConfig (D27735)</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">the font family, the font style, the font size</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">if in kdegloblas</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">e.g.</span> you <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">removed the ",Regular|Normal|Book|Roman"</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">could change</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">from the end of the *</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">the size and keep each respective </span>font<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">*= entries</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"> families for "General" and "Toolbar" as is.<br />
<br />
When using ajustAllFonts()</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">openin</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">try to set</span> the f<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">ont selection dialog</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">ixed width/Monospace font</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">in</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">from</span> the <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">KCM, the very first style i</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">font family the user ha</span>s selected,<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> not "Regular" and co.</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">as</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">otherwise fallback to whatever</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">it should be. This will be addressed in an upcoming diff.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">QFontDatabase::systemFont(QFontDatabase::FixedFont) gets.<br />
<br />
Depends on D27785</span></div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div> you actually change something<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"><br />
<br />
Changing a font still works.<br />
Due to the change to clear font styleName property when saving via<br />
KConfig (D27735), if in kdegloblas you removed the ",Regular|Normal|Book|Roman"<br />
from the end of the *font*= entries, openin the font selection dialog<br />
in the KCM, the very first style is selected, not "Regular" and co. as<br />
it should be. This will be addressed in an upcoming diff.</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D27785?vs=77265&id=77268">https://phabricator.kde.org/D27785?vs=77265&id=77268</a></div></div><br /><div><strong>BRANCH</strong><div><div>arcpatch-D27808 (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D27785">https://phabricator.kde.org/D27785</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kcms/fonts/fonts.cpp<br />
kcms/fonts/fonts.h</div></div></div><br /><div><strong>To: </strong>ahmadsamir, Plasma, davidedmundson, broulik, ervin, meven<br /><strong>Cc: </strong>bport, 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>