diff --git a/src/StatusQ/Controls/StatusBaseInput.qml b/src/StatusQ/Controls/StatusBaseInput.qml index 62ab4830..e2defdcd 100644 --- a/src/StatusQ/Controls/StatusBaseInput.qml +++ b/src/StatusQ/Controls/StatusBaseInput.qml @@ -240,6 +240,11 @@ Item { } } + /*! + \qmlproperty string StatusBaseInput::letterIconName + This property holds the letter that should be displayed in the letter identicon component. + */ + property string letterIconName: "" /*! \qmlproperty Component StatusBaseInput::leftComponent This property sets the left component to be displayed inside the input. @@ -327,7 +332,7 @@ Item { sourceComponent: { if (root.leftComponent) return root.leftComponent if (!root.leftIcon) return undefined - if (root.icon.emoji) return identiconComponent + if (root.icon.emoji || root.icon.isLetterIdenticon) return identiconComponent if (root.icon.name) return isIconSelectable ? identiconComponent : iconComponent return undefined } @@ -479,13 +484,15 @@ Item { StatusSmartIdenticon { id: identicon - icon.width: !root.icon.emoji ? 20 : 24 - icon.height: !root.icon.emoji ? 20 : 24 + icon.width: 24 + icon.height: 24 icon.background: root.icon.background icon.color: root.icon.color icon.letterSize: root.icon.letterSize icon.emoji: root.icon.emoji icon.name: !root.icon.emoji ? root.icon.name : "" + icon.isLetterIdenticon: root.icon.isLetterIdenticon + name: root.letterIconName MouseArea { cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor diff --git a/src/StatusQ/Controls/StatusInput.qml b/src/StatusQ/Controls/StatusInput.qml index 004132fb..06ab7fcc 100644 --- a/src/StatusQ/Controls/StatusInput.qml +++ b/src/StatusQ/Controls/StatusInput.qml @@ -51,6 +51,13 @@ Item { This property holds a reference to the TextEdit component. */ property alias input: statusBaseInput + + /*! + \qmlproperty string StatusInput::letterIconName + This property holds a reference to the StatusBaseInput's letterIconName property. + */ + property alias letterIconName: statusBaseInput.letterIconName + /*! \qmlproperty alias StatusInput::valid This property holds a reference to the TextEdit's valid property. diff --git a/src/assets/img/icons/smiley.svg b/src/assets/img/icons/smiley.svg new file mode 100644 index 00000000..3c16f738 --- /dev/null +++ b/src/assets/img/icons/smiley.svg @@ -0,0 +1,6 @@ + + + + + +