@@ -29,10 +29,9 @@ FocusScope {
30 property bool decorationShown: true
30 property bool decorationShown: true
31 property bool highlightShown: false
31 property bool highlightShown: false
32− property real highlightScale: 1
34− property int transformedWidth: width
33+ property int windowWidth: width
35− property int transformedHeight: height
34+ property int windowHeight: height
37 signal close();
36 signal close();
38 signal maximize();
37 signal maximize();
@@ -43,14 +42,16 @@ FocusScope {
44 name: "normal"
43 name: "normal"
45 PropertyChanges {
44 PropertyChanges {
46− target: applicationWindow
45+ target: root
50 name: "transformed"
51 name: "transformed"
51 PropertyChanges {
52 PropertyChanges {
52 target: applicationWindow
53 target: applicationWindow
53− itemScale: root.transformedWidth / root.width / root.highlightScale
54+ itemScale: Math.max(root.width / root.windowWidth, root.height / root.windowHeight)
55 PropertyChanges {
56 PropertyChanges {
56 target: clipper
57 target: clipper
@@ -72,14 +73,14 @@ FocusScope {
72 Rectangle {
73 Rectangle {
73 id: selectionHighlight
74 id: selectionHighlight
74 anchors.fill: parent
75 anchors.fill: parent
75− anchors.margins: -units.gu(1) * root.highlightScale
76+ anchors.margins: -units.gu(1)
76 color: "white"
77 color: "white"
77 opacity: highlightShown ? 0.15 : 0
78 opacity: highlightShown ? 0.15 : 0
80 Rectangle {
81 Rectangle {
81 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
82 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
82− height: units.dp(2) * root.highlightScale
83+ height: units.dp(2)
83 color: UbuntuColors.orange
84 color: UbuntuColors.orange
84 visible: root.highlightShown
85 visible: root.highlightShown
@@ -106,12 +107,12 @@ FocusScope {
106 anchors.top: parent.top
107 anchors.top: parent.top
107 anchors.topMargin: root.decorationShown ? decoration.height : 0
108 anchors.topMargin: root.decorationShown ? decoration.height : 0
108 anchors.left: parent.left
109 anchors.left: parent.left
109− width: parent.width
110+ width: root.windowWidth
110− height: parent.height - (root.decorationShown ? decoration.height : 0)
111+ height: root.windowHeight - (root.decorationShown ? decoration.height : 0)
111 interactive: true
112 interactive: true
112 focus: true
113 focus: true
114− property real itemsScale: 1
115+ property real itemScale: 1
115 transform: [
116 transform: [
117 origin.x: 0; origin.y: 0
118 origin.x: 0; origin.y: 0