mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-02 19:56:46 +02:00
* bugfix: in latest PySide2 versions, application palette is not properly applied to all QtQuick Controls 2 components. Force this by exposing QApplication palette and bind it to the root ApplicationWindow. * rename all "palette" ids to "activePalette" to avoid clashes with "palette" property on QtQuick Controls 2 * use parent component palette when it makes sense to propagate active/disabled style (instead of always using Active SystemPalette)
25 lines
583 B
QML
25 lines
583 B
QML
import QtQuick 2.7
|
|
|
|
import "common.js" as Common
|
|
|
|
ListView {
|
|
id: root
|
|
interactive: false
|
|
|
|
SystemPalette { id: activePalette }
|
|
|
|
property color defaultColor: Qt.darker(activePalette.window, 1.1)
|
|
property real chunkHeight: height
|
|
property real chunkWidth: model ? width / model.count : 0
|
|
|
|
orientation: ListView.Horizontal
|
|
implicitWidth: 100
|
|
spacing: 0
|
|
delegate: Rectangle {
|
|
id: chunkDelegate
|
|
height: root.chunkHeight
|
|
width: root.chunkWidth
|
|
color: Common.getChunkColor(object, {"NONE": root.defaultColor})
|
|
}
|
|
}
|
|
|