<table><tr><td style="">broulik created this revision.<br />broulik added reviewers: Plasma, VDG.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />broulik 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/D18482">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>kcminit for performance reasons is not desktop settings aware which means it won't load the plasma integration plugin and as such not apply the color scheme to Qt's widgets.<br />
When writing the GTK config, it would read them from <tt style="background: #ebebeb; font-size: 13px;">kdeglobals</tt> directly. However, for tooltips it would use <tt style="background: #ebebeb; font-size: 13px;">QToolTip::palette()</tt> which would then use Qt's default palette in kcminit. Use the <tt style="background: #ebebeb; font-size: 13px;">QPalette</tt> we created from <tt style="background: #ebebeb; font-size: 13px;">kdeglobals</tt> to get the tooltip colors instead.</p>

<p>BUG: 355540<br />
FIXED-IN: 5.12.8</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Because of a bug preventing proper propagation of environment variables to apps launched through Kickoff/KRunner (KRun?) via klauncher(??) this is hardly noticeable but when you e.g. open Gimp or Inkscape through "Open With" in Dolphin or manually using</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);">GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:$HOME/.gtkrc-2.0:$HOME/.config/gtkrc-2.0 gimp</pre></div>

<p>I didn't fully understand where it gets the tooltip base vs background from, so here are the compared values:<br />
Incorrect colors applied on startup by kcminit (note the light <tt style="background: #ebebeb; font-size: 13px;">bg</tt>):</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);">style "ToolTip"
{
  bg[NORMAL] = { 0.937, 0.937, 0.937 }
  base[NORMAL] = { 1.000, 1.000, 1.000 }
  text[NORMAL] = { 0.000, 0.000, 0.000 }
  fg[NORMAL] = { 0.000, 0.000, 0.000 }
}</pre></div>

<p>Without this patch colors applied correctly when hitting Apply in the Color KCM:</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);">style "ToolTip"
{
  bg[NORMAL] = { 0.192, 0.212, 0.231 }
  base[NORMAL] = { 0.137, 0.149, 0.161 }
  text[NORMAL] = { 0.937, 0.941, 0.945 }
  fg[NORMAL] = { 0.937, 0.941, 0.945 }
}</pre></div>

<p>Colors applied consistently with this patch, notice how <tt style="background: #ebebeb; font-size: 13px;">base</tt> is now same as <tt style="background: #ebebeb; font-size: 13px;">bg</tt> and different from the previous correct case:</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);">style "ToolTip"
{
  bg[NORMAL] = { 0.192, 0.212, 0.231 }
  base[NORMAL] = { 0.192, 0.212, 0.231 }
  text[NORMAL] = { 0.937, 0.941, 0.945 }
  fg[NORMAL] = { 0.937, 0.941, 0.945 }
}</pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D18482">https://phabricator.kde.org/D18482</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kcms/krdb/krdb.cpp</div></div></div><br /><div><strong>To: </strong>broulik, Plasma, VDG<br /><strong>Cc: </strong>plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>