Honor the decoration font in Aurorae
Adding two properties to the AuroraeFactory to read the active and inactive title font. BUG: 304791 FIXED-IN: 4.9.1 REVIEW: 105956
This commit is contained in:
parent
f1974ee328
commit
85f31b1310
3 changed files with 20 additions and 0 deletions
|
@ -85,6 +85,9 @@ bool AuroraeFactory::reset(unsigned long changed)
|
|||
if (changed & SettingButtons) {
|
||||
emit buttonsChanged();
|
||||
}
|
||||
if (changed & SettingFont){
|
||||
emit titleFontChanged();
|
||||
}
|
||||
const KConfig conf("auroraerc");
|
||||
const KConfigGroup group(&conf, "Engine");
|
||||
const QString themeName = group.readEntry("ThemeName", "example-deco");
|
||||
|
@ -161,6 +164,16 @@ bool AuroraeFactory::customButtonPositions()
|
|||
return options()->customButtonPositions();
|
||||
}
|
||||
|
||||
QFont AuroraeFactory::activeTitleFont()
|
||||
{
|
||||
return options()->font();
|
||||
}
|
||||
|
||||
QFont AuroraeFactory::inactiveTitleFont()
|
||||
{
|
||||
return options()->font(false);
|
||||
}
|
||||
|
||||
AuroraeFactory *AuroraeFactory::s_instance = NULL;
|
||||
|
||||
/*******************************************************
|
||||
|
|
|
@ -41,6 +41,8 @@ class AuroraeFactory : public QObject, public KDecorationFactoryUnstable
|
|||
Q_PROPERTY(QString leftButtons READ leftButtons NOTIFY buttonsChanged)
|
||||
Q_PROPERTY(QString rightButtons READ rightButtons NOTIFY buttonsChanged)
|
||||
Q_PROPERTY(bool customButtonPositions READ customButtonPositions NOTIFY buttonsChanged)
|
||||
Q_PROPERTY(QFont activeTitleFont READ activeTitleFont NOTIFY titleFontChanged)
|
||||
Q_PROPERTY(QFont inactiveTitleFont READ inactiveTitleFont NOTIFY titleFontChanged)
|
||||
public:
|
||||
~AuroraeFactory();
|
||||
|
||||
|
@ -58,12 +60,16 @@ public:
|
|||
QString rightButtons();
|
||||
bool customButtonPositions();
|
||||
|
||||
QFont activeTitleFont();
|
||||
QFont inactiveTitleFont();
|
||||
|
||||
private:
|
||||
AuroraeFactory();
|
||||
void init();
|
||||
|
||||
Q_SIGNALS:
|
||||
void buttonsChanged();
|
||||
void titleFontChanged();
|
||||
|
||||
private:
|
||||
static AuroraeFactory *s_instance;
|
||||
|
|
|
@ -143,6 +143,7 @@ Decoration {
|
|||
elide: Text.ElideRight
|
||||
height: auroraeTheme.titleHeight
|
||||
color: decoration.active ? auroraeTheme.activeTextColor : auroraeTheme.inactiveTextColor
|
||||
font: decoration.active ? options.activeTitleFont : options.inactiveTitleFont
|
||||
anchors {
|
||||
left: leftButtonGroup.right
|
||||
right: rightButtonGroup.left
|
||||
|
|
Loading…
Reference in a new issue