From ab0c8b8170b96a580650e82b9a7e804b864f2f94 Mon Sep 17 00:00:00 2001 From: James Graham Date: Sun, 21 Apr 2024 18:25:39 +0200 Subject: [PATCH] Use new cornerRadius Kirigami unit across the app --- src/qml/EmojiDelegate.qml | 4 ++-- src/qml/EmojiDialog.qml | 2 +- src/qml/EmojiTonesPicker.qml | 2 +- src/qml/TypingPane.qml | 2 +- src/settings/AppearanceSettingsPage.qml | 4 ++-- src/settings/Permissions.qml | 2 +- src/settings/ThemeRadioButton.qml | 2 +- src/timeline/Bubble.qml | 2 +- src/timeline/CodeComponent.qml | 2 +- src/timeline/HiddenDelegate.qml | 2 +- src/timeline/ItineraryReservationComponent.qml | 2 +- src/timeline/MessageDelegate.qml | 2 +- src/timeline/QuoteComponent.qml | 2 +- src/timeline/ReadMarkerDelegate.qml | 2 +- src/timeline/VideoComponent.qml | 6 +++--- 15 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/qml/EmojiDelegate.qml b/src/qml/EmojiDelegate.qml index 610e24f6e..a3dc0e6d2 100644 --- a/src/qml/EmojiDelegate.qml +++ b/src/qml/EmojiDelegate.qml @@ -48,10 +48,10 @@ QQC2.ItemDelegate { background: Rectangle { color: root.checked ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor - radius: Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius Rectangle { - radius: Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius anchors.fill: parent color: Kirigami.Theme.highlightColor opacity: root.hovered && !root.pressed ? 0.2 : 0 diff --git a/src/qml/EmojiDialog.qml b/src/qml/EmojiDialog.qml index 4d074ff09..bb0cf2dd5 100644 --- a/src/qml/EmojiDialog.qml +++ b/src/qml/EmojiDialog.qml @@ -40,7 +40,7 @@ QQC2.Popup { background: Kirigami.ShadowedRectangle { Kirigami.Theme.colorSet: Kirigami.Theme.View color: Kirigami.Theme.backgroundColor - radius: Kirigami.Units.mediumSpacing + radius: Kirigami.Units.cornerRadius shadow { size: Kirigami.Units.largeSpacing color: Qt.rgba(0.0, 0.0, 0.0, 0.3) diff --git a/src/qml/EmojiTonesPicker.qml b/src/qml/EmojiTonesPicker.qml index b7114a27d..73784cea9 100644 --- a/src/qml/EmojiTonesPicker.qml +++ b/src/qml/EmojiTonesPicker.qml @@ -30,7 +30,7 @@ QQC2.Popup { onOpened: x = Math.min(parent.mapFromGlobal(QQC2.Overlay.overlay.width - root.width, 0).x, -(width - parent.width) / 2) background: Kirigami.ShadowedRectangle { color: Kirigami.Theme.backgroundColor - radius: Kirigami.Units.mediumSpacing + radius: Kirigami.Units.cornerRadius shadow { size: Kirigami.Units.largeSpacing color: Qt.rgba(0.0, 0.0, 0.0, 0.3) diff --git a/src/qml/TypingPane.qml b/src/qml/TypingPane.qml index e94bec3f3..0633de9cf 100644 --- a/src/qml/TypingPane.qml +++ b/src/qml/TypingPane.qml @@ -113,7 +113,7 @@ Loader { rightInset: mirrored ? 0 : -background.radius bottomInset: -background.radius background: Rectangle { - radius: 3 + radius: Kirigami.Units.cornerRadius color: Kirigami.Theme.backgroundColor border.color: Kirigami.ColorUtils.tintWithAlpha(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, 0.2) border.width: 1 diff --git a/src/settings/AppearanceSettingsPage.qml b/src/settings/AppearanceSettingsPage.qml index 646c88353..a30c905a2 100644 --- a/src/settings/AppearanceSettingsPage.qml +++ b/src/settings/AppearanceSettingsPage.qml @@ -65,7 +65,7 @@ FormCard.FormCardPage { } background: Kirigami.ShadowedRectangle { color: Kirigami.Theme.backgroundColor - radius: Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius shadow.size: Kirigami.Units.smallSpacing shadow.color: Qt.rgba(0.0, 0.0, 0.0, 0.10) border.color: Kirigami.ColorUtils.tintWithAlpha(color, Kirigami.Theme.textColor, 0.15) @@ -102,7 +102,7 @@ FormCard.FormCardPage { } background: Kirigami.ShadowedRectangle { color: Kirigami.Theme.backgroundColor - radius: Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius shadow.size: Kirigami.Units.smallSpacing shadow.color: Qt.rgba(0.0, 0.0, 0.0, 0.10) border.color: Kirigami.ColorUtils.tintWithAlpha(color, Kirigami.Theme.textColor, 0.15) diff --git a/src/settings/Permissions.qml b/src/settings/Permissions.qml index 3825150b7..356ccde61 100644 --- a/src/settings/Permissions.qml +++ b/src/settings/Permissions.qml @@ -136,7 +136,7 @@ FormCard.FormCardPage { Kirigami.Theme.colorSet: Kirigami.Theme.View Kirigami.Theme.inherit: false - radius: 4 + radius: Kirigami.Units.cornerRadius color: Kirigami.Theme.backgroundColor border { diff --git a/src/settings/ThemeRadioButton.qml b/src/settings/ThemeRadioButton.qml index 5d22a1671..2e273f475 100644 --- a/src/settings/ThemeRadioButton.qml +++ b/src/settings/ThemeRadioButton.qml @@ -21,7 +21,7 @@ QQC2.RadioButton { Kirigami.ShadowedRectangle { implicitWidth: implicitHeight * 1.6 implicitHeight: root.thin ? Kirigami.Units.gridUnit * 5 : Kirigami.Units.gridUnit * 6 - radius: Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius Kirigami.Theme.inherit: false Kirigami.Theme.colorSet: Kirigami.Theme.View diff --git a/src/timeline/Bubble.qml b/src/timeline/Bubble.qml index e8e092c78..4ac8ca668 100644 --- a/src/timeline/Bubble.qml +++ b/src/timeline/Bubble.qml @@ -182,7 +182,7 @@ QQC2.Control { } else { return Kirigami.Theme.backgroundColor; } - radius: Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius shadow { size: Kirigami.Units.smallSpacing color: root.showHighlight ? Qt.rgba(0.0, 0.0, 0.0, 0.10) : Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.10) diff --git a/src/timeline/CodeComponent.qml b/src/timeline/CodeComponent.qml index e8f962206..80f95a96a 100644 --- a/src/timeline/CodeComponent.qml +++ b/src/timeline/CodeComponent.qml @@ -190,7 +190,7 @@ QQC2.Control { color: Kirigami.Theme.backgroundColor Kirigami.Theme.colorSet: Kirigami.Theme.View Kirigami.Theme.inherit: false - radius: Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius border { width: 1 color: Kirigami.Theme.highlightColor diff --git a/src/timeline/HiddenDelegate.qml b/src/timeline/HiddenDelegate.qml index 6eebca8c8..65ca93595 100644 --- a/src/timeline/HiddenDelegate.qml +++ b/src/timeline/HiddenDelegate.qml @@ -79,7 +79,7 @@ TimelineDelegate { background: Rectangle { color: Kirigami.Theme.backgroundColor - radius: Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius border { width: contentControl.hovered ? 1 : 0 color: Kirigami.Theme.highlightColor diff --git a/src/timeline/ItineraryReservationComponent.qml b/src/timeline/ItineraryReservationComponent.qml index 50d00a33b..c93ae5fb6 100644 --- a/src/timeline/ItineraryReservationComponent.qml +++ b/src/timeline/ItineraryReservationComponent.qml @@ -26,7 +26,7 @@ FormCard.FormCard { Layout.fillWidth: true implicitWidth: Math.max(headerDelegate.implicitWidth, content.implicitWidth) - Component.onCompleted: children[0].radius = Kirigami.Units.smallSpacing + Component.onCompleted: children[0].radius = Kirigami.Units.cornerRadius FormCard.AbstractFormDelegate { id: headerDelegate diff --git a/src/timeline/MessageDelegate.qml b/src/timeline/MessageDelegate.qml index 3319f1c95..4fd7a8492 100644 --- a/src/timeline/MessageDelegate.qml +++ b/src/timeline/MessageDelegate.qml @@ -349,7 +349,7 @@ TimelineDelegate { background: Rectangle { visible: mainContainer.hovered && (Config.compactLayout || root.alwaysMaxWidth) color: Kirigami.ColorUtils.tintWithAlpha(Kirigami.Theme.backgroundColor, Kirigami.Theme.highlightColor, 0.15) - radius: Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius } TapHandler { diff --git a/src/timeline/QuoteComponent.qml b/src/timeline/QuoteComponent.qml index 342ea18c1..1640e3f79 100644 --- a/src/timeline/QuoteComponent.qml +++ b/src/timeline/QuoteComponent.qml @@ -62,6 +62,6 @@ QQC2.Control { background: Rectangle { color: Kirigami.Theme.backgroundColor - radius: Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius } } diff --git a/src/timeline/ReadMarkerDelegate.qml b/src/timeline/ReadMarkerDelegate.qml index c3c29c008..2be95247c 100644 --- a/src/timeline/ReadMarkerDelegate.qml +++ b/src/timeline/ReadMarkerDelegate.qml @@ -44,7 +44,7 @@ TimelineDelegate { Kirigami.Theme.inherit: false Kirigami.Theme.colorSet: Kirigami.Theme.View opacity: root.isTemporaryHighlighted ? 1 : 0.6 - radius: Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius shadow.size: Kirigami.Units.smallSpacing shadow.color: Qt.rgba(0.0, 0.0, 0.0, 0.10) border.color: Kirigami.ColorUtils.tintWithAlpha(color, Kirigami.Theme.textColor, 0.15) diff --git a/src/timeline/VideoComponent.qml b/src/timeline/VideoComponent.qml index ac41958f8..f012bda99 100644 --- a/src/timeline/VideoComponent.qml +++ b/src/timeline/VideoComponent.qml @@ -186,7 +186,7 @@ Video { visible: false color: Kirigami.Theme.backgroundColor - radius: Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius QQC2.ProgressBar { anchors.centerIn: parent @@ -296,7 +296,7 @@ Video { } } background: Kirigami.ShadowedRectangle { - radius: 4 + radius: Kirigami.Units.cornerRadius color: Kirigami.Theme.backgroundColor opacity: 0.8 @@ -332,7 +332,7 @@ Video { } } background: Kirigami.ShadowedRectangle { - radius: 4 + radius: Kirigami.Units.cornerRadius color: Kirigami.Theme.backgroundColor opacity: 0.8