feat: use M3 rounding tokens
This commit is contained in:
parent
03d2e98502
commit
53f88d2698
3 changed files with 37 additions and 8 deletions
|
|
@ -36,14 +36,30 @@ int AppearanceRounding::small() const {
|
|||
return m_tokens ? static_cast<int>(m_tokens->small() * m_scale) : 0;
|
||||
}
|
||||
|
||||
int AppearanceRounding::normal() const {
|
||||
return m_tokens ? static_cast<int>(m_tokens->normal() * m_scale) : 0;
|
||||
int AppearanceRounding::medium() const {
|
||||
return m_tokens ? static_cast<int>(m_tokens->medium() * m_scale) : 0;
|
||||
}
|
||||
|
||||
int AppearanceRounding::large() const {
|
||||
return m_tokens ? static_cast<int>(m_tokens->large() * m_scale) : 0;
|
||||
}
|
||||
|
||||
int AppearanceRounding::largeIncreased() const {
|
||||
return m_tokens ? static_cast<int>(m_tokens->largeIncreased() * m_scale) : 0;
|
||||
}
|
||||
|
||||
int AppearanceRounding::extraLarge() const {
|
||||
return m_tokens ? static_cast<int>(m_tokens->extraLarge() * m_scale) : 0;
|
||||
}
|
||||
|
||||
int AppearanceRounding::extraLargeIncreased() const {
|
||||
return m_tokens ? static_cast<int>(m_tokens->extraLargeIncreased() * m_scale) : 0;
|
||||
}
|
||||
|
||||
int AppearanceRounding::extraExtraLarge() const {
|
||||
return m_tokens ? static_cast<int>(m_tokens->extraExtraLarge() * m_scale) : 0;
|
||||
}
|
||||
|
||||
int AppearanceRounding::full() const {
|
||||
return m_tokens ? static_cast<int>(m_tokens->full() * m_scale) : 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,12 @@ class AppearanceRounding : public ConfigObject {
|
|||
|
||||
Q_PROPERTY(int extraSmall READ extraSmall NOTIFY valuesChanged)
|
||||
Q_PROPERTY(int small READ small NOTIFY valuesChanged)
|
||||
Q_PROPERTY(int normal READ normal 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)
|
||||
Q_PROPERTY(int full READ full NOTIFY valuesChanged)
|
||||
|
||||
public:
|
||||
|
|
@ -33,8 +37,12 @@ public:
|
|||
|
||||
[[nodiscard]] int extraSmall() const;
|
||||
[[nodiscard]] int small() const;
|
||||
[[nodiscard]] int normal() 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:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "rootconfig.hpp"
|
||||
|
||||
#include <limits>
|
||||
#include <qlist.h>
|
||||
#include <qqmlengine.h>
|
||||
|
||||
|
|
@ -46,10 +47,14 @@ class RoundingTokens : public ConfigObject {
|
|||
QML_ANONYMOUS
|
||||
|
||||
CONFIG_PROPERTY(int, extraSmall, 4)
|
||||
CONFIG_PROPERTY(int, small, 12)
|
||||
CONFIG_PROPERTY(int, normal, 17)
|
||||
CONFIG_PROPERTY(int, large, 25)
|
||||
CONFIG_PROPERTY(int, full, 1000)
|
||||
CONFIG_PROPERTY(int, small, 8)
|
||||
CONFIG_PROPERTY(int, medium, 12)
|
||||
CONFIG_PROPERTY(int, large, 16)
|
||||
CONFIG_PROPERTY(int, largeIncreased, 20)
|
||||
CONFIG_PROPERTY(int, extraLarge, 28)
|
||||
CONFIG_PROPERTY(int, extraLargeIncreased, 32)
|
||||
CONFIG_PROPERTY(int, extraExtraLarge, 48)
|
||||
CONFIG_PROPERTY(int, full, std::numeric_limits<int>::max())
|
||||
|
||||
public:
|
||||
explicit RoundingTokens(QObject* parent = nullptr)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue