D16908: [decorations] Emit DecorationSettings::fontChanged signal

Vlad Zagorodniy <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag created this revision.
zzag added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
zzag requested review of this revision.

REVISION 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 more preferred.
  
  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.

REPOSITORY
  R108 KWin

BRANCH
  emit-fontchanged-signal

REVISION DETAIL
  https://phabricator.kde.org/D16908

AFFECTED FILES
  decorations/settings.cpp
  decorations/settings.h

To: zzag, #kwin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.