2022-10-21 15:37:39 +02:00
|
|
|
import QtQuick 2.14
|
2020-07-02 11:14:31 -04:00
|
|
|
|
|
|
|
QtObject {
|
2022-11-17 08:17:03 +02:00
|
|
|
|
|
|
|
enum FontSize {
|
|
|
|
FontSizeXS,
|
|
|
|
FontSizeS,
|
|
|
|
FontSizeM,
|
|
|
|
FontSizeL,
|
|
|
|
FontSizeXL,
|
|
|
|
FontSizeXXL
|
|
|
|
}
|
|
|
|
|
2022-09-15 17:23:51 +02:00
|
|
|
readonly property FontLoader baseFont: FontLoader { source: "../../fonts/Inter/Inter-Regular.otf" }
|
|
|
|
readonly property FontLoader monoFont: FontLoader { source: "../../fonts/InterStatus/InterStatus-Regular.otf" }
|
|
|
|
readonly property FontLoader codeFont: FontLoader { source: "../../fonts/RobotoMono/RobotoMono-Regular.ttf" }
|
2020-07-02 11:14:31 -04:00
|
|
|
|
2022-09-15 17:23:51 +02:00
|
|
|
readonly property QtObject _d: QtObject {
|
|
|
|
readonly property FontLoader baseFontMedium: FontLoader { source: "../../fonts/Inter/Inter-Medium.otf" }
|
|
|
|
readonly property FontLoader baseFontBold: FontLoader { source: "../../fonts/Inter/Inter-Bold.otf" }
|
|
|
|
readonly property FontLoader baseFontLight: FontLoader { source: "../../fonts/Inter/Inter-Light.otf" }
|
2020-07-02 11:14:31 -04:00
|
|
|
|
2022-09-15 17:23:51 +02:00
|
|
|
readonly property FontLoader monoFontMedium: FontLoader { source: "../../fonts/InterStatus/InterStatus-Medium.otf" }
|
|
|
|
readonly property FontLoader monoFontBold: FontLoader { source: "../../fonts/InterStatus/InterStatus-Bold.otf" }
|
|
|
|
readonly property FontLoader monoFontLight: FontLoader { source: "../../fonts/InterStatus/InterStatus-Light.otf" }
|
|
|
|
}
|
2021-08-24 17:14:19 +03:00
|
|
|
|
2021-03-16 15:19:48 -04:00
|
|
|
property string name
|
|
|
|
|
2020-07-02 11:14:31 -04:00
|
|
|
property color white
|
|
|
|
property color white2
|
|
|
|
property color black
|
2021-03-26 13:57:30 -04:00
|
|
|
property color grey1
|
2020-07-02 11:14:31 -04:00
|
|
|
property color lightBlue
|
|
|
|
property color blue
|
2021-03-26 13:57:30 -04:00
|
|
|
property color translucentBlue
|
2020-07-02 11:14:31 -04:00
|
|
|
property color transparent
|
|
|
|
property color darkGrey
|
2020-11-17 20:01:50 +01:00
|
|
|
property color darkerGrey
|
|
|
|
property color evenDarkerGrey
|
2020-07-02 11:14:31 -04:00
|
|
|
property color lightBlueText
|
|
|
|
property color darkBlue
|
|
|
|
property color darkBlueBtn
|
|
|
|
property color red
|
2020-08-17 16:46:13 -04:00
|
|
|
property color purple: "#887AF9"
|
|
|
|
property color orange: "#FE8F59"
|
2020-07-02 11:14:31 -04:00
|
|
|
|
2020-07-13 14:45:54 -04:00
|
|
|
property color background
|
2021-07-29 15:20:15 -04:00
|
|
|
property color dropShadow
|
2021-01-25 15:50:42 -05:00
|
|
|
property color backgroundHover
|
2021-02-18 14:07:23 -05:00
|
|
|
property color backgroundHoverLight
|
2020-07-13 14:45:54 -04:00
|
|
|
property color border
|
|
|
|
property color textColor
|
2021-05-05 14:23:43 -04:00
|
|
|
property color linkColor
|
2020-12-29 10:31:26 -05:00
|
|
|
property color secondaryText
|
2020-07-13 14:45:54 -04:00
|
|
|
property color currentUserTextColor
|
|
|
|
property color secondaryBackground
|
2021-03-26 13:57:30 -04:00
|
|
|
property color secondaryMenuBorder
|
|
|
|
property color menuBackgroundActive
|
|
|
|
property color menuBackgroundHover
|
2020-07-13 14:45:54 -04:00
|
|
|
property color modalBackground
|
2020-11-17 14:07:01 +11:00
|
|
|
property color codeBackground
|
2021-01-14 03:04:20 +04:00
|
|
|
property color primarySelectioncolor
|
2021-01-25 15:50:42 -05:00
|
|
|
property color emojiReactionBackground
|
|
|
|
property color emojiReactionBackgroundHovered
|
2021-02-02 11:54:29 -05:00
|
|
|
property color emojiReactionActiveBackgroundHovered
|
2021-02-01 13:40:55 -05:00
|
|
|
property color mentionColor
|
|
|
|
property color mentionBgColor
|
2021-05-07 09:40:23 +10:00
|
|
|
property color mentionBgHoverColor
|
2021-02-01 13:40:55 -05:00
|
|
|
property color mentionMessageColor
|
|
|
|
property color mentionMessageHoverColor
|
2021-03-26 13:57:30 -04:00
|
|
|
property color mainMenuBackground
|
|
|
|
property color secondaryMenuBackground
|
|
|
|
property color tabButtonBg
|
2020-07-13 14:45:54 -04:00
|
|
|
|
2020-08-25 11:00:03 +02:00
|
|
|
property color buttonForegroundColor
|
|
|
|
property color buttonBackgroundColor
|
2021-03-26 13:57:30 -04:00
|
|
|
property color buttonBackgroundColorHover
|
2020-09-28 10:21:40 -04:00
|
|
|
property color buttonSecondaryColor
|
2020-08-25 11:00:03 +02:00
|
|
|
property color buttonDisabledForegroundColor
|
|
|
|
property color buttonDisabledBackgroundColor
|
2021-01-14 00:26:30 +04:00
|
|
|
property color buttonWarnBackgroundColor
|
2020-08-25 11:00:03 +02:00
|
|
|
property color roundedButtonForegroundColor
|
|
|
|
property color roundedButtonBackgroundColor
|
2020-08-25 13:15:18 +02:00
|
|
|
property color roundedButtonSecondaryBackgroundColor
|
2021-01-19 16:26:34 +01:00
|
|
|
property color tooltipBackgroundColor
|
|
|
|
property color tooltipForegroundColor
|
2020-08-25 11:00:03 +02:00
|
|
|
|
2021-05-25 15:34:46 -04:00
|
|
|
property color pinnedMessageBorder
|
|
|
|
property color pinnedMessageBackground
|
|
|
|
property color pinnedMessageBackgroundHovered
|
|
|
|
property color pinnedRectangleBackground
|
|
|
|
|
2020-07-02 11:14:31 -04:00
|
|
|
property int xlPadding: 32
|
|
|
|
property int bigPadding: 24
|
|
|
|
property int padding: 16
|
2020-08-17 16:46:13 -04:00
|
|
|
property int halfPadding: 8
|
2020-07-02 11:14:31 -04:00
|
|
|
property int smallPadding: 10
|
|
|
|
property int radius: 8
|
|
|
|
|
2021-04-14 17:13:34 +02:00
|
|
|
property int leftTabPreferredSize: 304
|
2020-11-25 11:46:18 +01:00
|
|
|
|
2021-08-06 14:21:51 +02:00
|
|
|
property int additionalTextSize: 13
|
|
|
|
|
2020-11-25 11:46:18 +01:00
|
|
|
property int primaryTextFontSize: 15
|
|
|
|
property int secondaryTextFontSize: 14
|
|
|
|
property int tertiaryTextFontSize: 12
|
|
|
|
property int asideTextFontSize: 10
|
|
|
|
|
2021-03-16 15:19:48 -04:00
|
|
|
property var accountColors
|
|
|
|
|
2020-11-25 11:46:18 +01:00
|
|
|
function updateFontSize(fontSize) {
|
|
|
|
switch (fontSize) {
|
2022-11-17 08:17:03 +02:00
|
|
|
case Theme.FontSizeXS:
|
2020-11-25 11:46:18 +01:00
|
|
|
primaryTextFontSize = 13
|
|
|
|
secondaryTextFontSize = 12
|
|
|
|
tertiaryTextFontSize = 10
|
|
|
|
asideTextFontSize = 8
|
|
|
|
break;
|
|
|
|
|
2022-11-17 08:17:03 +02:00
|
|
|
case Theme.FontSizeS:
|
2020-11-25 11:46:18 +01:00
|
|
|
primaryTextFontSize = 14
|
|
|
|
secondaryTextFontSize = 13
|
|
|
|
tertiaryTextFontSize = 11
|
|
|
|
asideTextFontSize = 9
|
|
|
|
break;
|
|
|
|
|
2022-11-17 08:17:03 +02:00
|
|
|
case Theme.FontSizeM:
|
2020-11-25 11:46:18 +01:00
|
|
|
primaryTextFontSize = 15
|
|
|
|
secondaryTextFontSize = 14
|
|
|
|
tertiaryTextFontSize = 12
|
|
|
|
asideTextFontSize = 10
|
|
|
|
break;
|
|
|
|
|
2022-11-17 08:17:03 +02:00
|
|
|
case Theme.FontSizeL:
|
2020-11-25 11:46:18 +01:00
|
|
|
primaryTextFontSize = 16
|
|
|
|
secondaryTextFontSize = 15
|
|
|
|
tertiaryTextFontSize = 13
|
|
|
|
asideTextFontSize = 11
|
|
|
|
break;
|
|
|
|
|
2022-11-17 08:17:03 +02:00
|
|
|
case Theme.FontSizeXL:
|
2020-11-25 11:46:18 +01:00
|
|
|
primaryTextFontSize = 17
|
|
|
|
secondaryTextFontSize = 16
|
|
|
|
tertiaryTextFontSize = 14
|
|
|
|
asideTextFontSize = 12
|
|
|
|
break;
|
|
|
|
|
2022-11-17 08:17:03 +02:00
|
|
|
case Theme.FontSizeXXL:
|
2020-11-25 11:46:18 +01:00
|
|
|
primaryTextFontSize = 18
|
|
|
|
secondaryTextFontSize = 17
|
|
|
|
tertiaryTextFontSize = 15
|
|
|
|
asideTextFontSize = 13
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2020-07-02 11:14:31 -04:00
|
|
|
}
|