From fe38395b37486b9a239d898d4a2565c6e5329625 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sun, 13 Oct 2024 02:19:24 +0200 Subject: [PATCH] remove rounded shapes --- resources/qml/Avatar.qml | 10 +++++----- resources/qml/MessageInputWarning.qml | 2 +- resources/qml/MessageView.qml | 6 +++--- resources/qml/Reactions.qml | 2 +- resources/qml/SelfVerificationCheck.qml | 4 ++-- resources/qml/TimelineBubbleMessageStyle.qml | 2 +- resources/qml/TimelineDefaultMessageStyle.qml | 2 +- resources/qml/TimelineSectionHeader.qml | 2 +- resources/qml/ToggleButton.qml | 4 ++-- resources/qml/UploadBox.qml | 2 +- resources/qml/components/FlatButton.qml | 2 +- resources/qml/components/MainWindowDialog.qml | 2 +- resources/qml/components/NhekoTabButton.qml | 2 +- resources/qml/components/NotificationBubble.qml | 2 +- resources/qml/components/ReorderableListview.qml | 2 +- resources/qml/delegates/Encrypted.qml | 2 +- resources/qml/delegates/EncryptionEnabled.qml | 2 +- resources/qml/delegates/FileMessage.qml | 4 ++-- resources/qml/delegates/Pill.qml | 2 +- resources/qml/delegates/Redacted.qml | 2 +- resources/qml/dialogs/ImagePackSettingsDialog.qml | 2 +- resources/qml/dialogs/InviteDialog.qml | 2 +- resources/qml/emoji/StickerPicker.qml | 2 +- resources/qml/ui/NhekoSlider.qml | 6 +++--- resources/qml/ui/Snackbar.qml | 2 +- resources/qml/voip/CallInvite.qml | 4 ++-- 26 files changed, 38 insertions(+), 38 deletions(-) diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml index ef66e05a..a522a33b 100644 --- a/resources/qml/Avatar.qml +++ b/resources/qml/Avatar.qml @@ -26,7 +26,7 @@ AbstractButton { id: bg color: palette.dark - radius: Settings.avatarCircles ? height / 2 : height / 8 + radius: Settings.avatarCircles ? height / 2 : 0 } Label { @@ -46,7 +46,7 @@ AbstractButton { id: identicon anchors.fill: parent - source: Settings.useIdenticon ? ("image://jdenticon/" + (avatar.userid !== "" ? avatar.userid : avatar.roomid) + "?radius=" + (Settings.avatarCircles ? 100 : 25)) : "" + source: Settings.useIdenticon ? ("image://jdenticon/" + (avatar.userid !== "" ? avatar.userid : avatar.roomid) + "?radius=" + (Settings.avatarCircles ? 100 : 0)) : "" visible: Settings.useIdenticon && img.status != Image.Ready } Image { @@ -56,9 +56,9 @@ AbstractButton { asynchronous: true fillMode: avatar.crop ? Image.PreserveAspectCrop : Image.PreserveAspectFit source: if (avatar.url.startsWith('image://colorimage')) { - return avatar.url + "&radius=" + (Settings.avatarCircles ? 100 : 25) + ((avatar.crop) ? "" : "&scale"); + return avatar.url + "&radius=" + (Settings.avatarCircles ? 100 : 0) + ((avatar.crop) ? "" : "&scale"); } else if (avatar.url.startsWith('image://')) { - return avatar.url + "?radius=" + (Settings.avatarCircles ? 100 : 25) + ((avatar.crop) ? "" : "&scale"); + return avatar.url + "?radius=" + (Settings.avatarCircles ? 100 : 0) + ((avatar.crop) ? "" : "&scale"); } else if (avatar.url.startsWith(':/')) { return "image://colorimage/" + avatar.url + "?" + label.color; } else { @@ -95,7 +95,7 @@ AbstractButton { anchors.right: avatar.right color: updatePresence() height: avatar.height / 6 - radius: Settings.avatarCircles ? height / 2 : height / 8 + radius: Settings.avatarCircles ? height / 2 : 0 visible: !!avatar.userid width: height diff --git a/resources/qml/MessageInputWarning.qml b/resources/qml/MessageInputWarning.qml index 82658f58..c1a06083 100644 --- a/resources/qml/MessageInputWarning.qml +++ b/resources/qml/MessageInputWarning.qml @@ -30,7 +30,7 @@ Rectangle { border.width: 1 // TODO: Qt.alpha() would make more sense but it wasn't working... color: Qt.rgba(bubbleColor.r, bubbleColor.g, bubbleColor.b, 0.3) - radius: 3 + radius: 0 visible: warningRoot.visible z: 3 diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml index 74f71bba..7999ce23 100644 --- a/resources/qml/MessageView.qml +++ b/resources/qml/MessageView.qml @@ -169,7 +169,7 @@ Item { border.color: palette.buttonText border.width: 1 color: palette.window - radius: padding + radius: 0 } contentItem: RowLayout { id: row @@ -637,7 +637,7 @@ Item { flat: true height: width hoverEnabled: true - radius: width / 2 + radius: 0 width: 0 background: Rectangle { @@ -645,7 +645,7 @@ Item { border.width: 1 color: toEndButton.down ? palette.highlight : palette.button opacity: enabled ? 1 : 0.3 - radius: toEndButton.radius + radius: 0 } states: [ State { diff --git a/resources/qml/Reactions.qml b/resources/qml/Reactions.qml index 5b994145..f5a34af7 100644 --- a/resources/qml/Reactions.qml +++ b/resources/qml/Reactions.qml @@ -39,7 +39,7 @@ Flow { color: reaction.hovered ? palette.highlight : (modelData.selfReactedEvent !== '' ? gentleHighlight : palette.window) implicitHeight: reaction.implicitHeight implicitWidth: reaction.implicitWidth - radius: reaction.height / 2 + radius: 0 } contentItem: Row { spacing: textMetrics.height / 4 diff --git a/resources/qml/SelfVerificationCheck.qml b/resources/qml/SelfVerificationCheck.qml index 42617f07..9b7a78f1 100644 --- a/resources/qml/SelfVerificationCheck.qml +++ b/resources/qml/SelfVerificationCheck.qml @@ -34,7 +34,7 @@ Item { border.color: Nheko.theme.separator border.width: 1 color: palette.window - radius: Nheko.paddingSmall + radius: 0 } ColumnLayout { @@ -88,7 +88,7 @@ Item { border.color: Nheko.theme.separator border.width: 1 color: palette.window - radius: Nheko.paddingSmall + radius: 0 } onAccepted: SelfVerificationStatus.setupCrosssigning(storeSecretsOnline.checked, usePassword.checked ? passwordField.text : "", useOnlineKeyBackup.checked) diff --git a/resources/qml/TimelineBubbleMessageStyle.qml b/resources/qml/TimelineBubbleMessageStyle.qml index dd197264..665866bb 100644 --- a/resources/qml/TimelineBubbleMessageStyle.qml +++ b/resources/qml/TimelineBubbleMessageStyle.qml @@ -289,7 +289,7 @@ TimelineEvent { padding: wrapper.isStateEvent ? 0 : 4 background: Rectangle { color: !wrapper.isStateEvent ? Qt.tint(palette.base, Qt.hsla(messageBubble.userColor.hslHue, wrapper.hovered ? 0.8 : 0.5, messageBubble.userColor.hslLightness, 0.2)) : "transparent" - radius: 4 + radius: 0 border.color: Nheko.theme.red border.width: wrapper.notificationlevel == MtxEvent.Highlight ? 1 : 0 } diff --git a/resources/qml/TimelineDefaultMessageStyle.qml b/resources/qml/TimelineDefaultMessageStyle.qml index 16db9964..4e7aa24b 100644 --- a/resources/qml/TimelineDefaultMessageStyle.qml +++ b/resources/qml/TimelineDefaultMessageStyle.qml @@ -294,7 +294,7 @@ TimelineEvent { color: "transparent" border.color: Nheko.theme.red border.width: wrapper.notificationlevel == MtxEvent.Highlight ? 1 : 0 - radius: 4 + radius: 0 height: contentColumn.implicitHeight + 4 width: contentColumn.implicitWidth + 4 + (wrapper.threadId ? (4 + gridContainer.spacing) : 0) }, diff --git a/resources/qml/TimelineSectionHeader.qml b/resources/qml/TimelineSectionHeader.qml index 7cfb4ab9..b5abe444 100644 --- a/resources/qml/TimelineSectionHeader.qml +++ b/resources/qml/TimelineSectionHeader.qml @@ -43,7 +43,7 @@ Column { background: Rectangle { color: palette.window - radius: parent.height / 2 + radius: 0 } } Row { diff --git a/resources/qml/ToggleButton.qml b/resources/qml/ToggleButton.qml index 50ed5187..84a773fb 100644 --- a/resources/qml/ToggleButton.qml +++ b/resources/qml/ToggleButton.qml @@ -24,7 +24,7 @@ Switch { color: Qt.rgba(border.color.r, border.color.g, border.color.b, 0.6) height: parent.height * 0.6 - radius: height / 2 + radius: 0 width: parent.width - height x: radius y: parent.height / 2 - height / 2 @@ -35,7 +35,7 @@ Switch { border.color: "#767676" color: palette.button height: width - radius: width / 2 + radius: 0 width: parent.height * 0.9 y: parent.height / 2 - height / 2 } diff --git a/resources/qml/UploadBox.qml b/resources/qml/UploadBox.qml index 1d9415e5..5d86b821 100644 --- a/resources/qml/UploadBox.qml +++ b/resources/qml/UploadBox.qml @@ -42,7 +42,7 @@ Page { background: Rectangle { color: palette.window - radius: Nheko.paddingMedium + radius: 0 } contentItem: ColumnLayout { Image { diff --git a/resources/qml/components/FlatButton.qml b/resources/qml/components/FlatButton.qml index 190f3af1..fe17697a 100644 --- a/resources/qml/components/FlatButton.qml +++ b/resources/qml/components/FlatButton.qml @@ -47,7 +47,7 @@ Button { background: Rectangle { //height: control.contentItem.implicitHeight * 2 //width: control.contentItem.implicitWidth * 2 - radius: height / 8 + radius: 0 color: Qt.lighter(palette.dark, control.down ? 1.4 : (control.hovered ? 1.2 : 1)) } diff --git a/resources/qml/components/MainWindowDialog.qml b/resources/qml/components/MainWindowDialog.qml index 3372d429..d6c259e9 100644 --- a/resources/qml/components/MainWindowDialog.qml +++ b/resources/qml/components/MainWindowDialog.qml @@ -33,7 +33,7 @@ Dialog { color: palette.window border.color: Nheko.theme.separator border.width: 1 - radius: Nheko.paddingSmall + radius: 0 } } diff --git a/resources/qml/components/NhekoTabButton.qml b/resources/qml/components/NhekoTabButton.qml index 796177e8..dd453f32 100644 --- a/resources/qml/components/NhekoTabButton.qml +++ b/resources/qml/components/NhekoTabButton.qml @@ -23,7 +23,7 @@ TabButton { border.color: control.down ? palette.highlight : Nheko.theme.separator color: control.checked ? palette.highlight : palette.base border.width: 1 - radius: 2 + radius: 0 } } diff --git a/resources/qml/components/NotificationBubble.qml b/resources/qml/components/NotificationBubble.qml index d4838e92..1c83ed01 100644 --- a/resources/qml/components/NotificationBubble.qml +++ b/resources/qml/components/NotificationBubble.qml @@ -20,7 +20,7 @@ Rectangle { visible: mayBeVisible && notificationCount > 0 implicitHeight: notificationBubbleText.height + Nheko.paddingMedium implicitWidth: Math.max(notificationBubbleText.width, height) - radius: height / 2 + radius: 0 color: hasLoudNotification ? Nheko.theme.red : bubbleBackgroundColor ToolTip.text: notificationCount ToolTip.delay: Nheko.tooltipDelay diff --git a/resources/qml/components/ReorderableListview.qml b/resources/qml/components/ReorderableListview.qml index b5d5f5e5..cd7be352 100644 --- a/resources/qml/components/ReorderableListview.qml +++ b/resources/qml/components/ReorderableListview.qml @@ -50,7 +50,7 @@ Item { color: dragArea.held ? palette.highlight : palette.base Behavior on color { ColorAnimation { duration: 100 } } - radius: 2 + radius: 0 Drag.active: dragArea.held Drag.source: dragArea diff --git a/resources/qml/delegates/Encrypted.qml b/resources/qml/delegates/Encrypted.qml index 42a61918..27fc713b 100644 --- a/resources/qml/delegates/Encrypted.qml +++ b/resources/qml/delegates/Encrypted.qml @@ -73,7 +73,7 @@ Control { background: Rectangle { color: palette.alternateBase - radius: fontMetrics.lineSpacing / 2 + 2 * Nheko.paddingMedium + radius: 0 visible: !Settings.bubbles // the bubble in a bubble looks odd } } diff --git a/resources/qml/delegates/EncryptionEnabled.qml b/resources/qml/delegates/EncryptionEnabled.qml index bd172c24..230316e1 100644 --- a/resources/qml/delegates/EncryptionEnabled.qml +++ b/resources/qml/delegates/EncryptionEnabled.qml @@ -57,7 +57,7 @@ Control { } background: Rectangle { - radius: fontMetrics.lineSpacing / 2 + Nheko.paddingMedium + radius: 0 height: contents.implicitHeight + Nheko.paddingMedium * 2 color: palette.alternateBase border.color: Nheko.theme.green diff --git a/resources/qml/delegates/FileMessage.qml b/resources/qml/delegates/FileMessage.qml index 6087611b..ff38d4e0 100644 --- a/resources/qml/delegates/FileMessage.qml +++ b/resources/qml/delegates/FileMessage.qml @@ -31,7 +31,7 @@ Control { id: button color: palette.base - radius: 22 + radius: 0 Layout.preferredHeight: 36 Layout.preferredWidth: 36 @@ -91,7 +91,7 @@ Control { background: Rectangle { color: palette.base - radius: fontMetrics.lineSpacing / 2 + 2 * Nheko.paddingSmall + radius: 0 visible: !Settings.bubbles // the bubble in a bubble looks odd } diff --git a/resources/qml/delegates/Pill.qml b/resources/qml/delegates/Pill.qml index b551c3fb..c02e076d 100644 --- a/resources/qml/delegates/Pill.qml +++ b/resources/qml/delegates/Pill.qml @@ -13,7 +13,7 @@ Label { width: contentWidth * 1.2 background: Rectangle { - radius: parent.height / 2 + radius: 0 color: palette.base } diff --git a/resources/qml/delegates/Redacted.qml b/resources/qml/delegates/Redacted.qml index ea16214e..90acd76a 100644 --- a/resources/qml/delegates/Redacted.qml +++ b/resources/qml/delegates/Redacted.qml @@ -52,6 +52,6 @@ Control { background: Rectangle { color: palette.alternateBase - radius: fontMetrics.lineSpacing / 2 + 2 * Nheko.paddingSmall + radius: 0 } } diff --git a/resources/qml/dialogs/ImagePackSettingsDialog.qml b/resources/qml/dialogs/ImagePackSettingsDialog.qml index 69068405..bf6615fd 100644 --- a/resources/qml/dialogs/ImagePackSettingsDialog.qml +++ b/resources/qml/dialogs/ImagePackSettingsDialog.qml @@ -250,7 +250,7 @@ ApplicationWindow { background: Rectangle { anchors.fill: parent color: hovered ? palette.highlight : 'transparent' - radius: 5 + radius: 0 } } diff --git a/resources/qml/dialogs/InviteDialog.qml b/resources/qml/dialogs/InviteDialog.qml index 9fc165c7..9cc803d8 100644 --- a/resources/qml/dialogs/InviteDialog.qml +++ b/resources/qml/dialogs/InviteDialog.qml @@ -80,7 +80,7 @@ ApplicationWindow { border.color: palette.text color: inviteeButton.hovered ? palette.highlight : palette.window border.width: 1 - radius: inviteeButton.height / 2 + radius: 0 } } } diff --git a/resources/qml/emoji/StickerPicker.qml b/resources/qml/emoji/StickerPicker.qml index b7721db6..69395fd2 100644 --- a/resources/qml/emoji/StickerPicker.qml +++ b/resources/qml/emoji/StickerPicker.qml @@ -202,7 +202,7 @@ Menu { background: Rectangle { anchors.fill: parent color: hovered ? palette.highlight : 'transparent' - radius: 5 + radius: 0 } } diff --git a/resources/qml/ui/NhekoSlider.qml b/resources/qml/ui/NhekoSlider.qml index 5e3a77d8..3dbb8860 100644 --- a/resources/qml/ui/NhekoSlider.qml +++ b/resources/qml/ui/NhekoSlider.qml @@ -24,14 +24,14 @@ Slider { implicitHeight: control.sliderRadius / 4 width: control.availableWidth - handle.width height: implicitHeight - radius: height / 2 + radius: 0 color: palette.buttonText Rectangle { width: control.visualPosition * parent.width height: parent.height color: control.progressColor - radius: 2 + radius: 0 } } @@ -41,7 +41,7 @@ Slider { y: control.topPadding + control.availableHeight / 2 - height / 2 implicitWidth: control.sliderRadius implicitHeight: control.sliderRadius - radius: control.sliderRadius / 2 + radius: 0 color: control.progressColor visible: Settings.mobileMode || control.alwaysShowSlider || control.hovered || control.pressed border.color: control.progressColor diff --git a/resources/qml/ui/Snackbar.qml b/resources/qml/ui/Snackbar.qml index 3c526d8d..87e07f4a 100644 --- a/resources/qml/ui/Snackbar.qml +++ b/resources/qml/ui/Snackbar.qml @@ -55,7 +55,7 @@ Popup { } background: Rectangle { - radius: Nheko.paddingLarge + radius: 0 color: palette.dark opacity: 0.8 } diff --git a/resources/qml/voip/CallInvite.qml b/resources/qml/voip/CallInvite.qml index 8a609c32..a17cc582 100644 --- a/resources/qml/voip/CallInvite.qml +++ b/resources/qml/voip/CallInvite.qml @@ -156,7 +156,7 @@ Popup { } background: Rectangle { - radius: buttonLayout.buttonSize / 2 + radius: 0 color: "#ff0000" } @@ -185,7 +185,7 @@ Popup { } background: Rectangle { - radius: buttonLayout.buttonSize / 2 + radius: 0 color: "#00ff00" }