forked from Silverfish/proton-bridge
GODT-1167 GODT-1179 make run-qml-preview
This commit is contained in:
@ -16,48 +16,35 @@
|
||||
// along with ProtonMail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import QtQuick 2.13
|
||||
import QtQuick.Window 2.15
|
||||
import Qt.labs.platform 1.0
|
||||
import QtQuick.Window 2.13
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
QtObject {
|
||||
import Proton 4.0
|
||||
|
||||
property var _mainWindow: Window {
|
||||
id: mainWindow
|
||||
title: "window 1"
|
||||
visible: false
|
||||
}
|
||||
Window {
|
||||
//currentStyle: Proton.Style.prominentStyle
|
||||
|
||||
property var _trayMenu: Window {
|
||||
id: trayMenu
|
||||
title: "window 2"
|
||||
visible: false
|
||||
flags: Qt.Dialog
|
||||
//Button {
|
||||
//
|
||||
//}
|
||||
|
||||
width: 448
|
||||
}
|
||||
|
||||
property var _trayIcon: SystemTrayIcon {
|
||||
id: trayIcon
|
||||
visible: true
|
||||
iconSource: "./icons/rectangle-systray.png"
|
||||
onActivated: {
|
||||
switch (reason) {
|
||||
case SystemTrayIcon.Unknown:
|
||||
break;
|
||||
case SystemTrayIcon.Context:
|
||||
break
|
||||
case SystemTrayIcon.DoubleClick:
|
||||
break
|
||||
case SystemTrayIcon.Trigger:
|
||||
trayMenu.x = (Screen.desktopAvailableWidth - trayMenu.width) / 2
|
||||
trayMenu.visible = !trayMenu.visible
|
||||
break;
|
||||
case SystemTrayIcon.MiddleClick:
|
||||
mainWindow.visible = !mainWindow.visible
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
color: ProtonStyle.currentStyle.background_norm
|
||||
//StackLayout {
|
||||
// SignIn {
|
||||
//
|
||||
// }
|
||||
//}
|
||||
|
||||
Button {
|
||||
id: testButton1
|
||||
text: "Test button"
|
||||
}
|
||||
|
||||
Button {
|
||||
anchors.top: testButton1.bottom
|
||||
secondary: true
|
||||
text: "Test button"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user