Commit 66fa5986 authored by Bruno Coudoin's avatar Bruno Coudoin
Browse files

scalesboard, added support for portrait mode

parent d2d90666
......@@ -33,7 +33,6 @@ Rectangle {
property alias dropEnabled: dropArea.enabled
property int nbColumns
property int nbLines: background.width > background.height ? 1 : 2
property int itemWidth: (width - masseFlow.spacing * nbColumns) / nbColumns
property int itemHeight: itemWidth * 1.2
......
......@@ -128,18 +128,17 @@ ActivityBase {
MasseArea {
id: masseAreaLeft
parent: scale
height: itemHeight
width: plateLeft.width
anchors {
horizontalCenter: parent.horizontalCenter
horizontalCenterOffset: - parent.paintedWidth * 0.3
verticalCenter: parent.verticalCenter
verticalCenterOffset: - parent.paintedHeight * 0.4 + background.scaleHeight
verticalCenterOffset: - parent.paintedHeight * 0.44 + background.scaleHeight
}
masseAreaCenter: masseAreaCenter
masseAreaLeft: masseAreaLeft
masseAreaRight: masseAreaRight
nbColumns: 4
nbColumns: 3
dropEnabled: true
Behavior on anchors.verticalCenterOffset {
......@@ -175,18 +174,17 @@ ActivityBase {
MasseArea {
id: masseAreaRight
parent: scale
height: itemHeight
width: plateRight.width
anchors {
horizontalCenter: parent.horizontalCenter
horizontalCenterOffset: parent.paintedWidth * 0.3
verticalCenter: parent.verticalCenter
verticalCenterOffset: - parent.paintedHeight * 0.4 - background.scaleHeight
verticalCenterOffset: - parent.paintedHeight * 0.44 - background.scaleHeight
}
masseAreaCenter: masseAreaCenter
masseAreaLeft: masseAreaLeft
masseAreaRight: masseAreaRight
nbColumns: 4
nbColumns: 3
dropEnabled: items.dataset[bar.level - 1].rightDrop
Behavior on anchors.verticalCenterOffset {
......@@ -203,12 +201,12 @@ ActivityBase {
id: masseAreaCenter
parent: scale
x: parent.width * 0.05
y: parent.height * 0.86 - height
y: parent.height * 0.84 - height
width: parent.width
masseAreaCenter: masseAreaCenter
masseAreaLeft: masseAreaLeft
masseAreaRight: masseAreaRight
nbColumns: masseModel.count / nbLines
nbColumns: masseModel.count
dropEnabled: true
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment