fix(StatusBaseButton): font family and weight fixed (#908)

This commit is contained in:
Michał 2022-09-19 22:08:49 +02:00 committed by Michał Cieślak
parent b068deccd4
commit 8df06ef463
2 changed files with 78 additions and 71 deletions

View File

@ -42,6 +42,7 @@ Button {
readonly property color textColor: root.enabled || root.loading ? root.textColor : root.disabledTextColor readonly property color textColor: root.enabled || root.loading ? root.textColor : root.disabledTextColor
} }
font.family: Theme.palette.baseFont.name
font.weight: Font.Medium font.weight: Font.Medium
font.pixelSize: size === StatusBaseButton.Size.Large ? 15 : 13 font.pixelSize: size === StatusBaseButton.Size.Large ? 15 : 13

View File

@ -1,7 +1,6 @@
import QtQuick 2.13 import QtQuick 2.13
QtObject { QtObject {
id: theme id: theme
property string name property string name
@ -10,88 +9,95 @@ QtObject {
source: "../../../assets/fonts/Inter/Inter-Regular.otf" source: "../../../assets/fonts/Inter/Inter-Regular.otf"
} }
property var baseFontThin: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Thin.otf"
}
property var baseFontExtraLight: FontLoader {
source: "../../../assets/fonts/Inter/Inter-ExtraLight.otf"
}
property var baseFontLight: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Light.otf"
}
property var baseFontMedium: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Medium.otf"
}
property var baseFontBold: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Bold.otf"
}
property var baseFontExtraBold: FontLoader {
source: "../../../assets/fonts/Inter/Inter-ExtraBold.otf"
}
property var baseFontBlack: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Black.otf"
}
property var monoFont: FontLoader { property var monoFont: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Regular.otf" source: "../../../assets/fonts/InterStatus/InterStatus-Regular.otf"
} }
property var monoFontThin: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Thin.otf"
}
property var monoFontExtraLight: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-ExtraLight.otf"
}
property var monoFontLight: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Light.otf"
}
property var monoFontMedium: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Medium.otf"
}
property var monoFontBold: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Bold.otf"
}
property var monoFontExtraBold: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-ExtraBold.otf"
}
property var monoFontBlack: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Black.otf"
}
property var codeFont: FontLoader { property var codeFont: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Regular.ttf" source: "../../../assets/fonts/RobotoMono/RobotoMono-Regular.ttf"
} }
property var codeFontThin: FontLoader { readonly property QtObject _d: QtObject {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Thin.ttf" // specific font variants should not be accessed directly
}
property var codeFontExtraLight: FontLoader { // Inter font variants
source: "../../../assets/fonts/RobotoMono/RobotoMono-ExtraLight.ttf" property var baseFontThin: FontLoader {
} source: "../../../assets/fonts/Inter/Inter-Thin.otf"
}
property var codeFontLight: FontLoader { property var baseFontExtraLight: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Light.ttf" source: "../../../assets/fonts/Inter/Inter-ExtraLight.otf"
} }
property var codeFontMedium: FontLoader { property var baseFontLight: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Medium.ttf" source: "../../../assets/fonts/Inter/Inter-Light.otf"
} }
property var codeFontBold: FontLoader { property var baseFontMedium: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Bold.ttf" source: "../../../assets/fonts/Inter/Inter-Medium.otf"
}
property var baseFontBold: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Bold.otf"
}
property var baseFontExtraBold: FontLoader {
source: "../../../assets/fonts/Inter/Inter-ExtraBold.otf"
}
property var baseFontBlack: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Black.otf"
}
// Inter Status font variants
property var monoFontThin: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Thin.otf"
}
property var monoFontExtraLight: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-ExtraLight.otf"
}
property var monoFontLight: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Light.otf"
}
property var monoFontMedium: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Medium.otf"
}
property var monoFontBold: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Bold.otf"
}
property var monoFontExtraBold: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-ExtraBold.otf"
}
property var monoFontBlack: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Black.otf"
}
// Roboto font variants
property var codeFontThin: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Thin.ttf"
}
property var codeFontExtraLight: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-ExtraLight.ttf"
}
property var codeFontLight: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Light.ttf"
}
property var codeFontMedium: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Medium.ttf"
}
property var codeFontBold: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Bold.ttf"
}
} }
property color black: getColor('black') property color black: getColor('black')