feat(StatusRadioButton): Added size variant `Large` and `Small`
This commit is contained in:
parent
780ade987d
commit
9d6cea7051
src/StatusQ/Controls
|
@ -10,11 +10,25 @@ import StatusQ.Components 0.1
|
||||||
RadioButton {
|
RadioButton {
|
||||||
id: statusRadioButton
|
id: statusRadioButton
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\qmlproperty int StatusRadioButton::size
|
||||||
|
This property holds size type of the radio button.
|
||||||
|
Possible values are:
|
||||||
|
- Small
|
||||||
|
- Large (default size)
|
||||||
|
*/
|
||||||
|
property int size: StatusRadioButton.Size.Large
|
||||||
|
|
||||||
|
enum Size {
|
||||||
|
Small,
|
||||||
|
Large
|
||||||
|
}
|
||||||
|
|
||||||
width: indicator.implicitWidth
|
width: indicator.implicitWidth
|
||||||
|
|
||||||
indicator: Rectangle {
|
indicator: Rectangle {
|
||||||
implicitWidth: 20
|
implicitWidth: size === StatusRadioButton.Size.Large ? 20 : 14
|
||||||
implicitHeight: 20
|
implicitHeight: size === StatusRadioButton.Size.Large ? 20 : 14
|
||||||
x: 0
|
x: 0
|
||||||
y: 6
|
y: 6
|
||||||
radius: 10
|
radius: 10
|
||||||
|
@ -22,8 +36,8 @@ RadioButton {
|
||||||
: Theme.palette.directColor8
|
: Theme.palette.directColor8
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: 12
|
width: size === StatusRadioButton.Size.Large ? 12 : 8
|
||||||
height: 12
|
height: size === StatusRadioButton.Size.Large ? 12 : 8
|
||||||
radius: 6
|
radius: 6
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
Loading…
Reference in New Issue