diff --git a/ui/app/AppLayouts/Chat/popups/PinnedMessagesPopup.qml b/ui/app/AppLayouts/Chat/popups/PinnedMessagesPopup.qml index de568a8f9d..addcd98eb3 100644 --- a/ui/app/AppLayouts/Chat/popups/PinnedMessagesPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/PinnedMessagesPopup.qml @@ -5,7 +5,6 @@ import utils 1.0 import "../../../../shared" import "../../../../shared/popups" import "../../../../shared/panels" -import "../../../../shared/status" import "../controls" import "../panels" @@ -203,7 +202,7 @@ ModalPopup { onClicked: radio.toggle() } - StatusRadioButton { + StatusQControls.StatusRadioButton { id: radio visible: !!messageToPin anchors.right: parent.right @@ -232,7 +231,7 @@ ModalPopup { enabled: !!messageToUnpin //% "Unpin" text: qsTrId("unpin") - type: StatusBaseButton.Type.Danger + type: StatusQControls.StatusBaseButton.Type.Danger anchors.right: parent.right onClicked: { const chatId = chatsModel.channelView.activeChannel.id diff --git a/ui/app/AppLayouts/Onboarding/controls/AccountViewDelegate.qml b/ui/app/AppLayouts/Onboarding/controls/AccountViewDelegate.qml index c52a4f8828..48167da693 100644 --- a/ui/app/AppLayouts/Onboarding/controls/AccountViewDelegate.qml +++ b/ui/app/AppLayouts/Onboarding/controls/AccountViewDelegate.qml @@ -7,6 +7,8 @@ import "../../../../shared" import "../../../../shared/panels" import "../../../../shared/status" +import StatusQ.Controls 0.1 as StatusQControls + Rectangle { id: accountViewDelegate @@ -67,13 +69,12 @@ Rectangle { color: Style.current.secondaryText } - StatusRadioButton { + StatusQControls.StatusRadioButton { id: radio anchors.right: parent.right anchors.rightMargin: Style.current.padding anchors.verticalCenter: parent.verticalCenter checked: accountViewDelegate.selected - isHovered: accountViewDelegate.isHovered } MouseArea { diff --git a/ui/app/AppLayouts/Profile/controls/BloomSelectorButton.qml b/ui/app/AppLayouts/Profile/controls/BloomSelectorButton.qml index 41b5a87ac5..13ea63e4fe 100644 --- a/ui/app/AppLayouts/Profile/controls/BloomSelectorButton.qml +++ b/ui/app/AppLayouts/Profile/controls/BloomSelectorButton.qml @@ -5,8 +5,8 @@ import QtQuick.Layouts 1.13 import utils 1.0 import "../../../../shared" import "../../../../shared/panels" -import "../../../../shared/status" +import StatusQ.Controls 0.1 Rectangle { property var buttonGroup diff --git a/ui/app/AppLayouts/Profile/panels/NotificationAppearancePreviewPanel.qml b/ui/app/AppLayouts/Profile/panels/NotificationAppearancePreviewPanel.qml index 142ff3a8a2..a0c31b3ff5 100644 --- a/ui/app/AppLayouts/Profile/panels/NotificationAppearancePreviewPanel.qml +++ b/ui/app/AppLayouts/Profile/panels/NotificationAppearancePreviewPanel.qml @@ -4,7 +4,8 @@ import "./" import utils 1.0 import "../../../../shared" -import "../../../../shared/status" + +import StatusQ.Controls 0.1 Item { property bool checked: false diff --git a/ui/app/AppLayouts/Wallet/panels/SetCurrencyModalContent.qml b/ui/app/AppLayouts/Wallet/panels/SetCurrencyModalContent.qml index 030a59f964..929cbd1fad 100644 --- a/ui/app/AppLayouts/Wallet/panels/SetCurrencyModalContent.qml +++ b/ui/app/AppLayouts/Wallet/panels/SetCurrencyModalContent.qml @@ -5,7 +5,8 @@ import utils 1.0 import "../../../../shared" import "../../../../shared/panels" -import "../../../../shared/status" + +import StatusQ.Controls 0.1 as StatusQControls Item { id: modalBody @@ -58,10 +59,9 @@ Item { anchors.leftMargin: Style.current.padding } - StatusRadioButton { + StatusQControls.StatusRadioButton { id: currencyRadioBtn checked: currency === key - isHovered: wrapper.hovered anchors.right: parent.right anchors.rightMargin: Style.current.padding anchors.verticalCenter: parent.verticalCenter diff --git a/ui/shared/controls/GasSelectorButton.qml b/ui/shared/controls/GasSelectorButton.qml index 61b04e5192..2227c7fa5d 100644 --- a/ui/shared/controls/GasSelectorButton.qml +++ b/ui/shared/controls/GasSelectorButton.qml @@ -3,10 +3,12 @@ import QtQuick.Controls 2.13 import QtQuick.Layouts 1.13 import utils 1.0 -import "../status" + import "../" import "../panels" +import StatusQ.Controls 0.1 + // TODO: use StatusQ components Rectangle { property var buttonGroup diff --git a/ui/shared/status/StatusImageRadioButton.qml b/ui/shared/status/StatusImageRadioButton.qml index 4ac5791545..5b4db38b22 100644 --- a/ui/shared/status/StatusImageRadioButton.qml +++ b/ui/shared/status/StatusImageRadioButton.qml @@ -7,6 +7,8 @@ import "../../shared" import "../../shared/panels" import "./" +import StatusQ.Controls 0.1 as StatusQControls + Rectangle { id: root @@ -33,7 +35,7 @@ Rectangle { anchors.rightMargin: root.padding } - StatusRadioButton { + StatusQControls.StatusRadioButton { id: radioControl anchors.top: img.bottom anchors.topMargin: root.padding diff --git a/ui/shared/status/StatusRadioButton.qml b/ui/shared/status/StatusRadioButton.qml deleted file mode 100644 index 26e634d4d5..0000000000 --- a/ui/shared/status/StatusRadioButton.qml +++ /dev/null @@ -1,50 +0,0 @@ -import QtQuick 2.13 -import QtQuick.Controls 2.13 -import QtQml 2.14 - -import utils 1.0 -import "../../shared" -import "../../shared/panels" - -RadioButton { - id: control - property bool isHovered: false - width: indicator.implicitWidth - - function getColor() { - if (checked) { - return Style.current.blue - } - if (hovered || isHovered) { - return Style.current.secondaryHover - } - return Style.current.grey - } - - indicator: Rectangle { - implicitWidth: 20 - implicitHeight: 20 - x: 0 - y: 6 - radius: 10 - color: control.getColor() - - Rectangle { - width: 12 - height: 12 - radius: 6 - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - color: control.checked ? Style.current.white : Style.current.grey - visible: control.checked - } - } - contentItem: StyledText { - text: control.text - color: Style.current.textColor - verticalAlignment: Text.AlignVCenter - leftPadding: !!control.text ? control.indicator.width + control.spacing : control.indicator.width - font.pixelSize: 15 - font.family: Style.current.fontRegular.name - } -} diff --git a/ui/shared/status/StatusRadioButtonRow.qml b/ui/shared/status/StatusRadioButtonRow.qml index fe04361678..eff74d0046 100644 --- a/ui/shared/status/StatusRadioButtonRow.qml +++ b/ui/shared/status/StatusRadioButtonRow.qml @@ -6,6 +6,8 @@ import ".." import "../panels" import "." +import StatusQ.Controls 0.1 + Rectangle { property alias text: textElement.text property var buttonGroup diff --git a/ui/shared/status/qmldir b/ui/shared/status/qmldir index ac42335caf..df5ce8bade 100644 --- a/ui/shared/status/qmldir +++ b/ui/shared/status/qmldir @@ -8,7 +8,6 @@ StatusEmojiSection 1.0 StatusEmojiSection.qml StatusGifPopup 1.0 StatusGifPopup.qml StatusGifColumn 1.0 StatusGifColumn.qml StatusImageIdenticon 1.0 StatusImageIdenticon.qml -StatusRadioButton 1.0 StatusRadioButton.qml StatusRoundButton 1.0 StatusRoundButton.qml StatusSectionHeadline 1.0 StatusSectionHeadline.qml StatusSlider 1.0 StatusSlider.qml