on xenial help sign in
replace temporary close icon with proper asset
17e4b12Michael Zanetti
qml/Stages/DecoratedWindow.qml−20
@@ -123,24 +123,4 @@ FocusScope {
123 ]
123 ]
124 }
124 }
125 }
125 }
126−
127− Rectangle {
128− color: "white"
129− anchors { left: parent.left; top: parent.top; margins: -height/2 }
130− height: units.gu(2)
131− width: units.gu(2)
132− radius: height / 2
133− visible: root.highlightShown
134− Label {
135− anchors.centerIn: parent
136− text: "X"
137− color: "red"
138− }
139− MouseArea {
140− anchors.fill: parent
141− onClicked: {
142− ApplicationManager.stopApplication(appId)
143− }
144− }
145− }
146}
126}
qml/Stages/DesktopStage.qml+20
@@ -259,6 +259,8 @@ FocusScope {
259 id: spreadSelectArea
259 id: spreadSelectArea
260 anchors.fill: parent
260 anchors.fill: parent
261 enabled: false
261 enabled: false
262+ hoverEnabled: true
263+ property bool upperThirdContainsMouse: containsMouse && mouseY < height / 3
262 onClicked: {
264 onClicked: {
263 print("clicked")
265 print("clicked")
264 appDelegate.focusWindow()
266 appDelegate.focusWindow()
@@ -267,6 +269,24 @@ FocusScope {
267 }
269 }
268 }
270 }
269
271
272+ Image {
273+ anchors { left: parent.left; top: parent.top; leftMargin: -height / 2; topMargin: -height / 2 }
274+ source: "graphics/window-close.svg"
275+ visible: spreadSelectArea.upperThirdContainsMouse || closeMouseArea.containsMouse
276+ height: units.gu(1.5)
277+ width: height
278+ sourceSize.width: width
279+ sourceSize.height: height
280+
281+ MouseArea {
282+ id: closeMouseArea
283+ anchors.fill: parent
284+ anchors.margins: -units.gu(1)
285+ hoverEnabled: true
286+ onClicked: ApplicationManager.stopApplication(model.appId)
287+ }
288+ }
289+
270
290
271 ColumnLayout {
291 ColumnLayout {
272 id: tileInfo
292 id: tileInfo
qml/Stages/graphics/window-close.svgnew file+64
@@ -0,0 +1,64 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3+
4+<svg
5+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6+ xmlns:cc="http://creativecommons.org/ns#"
7+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8+ xmlns:svg="http://www.w3.org/2000/svg"
9+ xmlns="http://www.w3.org/2000/svg"
10+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12+ width="14.81667mm"
13+ height="14.816668mm"
14+ viewBox="0 0 14.81667 14.816668"
15+ id="svg4171"
16+ version="1.1"
17+ inkscape:version="0.91+devel r"
18+ sodipodi:docname="window-close01.svg">
19+ <defs
20+ id="defs4173" />
21+ <sodipodi:namedview
22+ id="base"
23+ pagecolor="#ffffff"
24+ bordercolor="#666666"
25+ borderopacity="1.0"
26+ inkscape:pageopacity="0.0"
27+ inkscape:pageshadow="2"
28+ inkscape:zoom="11.957142"
29+ inkscape:cx="37.299889"
30+ inkscape:cy="25.219237"
31+ inkscape:document-units="mm"
32+ inkscape:current-layer="layer1"
33+ showgrid="false"
34+ fit-margin-top="0"
35+ fit-margin-left="0"
36+ fit-margin-right="0"
37+ fit-margin-bottom="0" />
38+ <metadata
39+ id="metadata4176">
40+ <rdf:RDF>
41+ <cc:Work
42+ rdf:about="">
43+ <dc:format>image/svg+xml</dc:format>
44+ <dc:type
45+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
46+ <dc:title></dc:title>
47+ </cc:Work>
48+ </rdf:RDF>
49+ </metadata>
50+ <g
51+ inkscape:label="Layer 1"
52+ inkscape:groupmode="layer"
53+ id="layer1"
54+ transform="translate(-134.71071,-3.8416665)">
55+ <path
56+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#dd4814;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:16.93333244;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
57+ d="M 142.11905,3.8416665 A 7.4083333,7.4083333 0 0 0 134.71071,11.25 7.4083333,7.4083333 0 0 0 142.11905,18.658334 7.4083333,7.4083333 0 0 0 149.52738,11.25 7.4083333,7.4083333 0 0 0 142.11905,3.8416665 Z"
58+ id="path4141" />
59+ <path
60+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:16.93333244;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
61+ d="m 139.31818,7.7008631 2.80087,2.8008629 2.80086,-2.8008629 0.74827,0.7482734 -2.80086,2.8008635 2.80086,2.800864 -0.74827,0.748273 -2.80086,-2.800864 -2.80087,2.800864 -0.74827,-0.748273 2.80086,-2.800864 -2.80086,-2.8008635 0.74827,-0.7482734 z"
62+ id="path4170" />
63+ </g>
64+</svg>