Rewrite the canvas item's paint logic.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativeviewer / data / orientation.qml
1 import QtQuick 1.0
2 Rectangle {
3     color: "black"
4     width: (runtime.orientation == Orientation.Landscape || runtime.orientation == Orientation.LandscapeInverted) ? 300 : 200
5     height: (runtime.orientation == Orientation.Landscape || runtime.orientation == Orientation.LandscapeInverted) ? 200 : 300
6     Text {
7         text: {
8             if (runtime.orientation == Orientation.Portrait)
9                 return "Portrait"
10             if (runtime.orientation == Orientation.PortraitInverted)
11                 return "PortraitInverted"
12             if (runtime.orientation == Orientation.Landscape)
13                 return "Landscape"
14             if (runtime.orientation == Orientation.LandscapeInverted)
15                 return "LandscapeInverted"
16         }
17         color: "white"
18     }
19