<table><tr><td style="">flherne created this revision.<br />flherne added a reviewer: Frameworks.<br />flherne set the repository for this revision to R265 KConfigWidgets.<br />Restricted Application added a project: Frameworks.
</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/D4637" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>[RFC]</p>
<p>KColorSchemeManager::activateScheme() sets a custom path for the application's color scheme, with</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);">qApp->setProperty("KDE_COLOR_SCHEME_PATH", index.data(Qt::UserRole));</pre></div>
<p>Currently, the KColorScheme() and KStatefulBrush() constructors will ignore this and use only the system color scheme, unless an application-specifiic config is explicitly loaded and passed in by the caller.</p>
<p>This is problematic, because all callers I've seen assume that the default is to match the <em>application</em> scheme (usually this is equivalent, because few applications use KColorSchemeManager).</p>
<p>For example, when the application of a KTextEditor widget or KonsolePart has an opposite color scheme to the system, the Find bars are unreadable: <a href="https://bugs.kde.org/373764" class="remarkup-link" target="_blank" rel="noreferrer">https://bugs.kde.org/373764</a></p>
<p>This patch makes KColorScheme() match the application scheme by default when this differs from the system scheme, which seems preferable to adding the same code in hundreds of callers.</p>
<p>BUG: 373764</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>It works...</p>
<p>I haven't looked at proper tests yet.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R265 KConfigWidgets</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4637" rel="noreferrer">https://phabricator.kde.org/D4637</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/kcolorscheme.cpp<br />
src/kcolorscheme.h</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>flherne, Frameworks<br /></div>