chore: fix components missing-property warnings
This commit is contained in:
parent
3e52aa5fb3
commit
022d509f99
5 changed files with 87 additions and 81 deletions
|
|
@ -8,7 +8,8 @@ MouseArea {
|
|||
property bool disabled
|
||||
property bool showHoverBackground: true
|
||||
property color color: Colours.palette.m3onSurface
|
||||
property real radius: parent?.radius ?? 0
|
||||
// Pick up radius from parent if it has one (parent can be anything with a radius property)
|
||||
property real radius: parent?.radius ?? 0 // qmllint disable missing-property
|
||||
property alias rect: hoverLayer
|
||||
|
||||
function onClicked(): void {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import ".."
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import QtQuick.Layouts
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import ".."
|
||||
import "../controls"
|
||||
import "../images"
|
||||
import qs.components
|
||||
import qs.components.filedialog
|
||||
import qs.components.controls
|
||||
import qs.components.images
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
|
@ -16,7 +17,7 @@ Item {
|
|||
id: root
|
||||
|
||||
required property var dialog
|
||||
property alias currentItem: view.currentItem
|
||||
readonly property FileEntry currentItem: view.currentItem as FileEntry
|
||||
|
||||
StyledRect {
|
||||
anchors.fill: parent
|
||||
|
|
@ -91,11 +92,11 @@ Item {
|
|||
|
||||
Keys.onReturnPressed: {
|
||||
if (root.dialog.selectionValid)
|
||||
root.dialog.accepted(currentItem.modelData.path);
|
||||
root.dialog.accepted((currentItem as FileEntry).modelData.path);
|
||||
}
|
||||
Keys.onEnterPressed: {
|
||||
if (root.dialog.selectionValid)
|
||||
root.dialog.accepted(currentItem.modelData.path);
|
||||
root.dialog.accepted((currentItem as FileEntry).modelData.path);
|
||||
}
|
||||
|
||||
StyledScrollBar.vertical: StyledScrollBar {
|
||||
|
|
@ -112,7 +113,52 @@ Item {
|
|||
onPathChanged: view.currentIndex = -1
|
||||
}
|
||||
|
||||
delegate: StyledRect {
|
||||
delegate: FileEntry {}
|
||||
|
||||
add: Transition {
|
||||
Anim {
|
||||
properties: "opacity,scale"
|
||||
from: 0
|
||||
to: 1
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
remove: Transition {
|
||||
Anim {
|
||||
property: "opacity"
|
||||
to: 0
|
||||
}
|
||||
Anim {
|
||||
property: "scale"
|
||||
to: 0.5
|
||||
}
|
||||
}
|
||||
|
||||
displaced: Transition {
|
||||
Anim {
|
||||
properties: "opacity,scale"
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
}
|
||||
Anim {
|
||||
properties: "x,y"
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CurrentItem {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: Appearance.padding.small
|
||||
|
||||
currentItem: view.currentItem
|
||||
}
|
||||
|
||||
component FileEntry: StyledRect {
|
||||
id: item
|
||||
|
||||
required property int index
|
||||
|
|
@ -183,47 +229,4 @@ Item {
|
|||
Anim {}
|
||||
}
|
||||
}
|
||||
|
||||
add: Transition {
|
||||
Anim {
|
||||
properties: "opacity,scale"
|
||||
from: 0
|
||||
to: 1
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
remove: Transition {
|
||||
Anim {
|
||||
property: "opacity"
|
||||
to: 0
|
||||
}
|
||||
Anim {
|
||||
property: "scale"
|
||||
to: 0.5
|
||||
}
|
||||
}
|
||||
|
||||
displaced: Transition {
|
||||
Anim {
|
||||
properties: "opacity,scale"
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
}
|
||||
Anim {
|
||||
properties: "x,y"
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CurrentItem {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: Appearance.padding.small
|
||||
|
||||
currentItem: view.currentItem
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import ".."
|
||||
import qs.components
|
||||
import qs.components.filedialog
|
||||
import qs.services
|
||||
import qs.config
|
||||
import QtQuick
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ import QtQuick
|
|||
Item {
|
||||
id: root
|
||||
|
||||
readonly property int status: loader.item?.status ?? Image.Null
|
||||
// Easier (and more efficient) to ignore it than to check type and cast
|
||||
readonly property int status: loader.item?.status ?? Image.Null // qmllint disable missing-property
|
||||
readonly property real actualSize: Math.min(width, height)
|
||||
property real implicitSize
|
||||
property url source
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue