Reorder QML files to follow coding conventions

https://doc.qt.io/qt-5/qml-codingconventions.html#qml-object-declarations
This commit is contained in:
miruka
2020-07-12 00:25:57 -04:00
parent 229fbee298
commit 3c7b78d4ca
131 changed files with 1022 additions and 1122 deletions

View File

@@ -4,9 +4,9 @@ import QtQuick 2.12
import ".."
HRowLayout {
property HTile tile
spacing: tile.spacing
opacity: tile.contentOpacity
property HTile tile
}

View File

@@ -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 {} }

View File

@@ -7,6 +7,7 @@ import ".."
HLabel {
property HTile tile
textFormat: Text.StyledText
font.pixelSize: theme.fontSize.small
verticalAlignment: Qt.AlignVCenter

View File

@@ -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 {} }
}