mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-16 08:37:12 +00:00
feat(SQ/StatusImageSelector): Added new properties
`preview` and `file` properties added.
This commit is contained in:
parent
736f315c49
commit
72da3cdf63
@ -58,17 +58,29 @@ Control {
|
||||
property var acceptedImageExtensions: [".png", ".jpg", ".jpeg", ".heif", ".tif", ".tiff"]
|
||||
|
||||
/*!
|
||||
\qmlproperty var StatusImageSelector::headerHeight.
|
||||
\qmlproperty bool StatusImageSelector::preview.
|
||||
This property holds if the component's behavior is just preview (true) the image or load (false).
|
||||
*/
|
||||
property bool preview: false
|
||||
|
||||
/*!
|
||||
\qmlproperty int StatusImageSelector::headerHeight.
|
||||
This property holds the header height value including label heigh + spacing between label and image rectangle.
|
||||
*/
|
||||
readonly property int headerHeight: label.implicitHeight + rootImageSelector.spacing
|
||||
|
||||
/*!
|
||||
\qmlproperty var StatusImageSelector::buttonsInsideOffset.
|
||||
\qmlproperty int StatusImageSelector::buttonsInsideOffset.
|
||||
This property holds the plus button inside offset value.
|
||||
*/
|
||||
readonly property int buttonsInsideOffset: 10
|
||||
|
||||
/*!
|
||||
\qmlproperty alias StatusImageSelector::file.
|
||||
This property holds the image file source.
|
||||
*/
|
||||
property alias file: image.source
|
||||
|
||||
/*!
|
||||
\qmlsignal StatusImageSelector::fileSelected(url file)
|
||||
This signal is emitted when a new file is selected.
|
||||
@ -140,6 +152,7 @@ Control {
|
||||
id: dropArea
|
||||
|
||||
anchors.fill: parent
|
||||
enabled: !root.preview
|
||||
onDropped: d.loadFile(drop.urls)
|
||||
}
|
||||
|
||||
@ -147,6 +160,7 @@ Control {
|
||||
id: addButton
|
||||
|
||||
z: 1
|
||||
visible: !preview
|
||||
icon.name: "add"
|
||||
type: StatusRoundButton.Type.Secondary
|
||||
anchors {
|
||||
|
Loading…
x
Reference in New Issue
Block a user