moment/harmonyqml/components/base/HScalingBox.qml

16 lines
475 B
QML
Raw Normal View History

import QtQuick 2.7
2019-04-28 14:44:55 +10:00
HGlassRectangle {
property real widthForHeight: 0.75
property int baseHeight: 300
property int startScalingUpAboveHeight: 1080
readonly property int baseWidth: baseHeight * widthForHeight
readonly property int margins: baseHeight * 0.03
2019-04-28 14:44:55 +10:00
color: HStyle.boxes.background
2019-04-28 11:07:20 +10:00
height: Math.min(parent.height, baseHeight)
width: Math.min(parent.width, baseWidth)
scale: Math.max(1, parent.height / startScalingUpAboveHeight)
}