summaryrefslogtreecommitdiffstats
path: root/util/qt3d/assetviewer/qml/Widgets/ModelViewportResize.qml
blob: 96e8a2d64241e6647d4af287f18583d6769061e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import QtQuick 1.0
import Qt3D 1.0
import AssetViewer 1.0

Rectangle {
    radius: 4
    border.width: 1
    border.color: "#191919"
    width: 16 + 2
    height: 16 + 2
    color: "#999999"

    Image {
        id: img
        source: mainwindow.state !== "3Views" ? "images/shrink.png" : "images/grow.png"
        x: 2
        y: 2
        MouseArea {
            anchors.fill: parent
            onClicked: {
                if (view.stateName) {
                    if (mainwindow.state !== "3Views")
                        mainwindow.state = "3Views"
                    else
                        mainwindow.state = view.stateName
                }
            }
        }
    }
}