mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-11 06:06:30 +00:00
chore(StatusItemSelector): allow of using icons (#897)
This commit is contained in:
parent
6549c9f344
commit
b85450a3de
@ -94,6 +94,12 @@ Rectangle {
|
|||||||
\endqml
|
\endqml
|
||||||
*/
|
*/
|
||||||
property var itemsModel: ListModel { }
|
property var itemsModel: ListModel { }
|
||||||
|
/*!
|
||||||
|
\qmlproperty bool StatusItemSelector::useIcons
|
||||||
|
This property determines if the imageSource role from the model will be handled as
|
||||||
|
an image or an icon.
|
||||||
|
*/
|
||||||
|
property bool useIcons: false
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty string StatusItemSelector::andOperatorText
|
\qmlproperty string StatusItemSelector::andOperatorText
|
||||||
This property holds the string text representation for an `AND` logical operator.
|
This property holds the string text representation for an `AND` logical operator.
|
||||||
@ -168,7 +174,7 @@ Rectangle {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: 6
|
spacing: 6
|
||||||
StatusListItemTag {
|
StatusListItemTag {
|
||||||
visible: itemsModel.count === 0
|
visible: !itemsModel || itemsModel.count === 0
|
||||||
title: root.defaultItemText
|
title: root.defaultItemText
|
||||||
asset.name: root.defaultItemImageSource
|
asset.name: root.defaultItemImageSource
|
||||||
asset.isImage: true
|
asset.isImage: true
|
||||||
@ -204,7 +210,8 @@ Rectangle {
|
|||||||
StatusListItemTag {
|
StatusListItemTag {
|
||||||
title: model.text
|
title: model.text
|
||||||
asset.name: model.imageSource
|
asset.name: model.imageSource
|
||||||
asset.isImage: true
|
asset.isImage: !root.useIcons
|
||||||
|
asset.bgColor: "transparent"
|
||||||
color: Theme.palette.primaryColor3
|
color: Theme.palette.primaryColor3
|
||||||
closeButtonVisible: false
|
closeButtonVisible: false
|
||||||
titleText.color: Theme.palette.primaryColor1
|
titleText.color: Theme.palette.primaryColor1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user