mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-14 16:47:25 +00:00
4ee21ada05
Introduced Style.svg() Style.png() Style.emoji() and Style.icon() in Style.qml. Those should be used to set the source in Images instead of using relative paths. Usage: Image { source: Style.svg("check) .... Also moved all Singletons inside a new "utils" folder and made it a QML module, to use import utils 1.0 instead of relative paths Closes #3678
55 lines
1.4 KiB
QML
55 lines
1.4 KiB
QML
import QtQuick 2.13
|
|
import QtQuick.Controls 2.13
|
|
import QtGraphicalEffects 1.13
|
|
import "../../../../shared"
|
|
import "../../../../shared/status"
|
|
|
|
import utils 1.0
|
|
import "."
|
|
|
|
Item {
|
|
property string text
|
|
property string description
|
|
property var buttonGroup
|
|
property bool checked: false
|
|
property bool hideSeparator: false
|
|
signal radioCheckedChanged(bool checked)
|
|
|
|
id: root
|
|
width: parent.width
|
|
height: childrenRect.height
|
|
|
|
StatusRadioButtonRow {
|
|
id: radioBtn
|
|
text: root.text
|
|
buttonGroup: root.buttonGroup
|
|
checked: root.checked
|
|
onRadioCheckedChanged: {
|
|
root.radioCheckedChanged(checked)
|
|
}
|
|
}
|
|
|
|
StyledText {
|
|
id: radioDesc
|
|
text: root.description
|
|
anchors.top: radioBtn.bottom
|
|
anchors.topMargin: Style.current.halfPadding
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: 100
|
|
font.pixelSize: 13
|
|
color: Style.current.secondaryText
|
|
wrapMode: Text.WordWrap
|
|
}
|
|
|
|
Separator {
|
|
visible: !root.hideSeparator
|
|
anchors.top: radioDesc.bottom
|
|
anchors.topMargin: visible ? Style.current.halfPadding : 0
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: -Style.current.halfPadding
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: -Style.current.halfPadding
|
|
}
|
|
}
|