more unfinished changes, process tab for dashboard

This commit is contained in:
2026-09-30 14:26:50 +02:00
parent 0bfda04e91
commit 359f832609
98 changed files with 8633 additions and 2983 deletions
+206 -276
View File
@@ -1,101 +1,126 @@
#pragma once
#include "configobject.hpp"
#include <QFont>
#include <QVariantMap>
#include <limits>
#include <qqmlregistration.h>
#include <qfont.h>
#include <qstring.h>
#include <qvariantmap.h>
#include "settings/objectnode.hpp"
#include "common.hpp"
namespace ZShell::config {
class AnimDurations : public ConfigObject {
Q_OBJECT
QML_ANONYMOUS
using Qt::StringLiterals::operator""_s;
CFG_PROPERTY(qreal, scale, 1)
// Forward declare token types from tokens.hpp
class RoundingTokens;
class SpacingTokens;
class PaddingTokens;
class AnimDurationTokens;
Q_PROPERTY(int extraLarge READ extraLarge NOTIFY scaleChanged)
class AppearanceRounding : public settings::ObjectNode {
CONFIG_NODE(AppearanceRounding, settings::ObjectNode)
CONFIG_PROPERTY(qreal, scale, 1)
Q_PROPERTY(int extraSmall READ extraSmall NOTIFY valuesChanged)
Q_PROPERTY(int small READ small NOTIFY valuesChanged)
Q_PROPERTY(int medium READ medium NOTIFY valuesChanged)
Q_PROPERTY(int large READ large NOTIFY valuesChanged)
Q_PROPERTY(int largeIncreased READ largeIncreased NOTIFY valuesChanged)
Q_PROPERTY(int extraLarge READ extraLarge NOTIFY valuesChanged)
Q_PROPERTY(
int expressiveDefaultEffects READ expressiveDefaultEffects NOTIFY
scaleChanged)
Q_PROPERTY(
int expressiveDefaultSpatial READ expressiveDefaultSpatial NOTIFY
scaleChanged)
Q_PROPERTY(
int expressiveFastEffects READ expressiveFastEffects NOTIFY scaleChanged)
Q_PROPERTY(
int expressiveFastSpatial READ expressiveFastSpatial NOTIFY scaleChanged)
Q_PROPERTY(
int expressiveSlowEffects READ expressiveSlowEffects NOTIFY scaleChanged)
Q_PROPERTY(
int expressiveSlowSpatial READ expressiveSlowSpatial NOTIFY scaleChanged)
Q_PROPERTY(int large READ large NOTIFY scaleChanged)
Q_PROPERTY(int normal READ normal NOTIFY scaleChanged)
Q_PROPERTY(int small READ small NOTIFY scaleChanged)
int extraLargeIncreased READ extraLargeIncreased NOTIFY valuesChanged)
Q_PROPERTY(int extraExtraLarge READ extraExtraLarge NOTIFY valuesChanged)
Q_PROPERTY(int full READ full NOTIFY valuesChanged)
public:
explicit AnimDurations(QObject* parent = nullptr) : ConfigObject(parent) {}
void bindTokens(RoundingTokens* tokens);
[[nodiscard]] int small() const { return static_cast<int>(200 * scale()); }
[[nodiscard]] int normal() const { return static_cast<int>(400 * scale()); }
[[nodiscard]] int large() const { return static_cast<int>(600 * scale()); }
[[nodiscard]] int extraLarge() const {
return static_cast<int>(1000 * scale());
}
[[nodiscard]] int expressiveFastSpatial() const {
return static_cast<int>(350 * scale());
}
[[nodiscard]] int expressiveDefaultSpatial() const {
return static_cast<int>(500 * scale());
}
[[nodiscard]] int expressiveSlowSpatial() const {
return static_cast<int>(650 * scale());
}
[[nodiscard]] int expressiveFastEffects() const {
return static_cast<int>(150 * scale());
}
[[nodiscard]] int expressiveDefaultEffects() const {
return static_cast<int>(200 * scale());
}
[[nodiscard]] int expressiveSlowEffects() const {
return static_cast<int>(300 * scale());
}
[[nodiscard]] int extraSmall() const;
[[nodiscard]] int small() const;
[[nodiscard]] int medium() const;
[[nodiscard]] int large() const;
[[nodiscard]] int largeIncreased() const;
[[nodiscard]] int extraLarge() const;
[[nodiscard]] int extraLargeIncreased() const;
[[nodiscard]] int extraExtraLarge() const;
[[nodiscard]] int full() const;
signals:
void valuesChanged();
private:
RoundingTokens* m_tokens = nullptr;
};
class Anim : public ConfigObject {
Q_OBJECT
QML_ANONYMOUS
class AppearanceSpacing : public settings::ObjectNode {
CONFIG_NODE(AppearanceSpacing, settings::ObjectNode)
CFG_PROPERTY(int, mediaGifSpeedAdjustment, 300)
CFG_PROPERTY(qreal, sessionGifSpeed, 0.7)
CONFIG_SUBOBJECT(AnimDurations, durations)
CONFIG_PROPERTY(qreal, scale, 1)
Q_PROPERTY(int extraSmall READ extraSmall NOTIFY valuesChanged)
Q_PROPERTY(int small READ small NOTIFY valuesChanged)
Q_PROPERTY(int medium READ medium NOTIFY valuesChanged)
Q_PROPERTY(int large READ large NOTIFY valuesChanged)
Q_PROPERTY(int largeIncreased READ largeIncreased NOTIFY valuesChanged)
Q_PROPERTY(int extraLarge READ extraLarge NOTIFY valuesChanged)
Q_PROPERTY(
int extraLargeIncreased READ extraLargeIncreased NOTIFY valuesChanged)
Q_PROPERTY(int extraExtraLarge READ extraExtraLarge NOTIFY valuesChanged)
public:
explicit Anim(QObject* parent = nullptr)
: ConfigObject(parent), m_durations(new AnimDurations(this)) {}
void bindTokens(SpacingTokens* tokens);
[[nodiscard]] int extraSmall() const;
[[nodiscard]] int small() const;
[[nodiscard]] int medium() const;
[[nodiscard]] int large() const;
[[nodiscard]] int largeIncreased() const;
[[nodiscard]] int extraLarge() const;
[[nodiscard]] int extraLargeIncreased() const;
[[nodiscard]] int extraExtraLarge() const;
signals:
void valuesChanged();
private:
SpacingTokens* m_tokens = nullptr;
};
class Deform : public ConfigObject {
Q_OBJECT
QML_ANONYMOUS
class AppearancePadding : public settings::ObjectNode {
CONFIG_NODE(AppearancePadding, settings::ObjectNode)
CFG_PROPERTY(qreal, scale, 1)
CONFIG_PROPERTY(qreal, scale, 1)
Q_PROPERTY(int extraSmall READ extraSmall NOTIFY valuesChanged)
Q_PROPERTY(int smaller READ smaller NOTIFY valuesChanged)
Q_PROPERTY(int small READ small NOTIFY valuesChanged)
Q_PROPERTY(int medium READ medium NOTIFY valuesChanged)
Q_PROPERTY(int large READ large NOTIFY valuesChanged)
Q_PROPERTY(int largeIncreased READ largeIncreased NOTIFY valuesChanged)
Q_PROPERTY(int extraLarge READ extraLarge NOTIFY valuesChanged)
Q_PROPERTY(
int extraLargeIncreased READ extraLargeIncreased NOTIFY valuesChanged)
Q_PROPERTY(int extraExtraLarge READ extraExtraLarge NOTIFY valuesChanged)
public:
explicit Deform(QObject* parent = nullptr) : ConfigObject(parent) {}
};
void bindTokens(PaddingTokens* tokens);
class FontFamily : public ConfigObject {
Q_OBJECT
QML_ANONYMOUS
[[nodiscard]] int extraSmall() const;
[[nodiscard]] int smaller() const;
[[nodiscard]] int small() const;
[[nodiscard]] int medium() const;
[[nodiscard]] int large() const;
[[nodiscard]] int largeIncreased() const;
[[nodiscard]] int extraLarge() const;
[[nodiscard]] int extraLargeIncreased() const;
[[nodiscard]] int extraExtraLarge() const;
CFG_PROPERTY(QString, clock, QStringLiteral("Rubik"))
CFG_PROPERTY(QString, material, QStringLiteral("Material Symbols Rounded"))
CFG_PROPERTY(QString, mono, QStringLiteral("CaskaydiaCove NF"))
CFG_PROPERTY(QString, sans, QStringLiteral("Segoe UI Variable Text"))
signals:
void valuesChanged();
public:
explicit FontFamily(QObject* parent = nullptr) : ConfigObject(parent) {}
private:
PaddingTokens* m_tokens = nullptr;
};
namespace detail {
@@ -105,20 +130,19 @@ struct FontConfig {
int size;
int weight = QFont::Normal;
bool italic = false;
QVariantMap vaxes = {{QStringLiteral("ROND"), 25}};
QVariantMap vaxes = {{u"ROND"_s, 25}};
};
} // namespace detail
class FontSizeNode : public ConfigObject {
public:
explicit FontSizeNode(QObject* parent = nullptr) : ConfigObject(parent) {}
class FontSizeNode : public settings::ObjectNode {
CONFIG_NODE(FontSizeNode, settings::ObjectNode)
};
class FontStyleNode : public ConfigObject {
public:
explicit FontStyleNode(QObject* parent = nullptr) : ConfigObject(parent) {}
class FontStyleNode : public settings::ObjectNode {
CONFIG_NODE(FontStyleNode, settings::ObjectNode)
public:
virtual FontSizeNode* largeNode() const = 0;
virtual FontSizeNode* mediumNode() const = 0;
virtual FontSizeNode* smallNode() const = 0;
@@ -129,17 +153,16 @@ class FontStyleNode : public ConfigObject {
#define FONT(...) ZShell::config::detail::FontConfig __VA_ARGS__
#define FONT_CONFIG(Style, Size, props) \
class FontConfig##Style##Size : public FontSizeNode { \
Q_OBJECT QML_ANONYMOUS \
CONFIG_NODE(FontConfig##Style##Size, FontSizeNode) \
\
CFG_PROPERTY(QString, family, ARG(props).family) \
CFG_PROPERTY(int, size, ARG(props).size) \
CFG_PROPERTY(int, weight, ARG(props).weight) \
CFG_PROPERTY(bool, italic, ARG(props).italic) \
CFG_PROPERTY(QVariantMap, vaxes, ARG(props).vaxes) \
\
public \
: explicit FontConfig##Style##Size(QObject* parent = nullptr) \
: FontSizeNode(parent) {} \
CONFIG_PROPERTY( \
QString, \
family, \
ARG(props).family) /* Empty inherits the style family */ \
CONFIG_PROPERTY(int, size, ARG(props).size) \
CONFIG_PROPERTY(int, weight, ARG(props).weight) \
CONFIG_PROPERTY(bool, italic, ARG(props).italic) \
CONFIG_PROPERTY(QVariantMap, vaxes, ARG(props).vaxes) \
};
#define FONT_STYLE(Style, family_, large_, medium_, small_) \
FONT_CONFIG(Style, Large, ARG(large_)) \
@@ -147,47 +170,41 @@ class FontStyleNode : public ConfigObject {
FONT_CONFIG(Style, Small, ARG(small_)) \
\
class FontStyle##Style : public FontStyleNode { \
Q_OBJECT QML_ANONYMOUS \
CONFIG_NODE(FontStyle##Style, FontStyleNode) \
\
CFG_PROPERTY(QString, family, family_) \
CONFIG_SUBOBJECT(FontConfig##Style##Large, large) \
CONFIG_SUBOBJECT(FontConfig##Style##Medium, medium) \
CONFIG_SUBOBJECT(FontConfig##Style##Small, small) \
\
public \
: explicit FontStyle##Style(QObject* parent = nullptr) \
: FontStyleNode(parent) \
, m_large(new FontConfig##Style##Large(this)) \
, m_medium(new FontConfig##Style##Medium(this)) \
, m_small(new FontConfig##Style##Small(this)) {} \
CONFIG_PROPERTY(QString, family, family_) \
CONFIG_SUBOBJECT(FontConfig##Style##Large, large) \
CONFIG_SUBOBJECT(FontConfig##Style##Medium, medium) \
CONFIG_SUBOBJECT(FontConfig##Style##Small, small) \
\
public: \
FontSizeNode* largeNode() const override { return m_large; } \
FontSizeNode* mediumNode() const override { return m_medium; } \
FontSizeNode* smallNode() const override { return m_small; } \
};
// clang-format off
FONT_STYLE(Headline, QStringLiteral("GoogleSansFlex"),
FONT_STYLE(Headline, u"GoogleSansFlex"_s,
FONT({ .size = 32, .weight = QFont::Medium }),
FONT({ .size = 28, .weight = QFont::Medium }),
FONT({ .size = 24, .weight = QFont::Medium })
)
FONT_STYLE(Title, QStringLiteral("GoogleSansFlex"),
FONT_STYLE(Title, u"GoogleSansFlex"_s,
FONT({ .size = 22, .weight = QFont::Medium }),
FONT({ .size = 16, .weight = QFont::Medium }),
FONT({ .size = 14, .weight = QFont::Medium })
)
FONT_STYLE(Body, QStringLiteral("GoogleSansFlex"),
FONT_STYLE(Body, u"GoogleSansFlex"_s,
FONT({ .size = 16 }),
FONT({ .size = 14 }),
FONT({ .size = 12 })
)
FONT_STYLE(Label, QStringLiteral("GoogleSansFlex"),
FONT_STYLE(Label, u"GoogleSansFlex"_s,
FONT({ .size = 14, .weight = QFont::Medium }),
FONT({ .size = 12, .weight = QFont::Medium }),
FONT({ .size = 11 })
)
FONT_STYLE(Mono, QStringLiteral("CaskaydiaCove NF"),
FONT_STYLE(Mono, u"CaskaydiaCove NF"_s,
FONT({ .size = 16, .vaxes = {} }),
FONT({ .size = 14, .vaxes = {} }),
FONT({ .size = 12, .vaxes = {} })
@@ -200,23 +217,15 @@ FONT_CONFIG(Icon, Medium, FONT({.size = static_cast<int>(24 / 1.33)}))
FONT_CONFIG(Icon, Small, FONT({.size = static_cast<int>(20 / 1.33)}))
class FontStyleIcon : public FontStyleNode {
Q_OBJECT
QML_ANONYMOUS
CONFIG_NODE(FontStyleIcon, FontStyleNode)
CFG_PROPERTY(QString, family, QStringLiteral("Material Symbols Rounded"))
CONFIG_PROPERTY(QString, family, u"Material Symbols Rounded"_s)
CONFIG_SUBOBJECT(FontConfigIconExtraLarge, extraLarge)
CONFIG_SUBOBJECT(FontConfigIconLarge, large)
CONFIG_SUBOBJECT(FontConfigIconMedium, medium)
CONFIG_SUBOBJECT(FontConfigIconSmall, small)
public:
explicit FontStyleIcon(QObject* parent = nullptr)
: FontStyleNode(parent)
, m_extraLarge(new FontConfigIconExtraLarge(this))
, m_large(new FontConfigIconLarge(this))
, m_medium(new FontConfigIconMedium(this))
, m_small(new FontConfigIconSmall(this)) {}
FontSizeNode* extraLargeNode() const override { return m_extraLarge; }
FontSizeNode* largeNode() const override { return m_large; }
FontSizeNode* mediumNode() const override { return m_medium; }
@@ -228,11 +237,20 @@ class FontStyleIcon : public FontStyleNode {
#undef FONT_CONFIG
#undef FONT_STYLE
class AppearanceFont : public ConfigObject {
Q_OBJECT
QML_ANONYMOUS
class FontFamily : public settings::ObjectNode {
CONFIG_NODE(FontFamily, settings::ObjectNode)
CFG_PROPERTY(qreal, scale, 1)
CONFIG_PROPERTY(QString, clock, QStringLiteral("Rubik"))
CONFIG_PROPERTY(
QString, material, QStringLiteral("Material Symbols Rounded"))
CONFIG_PROPERTY(QString, mono, QStringLiteral("CaskaydiaCove NF"))
CONFIG_PROPERTY(QString, sans, QStringLiteral("Segoe UI Variable Text"))
};
class AppearanceFont : public settings::ObjectNode {
CONFIG_NODE(AppearanceFont, settings::ObjectNode)
CONFIG_PROPERTY(qreal, scale, 1)
CONFIG_SUBOBJECT(FontFamily, family)
CONFIG_SUBOBJECT(FontStyleHeadline, headline)
CONFIG_SUBOBJECT(FontStyleTitle, title)
@@ -240,160 +258,83 @@ class AppearanceFont : public ConfigObject {
CONFIG_SUBOBJECT(FontStyleLabel, label)
CONFIG_SUBOBJECT(FontStyleMono, mono)
CONFIG_SUBOBJECT(FontStyleIcon, icon)
CFG_PROPERTY(QString, clock, QStringLiteral("Rubik"))
CFG_PROPERTY(QString, workspaces, QStringLiteral("Rubik"))
public:
explicit AppearanceFont(QObject* parent = nullptr)
: ConfigObject(parent)
, m_family(new FontFamily(this))
, m_headline(new FontStyleHeadline(this))
, m_title(new FontStyleTitle(this))
, m_body(new FontStyleBody(this))
, m_label(new FontStyleLabel(this))
, m_mono(new FontStyleMono(this))
, m_icon(new FontStyleIcon(this)) {}
CONFIG_PROPERTY(QString, clock, QStringLiteral("Rubik"))
CONFIG_PROPERTY(QString, workspaces, QStringLiteral("Rubik"))
};
class Transparency : public ConfigObject {
Q_OBJECT
QML_ANONYMOUS
class AnimDurations : public settings::ObjectNode {
CONFIG_NODE(AnimDurations, settings::ObjectNode)
CFG_PROPERTY(qreal, base, 0.85)
CFG_PROPERTY(bool, enabled, false)
CFG_PROPERTY(qreal, layers, 0.4)
CONFIG_GLOBAL_PROPERTY(qreal, scale, 1)
public:
explicit Transparency(QObject* parent = nullptr) : ConfigObject(parent) {}
};
class AppearanceRounding : public ConfigObject {
Q_OBJECT
QML_ANONYMOUS
CFG_PROPERTY(qreal, scale, 1)
Q_PROPERTY(int extraSmall READ extraSmall NOTIFY scaleChanged)
Q_PROPERTY(int small READ small NOTIFY scaleChanged)
Q_PROPERTY(int medium READ medium NOTIFY scaleChanged)
Q_PROPERTY(int large READ large NOTIFY scaleChanged)
Q_PROPERTY(int largeIncreased READ largeIncreased NOTIFY scaleChanged)
Q_PROPERTY(int extraLarge READ extraLarge NOTIFY scaleChanged)
Q_PROPERTY(int small READ small NOTIFY valuesChanged)
Q_PROPERTY(int normal READ normal NOTIFY valuesChanged)
Q_PROPERTY(int large READ large NOTIFY valuesChanged)
Q_PROPERTY(int extraLarge READ extraLarge NOTIFY valuesChanged)
Q_PROPERTY(
int extraLargeIncreased READ extraLargeIncreased NOTIFY scaleChanged)
Q_PROPERTY(int extraExtraLarge READ extraExtraLarge NOTIFY scaleChanged)
Q_PROPERTY(int full READ full CONSTANT)
public:
explicit AppearanceRounding(QObject* parent = nullptr)
: ConfigObject(parent) {}
[[nodiscard]] int extraSmall() const {
return static_cast<int>(4 * scale());
}
[[nodiscard]] int small() const { return static_cast<int>(8 * scale()); }
[[nodiscard]] int medium() const { return static_cast<int>(12 * scale()); }
[[nodiscard]] int large() const { return static_cast<int>(16 * scale()); }
[[nodiscard]] int largeIncreased() const {
return static_cast<int>(20 * scale());
}
[[nodiscard]] int extraLarge() const {
return static_cast<int>(28 * scale());
}
[[nodiscard]] int extraLargeIncreased() const {
return static_cast<int>(32 * scale());
}
[[nodiscard]] int extraExtraLarge() const {
return static_cast<int>(48 * scale());
}
[[nodiscard]] int full() const { return std::numeric_limits<int>::max(); }
};
class AppearanceSpacing : public ConfigObject {
Q_OBJECT
QML_ANONYMOUS
CFG_PROPERTY(qreal, scale, 1)
Q_PROPERTY(int extraSmall READ extraSmall NOTIFY scaleChanged)
Q_PROPERTY(int small READ small NOTIFY scaleChanged)
Q_PROPERTY(int medium READ medium NOTIFY scaleChanged)
Q_PROPERTY(int large READ large NOTIFY scaleChanged)
Q_PROPERTY(int largeIncreased READ largeIncreased NOTIFY scaleChanged)
Q_PROPERTY(int extraLarge READ extraLarge NOTIFY scaleChanged)
int expressiveFastSpatial READ expressiveFastSpatial NOTIFY
valuesChanged)
Q_PROPERTY(
int extraLargeIncreased READ extraLargeIncreased NOTIFY scaleChanged)
Q_PROPERTY(int extraExtraLarge READ extraExtraLarge NOTIFY scaleChanged)
public:
explicit AppearanceSpacing(QObject* parent = nullptr)
: ConfigObject(parent) {}
[[nodiscard]] int extraSmall() const {
return static_cast<int>(4 * scale());
}
[[nodiscard]] int small() const { return static_cast<int>(8 * scale()); }
[[nodiscard]] int medium() const { return static_cast<int>(12 * scale()); }
[[nodiscard]] int large() const { return static_cast<int>(16 * scale()); }
[[nodiscard]] int largeIncreased() const {
return static_cast<int>(20 * scale());
}
[[nodiscard]] int extraLarge() const {
return static_cast<int>(28 * scale());
}
[[nodiscard]] int extraLargeIncreased() const {
return static_cast<int>(32 * scale());
}
[[nodiscard]] int extraExtraLarge() const {
return static_cast<int>(48 * scale());
}
};
class AppearancePadding : public ConfigObject {
Q_OBJECT
QML_ANONYMOUS
CFG_PROPERTY(qreal, scale, 1)
Q_PROPERTY(int extraSmall READ extraSmall NOTIFY scaleChanged)
Q_PROPERTY(int smaller READ smaller NOTIFY scaleChanged)
Q_PROPERTY(int small READ small NOTIFY scaleChanged)
Q_PROPERTY(int medium READ medium NOTIFY scaleChanged)
Q_PROPERTY(int large READ large NOTIFY scaleChanged)
Q_PROPERTY(int largeIncreased READ largeIncreased NOTIFY scaleChanged)
Q_PROPERTY(int extraLarge READ extraLarge NOTIFY scaleChanged)
int expressiveDefaultSpatial READ expressiveDefaultSpatial NOTIFY
valuesChanged)
Q_PROPERTY(
int extraLargeIncreased READ extraLargeIncreased NOTIFY scaleChanged)
Q_PROPERTY(int extraExtraLarge READ extraExtraLarge NOTIFY scaleChanged)
int expressiveSlowSpatial READ expressiveSlowSpatial NOTIFY
valuesChanged)
Q_PROPERTY(
int expressiveFastEffects READ expressiveFastEffects NOTIFY
valuesChanged)
Q_PROPERTY(
int expressiveDefaultEffects READ expressiveDefaultEffects NOTIFY
valuesChanged)
Q_PROPERTY(
int expressiveSlowEffects READ expressiveSlowEffects NOTIFY
valuesChanged)
public:
explicit AppearancePadding(QObject* parent = nullptr)
: ConfigObject(parent) {}
void bindTokens(AnimDurationTokens* tokens);
[[nodiscard]] int extraSmall() const {
return static_cast<int>(4 * scale());
}
[[nodiscard]] int smaller() const { return static_cast<int>(5 * scale()); }
[[nodiscard]] int small() const { return static_cast<int>(8 * scale()); }
[[nodiscard]] int medium() const { return static_cast<int>(12 * scale()); }
[[nodiscard]] int large() const { return static_cast<int>(16 * scale()); }
[[nodiscard]] int largeIncreased() const {
return static_cast<int>(20 * scale());
}
[[nodiscard]] int extraLarge() const {
return static_cast<int>(28 * scale());
}
[[nodiscard]] int extraLargeIncreased() const {
return static_cast<int>(32 * scale());
}
[[nodiscard]] int extraExtraLarge() const {
return static_cast<int>(48 * scale());
}
[[nodiscard]] int small() const;
[[nodiscard]] int normal() const;
[[nodiscard]] int large() const;
[[nodiscard]] int extraLarge() const;
[[nodiscard]] int expressiveFastSpatial() const;
[[nodiscard]] int expressiveDefaultSpatial() const;
[[nodiscard]] int expressiveSlowSpatial() const;
[[nodiscard]] int expressiveFastEffects() const;
[[nodiscard]] int expressiveDefaultEffects() const;
[[nodiscard]] int expressiveSlowEffects() const;
signals:
void valuesChanged();
private:
AnimDurationTokens* m_tokens = nullptr;
};
class Appearance : public ConfigObject {
Q_OBJECT
QML_ANONYMOUS
class Anim : public settings::ObjectNode {
CONFIG_NODE(Anim, settings::ObjectNode)
CONFIG_PROPERTY(int, mediaGifSpeedAdjustment, 300)
CONFIG_PROPERTY(qreal, sessionGifSpeed, 0.7)
CONFIG_SUBOBJECT(AnimDurations, durations)
};
class Deform : public settings::ObjectNode {
CONFIG_NODE(Deform, settings::ObjectNode)
CONFIG_PROPERTY(qreal, scale, 1)
};
class AppearanceTransparency : public settings::ObjectNode {
CONFIG_NODE(AppearanceTransparency, settings::ObjectNode)
CONFIG_GLOBAL_PROPERTY(bool, enabled, false)
CONFIG_GLOBAL_PROPERTY(qreal, base, 0.85)
CONFIG_GLOBAL_PROPERTY(qreal, layers, 0.4)
};
class Appearance : public settings::ObjectNode {
CONFIG_NODE(Appearance, settings::ObjectNode)
CONFIG_SUBOBJECT(Anim, anim)
CONFIG_SUBOBJECT(Deform, deform)
@@ -401,18 +342,7 @@ class Appearance : public ConfigObject {
CONFIG_SUBOBJECT(AppearanceRounding, rounding)
CONFIG_SUBOBJECT(AppearanceSpacing, spacing)
CONFIG_SUBOBJECT(AppearancePadding, padding)
CONFIG_SUBOBJECT(Transparency, transparency)
public:
explicit Appearance(QObject* parent = nullptr)
: ConfigObject(parent)
, m_anim(new Anim(this))
, m_deform(new Deform(this))
, m_font(new AppearanceFont(this))
, m_rounding(new AppearanceRounding(this))
, m_spacing(new AppearanceSpacing(this))
, m_padding(new AppearancePadding(this))
, m_transparency(new Transparency(this)) {};
CONFIG_SUBOBJECT(AppearanceTransparency, transparency)
};
} // namespace ZShell::config