cleanup: remove legacy `StatusCheckbox`

This commit is contained in:
Pascal Precht 2021-10-25 16:33:41 +02:00 committed by Iuri Matias
parent 05e7701ae2
commit cbbbedcc79
6 changed files with 14 additions and 49 deletions

View File

@ -4,7 +4,8 @@ import QtQuick.Layouts 1.3
import Qt.labs.platform 1.1 import Qt.labs.platform 1.1
import utils 1.0 import utils 1.0
import "../../../../shared"
import StatusQ.Controls 0.1 as StatusQControls
import "../../../../shared/panels" import "../../../../shared/panels"
import "../../../../shared/status" import "../../../../shared/status"
@ -56,7 +57,7 @@ Rectangle {
anchors.leftMargin: Style.current.padding anchors.leftMargin: Style.current.padding
} }
StatusCheckBox { StatusQControls.StatusCheckBox {
id: assetCheck id: assetCheck
visible: showCheckbox && !isUser visible: showCheckbox && !isUser
anchors.top: accountImage.top anchors.top: accountImage.top

View File

@ -2,9 +2,6 @@ import QtQuick 2.12
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Dialogs 1.3 import QtQuick.Dialogs 1.3
import utils 1.0
import "../../../../../shared/popups"
import StatusQ.Core 0.1 import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1 import StatusQ.Core.Theme 0.1
import StatusQ.Components 0.1 import StatusQ.Components 0.1
@ -12,6 +9,9 @@ import StatusQ.Controls 0.1
import StatusQ.Controls.Validators 0.1 import StatusQ.Controls.Validators 0.1
import StatusQ.Popups 0.1 import StatusQ.Popups 0.1
import utils 1.0
import "../../../../../shared/popups"
StatusModal { StatusModal {
property string communityId property string communityId
property string categoryId property string categoryId

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts 1.3
import QtQuick.Controls 2.14 import QtQuick.Controls 2.14
import utils 1.0 import utils 1.0
import "../../../../shared"
import "../../../../shared/popups" import "../../../../shared/popups"
import "../../../../shared/status" import "../../../../shared/status"

View File

@ -4,11 +4,11 @@ import QtQuick.Layouts 1.13
import utils 1.0 import utils 1.0
import "../../../../shared" import StatusQ.Controls 0.1
import "../../../../shared/popups" import "../../../../shared/popups"
import "../../../../shared/panels" import "../../../../shared/panels"
import "../../../../shared/controls" import "../../../../shared/controls"
import "../../../../shared/status"
Item { Item {
id: modalBody id: modalBody

View File

@ -2,12 +2,13 @@ import QtQuick 2.13
import QtQuick.Controls 2.13 import QtQuick.Controls 2.13
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Components 0.1 import StatusQ.Components 0.1
import StatusQ.Controls 0.1 import StatusQ.Controls 0.1
import utils 1.0 import utils 1.0
import "../../../../shared"
import "../../../../shared/panels"
// TODO: replace with StatusModal // TODO: replace with StatusModal
Popup { Popup {
@ -55,12 +56,13 @@ Popup {
Item { Item {
width: content.width width: content.width
height: 40 height: 40
StyledText { StatusBaseText {
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: Style.current.bigPadding anchors.leftMargin: Style.current.bigPadding
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
font.pixelSize: Style.current.primaryTextFontSize font.pixelSize: Style.current.primaryTextFontSize
text: model.chainName text: model.chainName
color: Theme.palette.directColor1
} }
StatusCheckBox { StatusCheckBox {

View File

@ -1,38 +0,0 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtGraphicalEffects 1.13
import utils 1.0
import "../../shared"
import "../../shared/panels"
CheckBox {
id: control
indicator: Rectangle {
implicitWidth: 18
implicitHeight: 18
x: control.leftPadding
y: parent.height / 2 - height / 2
radius: 3
color: (control.down || control.checked) ? Style.current.primary : Style.current.inputBackground
SVGImage {
source: Style.svg("checkmark")
width: 16
height: 16
anchors.centerIn: parent
visible: control.down || control.checked
}
}
contentItem: StyledText {
text: control.text
opacity: enabled ? 1.0 : 0.3
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
width: parent.width
leftPadding: !!control.text ? control.indicator.width + control.spacing : control.indicator.width
}
}