2121//
2222// Copyright (c) 2011, Tom Swindell <t.swindell@rubyx.co.uk>
2323// Copyright (c) 2012, Timur Kristóf <venemo@fedoraproject.org>
24- // Copyright (c) 2018-2024 , Sergey Chupligin <neochapay@gmail.com>
24+ // Copyright (c) 2018-2025 , Sergey Chupligin <neochapay@gmail.com>
2525
2626import QtQuick
2727import Nemo.Controls
@@ -31,57 +31,12 @@ import org.nemomobile.lipstick 0.1
3131Item {
3232 id: switcherItemRoot
3333
34- property bool rotateWindowContent: ! desktop .isUiPortrait
35- property int desktopAngle: {
36- switch (Lipstick .compositor .screenOrientation ) {
37- case Qt .PortraitOrientation :
38- return 0
39- case Qt .InvertedPortraitOrientation :
40- return 180
41- case Qt .LandscapeOrientation :
42- return 270
43- case Qt .InvertedLandscapeOrientation :
44- return 90
45- }
46- }
47-
48- property int originX: {
49- switch (Lipstick .compositor .screenOrientation ) {
50- case Qt .PortraitOrientation :
51- return 0
52- case Qt .InvertedPortraitOrientation :
53- return windowPixmap .width / 2
54- case Qt .LandscapeOrientation :
55- return windowPixmap .width / 2
56- case Qt .InvertedLandscapeOrientation :
57- return windowPixmap .height / 2
58- }
59- }
60- property int originY: {
61- switch (Lipstick .compositor .screenOrientation ) {
62- case Qt .PortraitOrientation :
63- return 0
64- case Qt .InvertedPortraitOrientation :
65- return windowPixmap .height / 2
66- case Qt .LandscapeOrientation :
67- return windowPixmap .width / 2
68- case Qt .InvertedLandscapeOrientation :
69- return windowPixmap .height / 2
70- }
71- }
72-
7334 WindowPixmapItem {
7435 id: windowPixmap
75- width: rotateWindowContent ? parent .height : parent .width
76- height: rotateWindowContent ? parent .width : parent .height
36+ anchors .fill : parent
7737 windowId: model .window
7838 smooth: true
7939
80- transform: Rotation {
81- angle: desktopAngle
82- origin .x : originX
83- origin .y : originY
84- }
8540 opacity: switcherRoot .closeMode ? .6 : 1
8641 Behavior on opacity { NumberAnimation { duration: 300 ; easing .type : Easing .OutBack } }
8742 }
@@ -129,7 +84,7 @@ Item {
12984
13085 CloseButton {
13186 id: closeButton
132- width: (rotateWindowContent ? parent .height : parent . width ) / 4
87+ width: parent .height / 4
13388 height: width
13489 Behavior on scale { PropertyAnimation { duration: 300 ; easing .type : Easing .OutBack } }
13590 scale: switcherRoot .closeMode ? 1 : 0
0 commit comments