Improve SidePane auto-sizing and appearance
This commit is contained in:
@@ -4,7 +4,7 @@ import "../Base"
|
||||
Rectangle {
|
||||
property var name: null
|
||||
property var imageUrl: null
|
||||
property int dimension: 36
|
||||
property int dimension: HStyle.avatar.size
|
||||
property bool hidden: false
|
||||
|
||||
width: dimension
|
||||
|
@@ -52,7 +52,7 @@ HScalingBox {
|
||||
onClicked: buttonCallbacks[modelData.name](button)
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 32
|
||||
Layout.preferredHeight: HStyle.avatar.size
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -3,5 +3,22 @@ import QtQuick.Controls 1.4 as Controls1
|
||||
|
||||
//https://doc.qt.io/qt-5/qml-qtquick-controls-splitview.html
|
||||
Controls1.SplitView {
|
||||
handleDelegate: Item {}
|
||||
id: splitView
|
||||
|
||||
property bool anyHovered: false
|
||||
property bool anyPressed: false
|
||||
property bool anyResizing: false
|
||||
|
||||
property bool canAutoSize: true
|
||||
onAnyPressedChanged: canAutoSize = false
|
||||
|
||||
handleDelegate: Item {
|
||||
readonly property bool hovered: styleData.hovered
|
||||
readonly property bool pressed: styleData.pressed
|
||||
readonly property bool resizing: styleData.resizing
|
||||
|
||||
onHoveredChanged: splitView.anyHovered = hovered
|
||||
onPressedChanged: splitView.anyPressed = pressed
|
||||
onResizingChanged: splitView.anyResizing = resizing
|
||||
}
|
||||
}
|
||||
|
@@ -115,6 +115,7 @@ QtObject {
|
||||
}
|
||||
|
||||
readonly property QtObject avatar: QtObject {
|
||||
property int size: 36
|
||||
property int radius: style.radius
|
||||
property color letter: "white"
|
||||
|
||||
@@ -130,4 +131,6 @@ QtObject {
|
||||
property real saturation: 0.32
|
||||
property real lightness: 0.3
|
||||
}
|
||||
|
||||
property int bottomElementsHeight: 32
|
||||
}
|
||||
|
Reference in New Issue
Block a user