[decorations] Emit DecorationSettings::fontChanged signal
ClosedPublic

Authored by zzag on Nov 15 2018, 7:21 PM.

Details

Summary

No one emits DecorationSettings::fontChanged signal, so if you change
the window title font, then titlebars might look differently after reboot.

Currently, there are two places where we can emit that signal:

  • in KDecoration library itself;
  • and in KWin.

Because we would need to listen for a Plasma specific D-Bus signal, the
latter option is preferable.

Surprisingly, KWin's implementation of DecorationSettingsPrivate already
reacts to refreshFonts D-Bus signal (even though indirectly), so all
what we have to do is get the current window title font in
SettingsImpl::readSettings, and if it's different from the previous one,
emit DecorationSettings::fontChanged signal.

BUG: 400980
FIXED-IN: 5.15.0

Test Plan
  • Increased the size of the window title font, titlebars got bigger;
  • Decreased the font size, titlebars got smaller.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Nov 15 2018, 7:21 PM
Restricted Application added a project: KWin. · View Herald TranscriptNov 15 2018, 7:21 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Nov 15 2018, 7:21 PM
zzag edited the test plan for this revision. (Show Details)Nov 15 2018, 7:21 PM
zzag edited the summary of this revision. (Show Details)Nov 15 2018, 7:29 PM
davidedmundson accepted this revision.Nov 15 2018, 7:44 PM
This revision is now accepted and ready to land.Nov 15 2018, 7:44 PM
This revision was automatically updated to reflect the committed changes.