Reorder QML files to follow coding conventions
https://doc.qt.io/qt-5/qml-codingconventions.html#qml-object-declarations
This commit is contained in:
@@ -4,9 +4,9 @@ import QtQuick 2.12
|
||||
import ".."
|
||||
|
||||
HRowLayout {
|
||||
property HTile tile
|
||||
|
||||
|
||||
spacing: tile.spacing
|
||||
opacity: tile.contentOpacity
|
||||
|
||||
|
||||
property HTile tile
|
||||
}
|
||||
|
@@ -5,26 +5,15 @@ import ".."
|
||||
|
||||
HButton {
|
||||
id: tile
|
||||
topPadding: padded ? spacing / (compact ? 4 : 2) : 0
|
||||
bottomPadding: topPadding
|
||||
|
||||
Keys.onEnterPressed: leftClicked()
|
||||
Keys.onReturnPressed: leftClicked()
|
||||
Keys.onSpacePressed: leftClicked()
|
||||
Keys.onMenuPressed: doRightClick(false)
|
||||
|
||||
property bool compact: window.settings.compactMode
|
||||
property real contentOpacity: 1
|
||||
property Component contextMenu: null
|
||||
|
||||
signal leftClicked()
|
||||
signal rightClicked()
|
||||
signal longPressed()
|
||||
|
||||
|
||||
property bool compact: window.settings.compactMode
|
||||
property real contentOpacity: 1
|
||||
|
||||
property Component contextMenu: null
|
||||
|
||||
|
||||
function openMenu(atCursor=true) {
|
||||
if (! contextMenu) return
|
||||
const menu = contextMenu.createObject(tile)
|
||||
@@ -38,6 +27,15 @@ HButton {
|
||||
}
|
||||
|
||||
|
||||
topPadding: padded ? spacing / (compact ? 4 : 2) : 0
|
||||
bottomPadding: topPadding
|
||||
|
||||
Keys.onEnterPressed: leftClicked()
|
||||
Keys.onReturnPressed: leftClicked()
|
||||
Keys.onSpacePressed: leftClicked()
|
||||
Keys.onMenuPressed: doRightClick(false)
|
||||
|
||||
|
||||
Behavior on topPadding { HNumberAnimation {} }
|
||||
Behavior on bottomPadding { HNumberAnimation {} }
|
||||
|
||||
|
@@ -7,6 +7,7 @@ import ".."
|
||||
HLabel {
|
||||
property HTile tile
|
||||
|
||||
|
||||
textFormat: Text.StyledText
|
||||
font.pixelSize: theme.fontSize.small
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
|
@@ -5,6 +5,9 @@ import QtQuick.Layouts 1.12
|
||||
import ".."
|
||||
|
||||
HLabel {
|
||||
property HTile tile
|
||||
|
||||
|
||||
font.pixelSize: theme.fontSize.small
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
color: theme.colors.halfDimText
|
||||
@@ -15,9 +18,5 @@ HLabel {
|
||||
text && tile.width >= 200 * theme.uiScale ?
|
||||
implicitWidth : 0
|
||||
|
||||
|
||||
property HTile tile
|
||||
|
||||
|
||||
Behavior on Layout.maximumWidth { HNumberAnimation {} }
|
||||
}
|
||||
|
Reference in New Issue
Block a user