internal: fix some widgets not respecting rounding scale

This commit is contained in:
2 * r + 2 * t 2026-01-03 19:34:14 +11:00
parent 49b94e7b18
commit ee65883f97
5 changed files with 7 additions and 7 deletions

View file

@ -44,7 +44,7 @@ StyledRect {
onCheckedChanged: internalChecked = checked onCheckedChanged: internalChecked = checked
radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
color: type === IconButton.Text ? "transparent" : disabled ? disabledColour : internalChecked ? activeColour : inactiveColour color: type === IconButton.Text ? "transparent" : disabled ? disabledColour : internalChecked ? activeColour : inactiveColour
implicitWidth: implicitHeight implicitWidth: implicitHeight

View file

@ -36,7 +36,7 @@ StyledRect {
onCheckedChanged: internalChecked = checked onCheckedChanged: internalChecked = checked
radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
color: type === IconTextButton.Text ? "transparent" : internalChecked ? activeColour : inactiveColour color: type === IconTextButton.Text ? "transparent" : internalChecked ? activeColour : inactiveColour
implicitWidth: row.implicitWidth + horizontalPadding * 2 implicitWidth: row.implicitWidth + horizontalPadding * 2

View file

@ -36,7 +36,7 @@ Row {
spacing: Math.floor(Appearance.spacing.small / 2) spacing: Math.floor(Appearance.spacing.small / 2)
StyledRect { StyledRect {
radius: implicitHeight / 2 radius: implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
topRightRadius: Appearance.rounding.small / 2 topRightRadius: Appearance.rounding.small / 2
bottomRightRadius: Appearance.rounding.small / 2 bottomRightRadius: Appearance.rounding.small / 2
color: root.disabled ? root.disabledColour : root.colour color: root.disabled ? root.disabledColour : root.colour
@ -96,9 +96,9 @@ Row {
StyledRect { StyledRect {
id: expandBtn id: expandBtn
property real rad: root.expanded ? implicitHeight / 2 : Appearance.rounding.small / 2 property real rad: root.expanded ? implicitHeight / 2 * Math.min(1, Appearance.rounding.scale) : Appearance.rounding.small / 2
radius: implicitHeight / 2 radius: implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
topLeftRadius: rad topLeftRadius: rad
bottomLeftRadius: rad bottomLeftRadius: rad
color: root.disabled ? root.disabledColour : root.colour color: root.disabled ? root.disabledColour : root.colour

View file

@ -47,7 +47,7 @@ StyledRect {
onCheckedChanged: internalChecked = checked onCheckedChanged: internalChecked = checked
radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
color: type === TextButton.Text ? "transparent" : internalChecked ? activeColour : inactiveColour color: type === TextButton.Text ? "transparent" : internalChecked ? activeColour : inactiveColour
implicitWidth: label.implicitWidth + horizontalPadding * 2 implicitWidth: label.implicitWidth + horizontalPadding * 2

View file

@ -24,7 +24,7 @@ Singleton {
readonly property string sunset: cc ? Qt.formatDateTime(new Date(cc.sunset), Config.services.useTwelveHourClock ? "h:mm A" : "h:mm") : "--:--" readonly property string sunset: cc ? Qt.formatDateTime(new Date(cc.sunset), Config.services.useTwelveHourClock ? "h:mm A" : "h:mm") : "--:--"
function reload(): void { function reload(): void {
let configLocation = Config.services.weatherLocation; const configLocation = Config.services.weatherLocation;
if (configLocation && configLocation !== "") { if (configLocation && configLocation !== "") {
if (configLocation.indexOf(",") !== -1 && !isNaN(parseFloat(configLocation.split(",")[0]))) if (configLocation.indexOf(",") !== -1 && !isNaN(parseFloat(configLocation.split(",")[0])))