feat: commit dotherside

This commit is contained in:
B.Melnik 2021-05-19 21:31:18 +03:00 committed by Iuri Matias
parent 7b62dbbc33
commit f433020d1d
10 changed files with 123 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

View File

@ -89,7 +89,7 @@ StatusWindow {
//! Workaround for custom QQuickWindow
Connections {
target: applicationWindow
target: c
onClosing: {
if (loader.sourceComponent == login) {
applicationWindow.visible = false;
@ -106,7 +106,7 @@ StatusWindow {
}
onActiveChanged: {
if (active && currentlyHasANotification) {
if (applicationWindow.active && currentlyHasANotification) {
currentlyHasANotification = false
// QML doesn't have a function to hide notifications, but this does the trick
systemTray.hide()
@ -409,6 +409,15 @@ StatusWindow {
NotificationWindow {
id: notificationWindow
}
MacTrafficLights {
parent: Overlay.overlay
anchors.left: parent.left
anchors.top: parent.top
anchors.margins: 13
visible: Qt.platform.os === "osx" && !applicationWindow.isFullScreen
}
}
/*##^##

View File

@ -387,6 +387,7 @@ DISTFILES += \
shared/ImageCropperModal.qml \
shared/Input.qml \
shared/LabelValueRow.qml \
shared/MacTrafficLights.qml \
shared/ModalPopup.qml \
shared/NotificationWindow.qml \
shared/PopupMenu.qml \

View File

@ -0,0 +1,110 @@
import QtQuick 2.13
import "../imports"
MouseArea {
id: statusMacWindowButtons
hoverEnabled: true
width: layout.implicitWidth
height: layout.implicitHeight
readonly property color inactive: Style.current.name === Constants.lightThemeName ? "#D5CDCF"
: "#524d51"
readonly property color inactiveBorder: Style.current.name === Constants.lightThemeName ? "#B3ABAD"
: "#D14C40"
Row {
id: layout
spacing: 8
Rectangle {
width: 12
height: 12
radius: width / 2
antialiasing: true
color: closeSensor.pressed ? "#B24F47" : (applicationWindow.active || statusMacWindowButtons.containsMouse ? Qt.lighter("#E9685C", 1.07)
: inactive )
border.color:closeSensor.pressed ? "#943229" : (applicationWindow.active ? "#D14C40"
: inactiveBorder)
border.width: Style.current.name === Constants.lightThemeName ? 0.5 : 0
Image {
anchors.centerIn: parent
visible: statusMacWindowButtons.containsMouse
source: closeSensor.pressed ? "../app/img/traffic_lights/close_pressed.png"
: "../app/img/traffic_lights/close.png"
scale: 0.25
}
MouseArea {
id: closeSensor
anchors.fill: parent
onClicked: applicationWindow.close()
}
}
Rectangle {
width: 12
height: 12
radius: width / 2
antialiasing: true
color: miniSensor.pressed ? "#878E3B" : (applicationWindow.active || statusMacWindowButtons.containsMouse ? Qt.lighter("#EDB84C", 1.07)
: inactive)
border.color:miniSensor.pressed ? "#986E29" : (applicationWindow.active ? "#D79F3D"
: inactiveBorder)
border.width: Style.current.name === Constants.lightThemeName ? 0.5 : 0
Image {
anchors.centerIn: parent
anchors.verticalCenterOffset: -0.25
visible: statusMacWindowButtons.containsMouse
source: miniSensor.pressed ? "../app/img/traffic_lights/minimise_pressed.png"
: "../app/img/traffic_lights/minimise.png"
scale: 0.27
}
MouseArea {
id: miniSensor
anchors.fill: parent
onClicked: applicationWindow.showMinimized()
}
}
Rectangle {
width: 12
height: 12
radius: width / 2
antialiasing: true
color: maxiSensor.pressed ? "#48943f" : (applicationWindow.active || statusMacWindowButtons.containsMouse ? Qt.lighter("#62C454", 1.06)
: inactive)
border.color: maxiSensor.pressed ? "#357225" : (applicationWindow.active ? "#53A73E"
: inactiveBorder)
border.width: Style.current.name === Constants.lightThemeName ? 0.5 : 0
Image {
anchors.centerIn: parent
visible: statusMacWindowButtons.containsMouse
source: maxiSensor.pressed ?"../app/img/traffic_lights/maximize_pressed.png"
:"../app/img/traffic_lights/maximize.png"
scale: 0.25
}
MouseArea {
id: maxiSensor
anchors.fill: parent
onClicked: applicationWindow.toggleFullScreen()
}
}
}
}

2
vendor/DOtherSide vendored

@ -1 +1 @@
Subproject commit 3c5eeedb6ec22ff16871de95e14144ff7d19ffe3
Subproject commit dcece83df9f25d37a5027835e7b55919af26ae2e