2021-05-04 18:31:15 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Window 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
2021-05-27 17:06:50 +00:00
|
|
|
import QtGraphicalEffects 1.13
|
2021-05-04 18:31:15 +00:00
|
|
|
|
2021-05-20 06:25:52 +00:00
|
|
|
import Sandbox 0.1
|
|
|
|
|
2021-05-04 18:31:15 +00:00
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
2021-05-27 17:06:50 +00:00
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Layout 0.1
|
2021-06-01 10:01:47 +00:00
|
|
|
import StatusQ.Platform 0.1
|
2021-05-04 18:31:15 +00:00
|
|
|
|
2021-05-20 06:25:52 +00:00
|
|
|
StatusWindow {
|
2021-05-04 18:31:15 +00:00
|
|
|
id: rootWindow
|
2021-06-15 09:16:22 +00:00
|
|
|
width: Qt.platform.os == "ios" || Qt.platform.os == "android" ? Screen.width
|
2021-07-26 13:13:04 +00:00
|
|
|
: 1224
|
2021-06-15 09:16:22 +00:00
|
|
|
height: Qt.platform.os == "ios" || Qt.platform.os == "android" ? Screen.height
|
|
|
|
:840
|
2021-05-04 18:31:15 +00:00
|
|
|
visible: true
|
2021-05-27 17:06:50 +00:00
|
|
|
title: qsTr("StatusQ Documentation App")
|
2021-05-04 18:31:15 +00:00
|
|
|
|
2021-05-17 10:18:41 +00:00
|
|
|
property ThemePalette lightTheme: StatusLightTheme {}
|
2021-05-27 17:06:50 +00:00
|
|
|
property ThemePalette darkTheme: StatusDarkTheme {}
|
2021-05-17 10:18:41 +00:00
|
|
|
|
2021-05-27 17:06:50 +00:00
|
|
|
readonly property real maxFactor: 2.0
|
|
|
|
readonly property real minFactor: 0.5
|
2021-05-04 18:31:15 +00:00
|
|
|
|
2021-05-27 17:06:50 +00:00
|
|
|
property real factor: 1.0
|
2021-05-17 10:18:41 +00:00
|
|
|
|
2021-05-27 17:06:50 +00:00
|
|
|
Component.onCompleted: {
|
|
|
|
Theme.palette = lightTheme
|
2021-06-01 10:01:47 +00:00
|
|
|
rootWindow.updatePosition();
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
2021-05-17 10:18:41 +00:00
|
|
|
|
2022-02-01 09:11:40 +00:00
|
|
|
QtObject {
|
|
|
|
id: appSectionType
|
|
|
|
readonly property int chat: 0
|
|
|
|
readonly property int community: 1
|
|
|
|
readonly property int wallet: 2
|
|
|
|
readonly property int browser: 3
|
2021-11-26 21:45:42 +00:00
|
|
|
readonly property int nodeManagement: 4
|
|
|
|
readonly property int profileSettings: 5
|
2022-02-01 09:11:40 +00:00
|
|
|
readonly property int apiDocumentation: 100
|
|
|
|
readonly property int demoApp: 101
|
|
|
|
}
|
|
|
|
|
|
|
|
Models {
|
|
|
|
id: models
|
|
|
|
}
|
|
|
|
|
|
|
|
function setActiveItem(sectionId) {
|
|
|
|
for (var i = 0; i < models.mainAppSectionsModel.count; i++) {
|
|
|
|
let item = models.mainAppSectionsModel.get(i)
|
|
|
|
if (item.sectionId !== sectionId)
|
|
|
|
{
|
|
|
|
models.mainAppSectionsModel.setProperty(i, "active", false)
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
|
|
|
models.mainAppSectionsModel.setProperty(i, "active", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-27 17:06:50 +00:00
|
|
|
StatusAppLayout {
|
|
|
|
id: appLayout
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
appNavBar: StatusAppNavBar {
|
|
|
|
height: rootWindow.height
|
2021-06-03 14:14:52 +00:00
|
|
|
|
2022-02-01 09:11:40 +00:00
|
|
|
communityTypeRole: "sectionType"
|
|
|
|
communityTypeValue: appSectionType.community
|
|
|
|
sectionModel: models.mainAppSectionsModel
|
2021-06-03 14:14:52 +00:00
|
|
|
|
2022-02-01 09:11:40 +00:00
|
|
|
regularNavBarButton: StatusNavBarTabButton {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
name: model.icon.length > 0? "" : model.name
|
|
|
|
icon.name: model.icon
|
|
|
|
icon.source: model.image
|
|
|
|
tooltip.text: model.name
|
|
|
|
autoExclusive: true
|
|
|
|
checked: model.active
|
|
|
|
badge.value: model.notificationsCount
|
|
|
|
badge.visible: model.hasNotification
|
|
|
|
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
|
|
|
|
badge.border.width: 2
|
|
|
|
onClicked: {
|
|
|
|
stackView.clear()
|
|
|
|
if(model.sectionType === appSectionType.apiDocumentation)
|
|
|
|
{
|
2021-05-27 17:06:50 +00:00
|
|
|
stackView.push(libraryDocumentationCmp)
|
2022-02-01 09:11:40 +00:00
|
|
|
rootWindow.setActiveItem(sectionId)
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
2022-02-01 09:11:40 +00:00
|
|
|
else if(model.sectionType === appSectionType.demoApp)
|
|
|
|
{
|
2021-05-31 12:55:01 +00:00
|
|
|
stackView.push(demoAppCmp)
|
2022-02-01 09:11:40 +00:00
|
|
|
rootWindow.setActiveItem(model.sectionId)
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
2022-02-01 09:11:40 +00:00
|
|
|
}
|
2021-05-05 07:37:01 +00:00
|
|
|
}
|
2021-05-17 10:18:41 +00:00
|
|
|
|
2021-05-27 17:06:50 +00:00
|
|
|
appView: StackView {
|
|
|
|
id: stackView
|
|
|
|
anchors.fill: parent
|
|
|
|
initialItem: libraryDocumentationCmp
|
2021-05-17 10:18:41 +00:00
|
|
|
}
|
|
|
|
|
2021-05-27 17:06:50 +00:00
|
|
|
ThemeSwitch {
|
|
|
|
anchors.top: parent.top
|
2021-05-21 12:38:47 +00:00
|
|
|
anchors.topMargin: 32
|
2021-05-27 17:06:50 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 32
|
|
|
|
onCheckedChanged: {
|
|
|
|
if (Theme.palette === rootWindow.lightTheme) {
|
|
|
|
Theme.palette = rootWindow.darkTheme
|
|
|
|
} else {
|
|
|
|
Theme.palette = rootWindow.lightTheme
|
2021-05-04 18:31:15 +00:00
|
|
|
}
|
|
|
|
}
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: libraryDocumentationCmp
|
|
|
|
|
|
|
|
StatusAppTwoPanelLayout {
|
2022-01-18 19:54:45 +00:00
|
|
|
id: mainPageView
|
|
|
|
|
|
|
|
function page(name) {
|
|
|
|
viewLoader.source = Qt.resolvedUrl("./pages/" + name + "Page.qml");
|
|
|
|
}
|
|
|
|
function control(name) {
|
|
|
|
viewLoader.source = Qt.resolvedUrl("./controls/" + name + ".qml");
|
|
|
|
}
|
2021-05-27 17:06:50 +00:00
|
|
|
|
|
|
|
leftPanel: Item {
|
|
|
|
anchors.fill: parent
|
|
|
|
ScrollView {
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
contentHeight: navigation.height + 56
|
|
|
|
contentWidth: navigation.width
|
|
|
|
clip: true
|
|
|
|
Column {
|
|
|
|
id: navigation
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 48
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
spacing: 0
|
|
|
|
|
2021-06-17 13:04:18 +00:00
|
|
|
StatusListSectionHeadline { text: "StatusQ.Core" }
|
2021-05-27 17:06:50 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "Icons"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.control(title);
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
|
|
|
|
2021-06-17 13:04:18 +00:00
|
|
|
StatusListSectionHeadline { text: "StatusQ.Layout" }
|
2021-05-27 17:06:50 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "Layouts"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.control(title.substring(0, title.length - 1));
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
feat(Layout): introduce StatusAppNavBar
This commit introduces a new `StatusAppNavBar` component that can be used
to create a Status application's tab bar for dedicated tab sections such as
chat, profile, wallet etc.
The component is build in a way that it support declarative and imperative usage
where necessary.
In its most simple form, a `StatusAppNavBar` comes with a single tab button
for the chat section. Such button has to be of type `StatusNavBarTabButton`:
```qml
import StatusQ.Layout 0.1
StatusAppNavBar {
navBarChatButton: StatusNavBarTabButton {
icon.name: "chat"
badge.value: 33
badge.visible: true
tooltip.text: "Chat"
}
}
```
In addition, it's possible to specify a list of `StatusNavBarTabButton` for
other sections of the application using the `navBarTabButtons` property:
```qml
StatusAppNavBar {
...
navBarTabButtons: [
StatusNavBarTabButton {
icon.name: "wallet"
tooltip.text: "Wallet"
},
StatusNavBarTabButton {
icon.name: "browser"
tooltip.text: "Browser"
},
StatusNavBarTabButton {
icon.name: "status-update"
tooltip.text: "Timeline"
}
]
}
```
Lastly, when desired to render tabs for Status community, which can grow
in size, `StatusAppNavBar` exposes a list via the `navBarCommunityTabButtons`
property that can have a `model` and a `delegate`. The `delegate` should also
be a `StatusNavBarTabButton`:
```qml
StatusAppNavBar {
...
navBarCommunityTabButtons.model: someModel.communities
navBarCommunityTabButtons.delegate: StatusNavBarTabButton {
name: model.name
tooltip.text: model.name
anchors.horizontalCenter: parent.horizontalCenter
}
}
```
The amount of community tab buttons can grow as they need until their dedicated
area becomes scrollable, at which point all `navBarTabButtons` will stick to the
bottom of `StatusAppNavBar`.
Closes #18
2021-05-11 14:25:46 +00:00
|
|
|
|
2021-06-17 13:04:18 +00:00
|
|
|
StatusListSectionHeadline { text: "StatusQ.Controls" }
|
2021-05-27 17:06:50 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "Buttons"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.control(title);
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
2021-08-31 15:12:28 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "StatusSwitchTab"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page("StatusTabSwitch");
|
2021-08-31 15:12:28 +00:00
|
|
|
}
|
2021-10-25 12:54:00 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "StatusChatCommandButton"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-10-25 12:54:00 +00:00
|
|
|
}
|
2021-05-27 17:06:50 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "Controls"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.control(title);
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
2021-10-25 11:26:36 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "StatusTabBarIconButton"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-10-25 11:26:36 +00:00
|
|
|
}
|
2021-07-23 09:44:38 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "StatusInput"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-07-23 09:44:38 +00:00
|
|
|
}
|
2021-10-12 15:29:40 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "StatusSelect"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-10-12 15:29:40 +00:00
|
|
|
}
|
2021-10-13 09:39:15 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "StatusAccountSelector"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-10-13 09:39:15 +00:00
|
|
|
}
|
2021-10-13 14:33:22 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "StatusAssetSelector"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-10-13 14:33:22 +00:00
|
|
|
}
|
2021-10-14 08:46:04 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "StatusColorSelector"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-10-14 08:46:04 +00:00
|
|
|
}
|
2021-10-27 11:06:54 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "StatusWalletColorButton"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-10-27 11:06:54 +00:00
|
|
|
}
|
2021-10-27 11:19:55 +00:00
|
|
|
StatusNavigationListItem {
|
2022-01-18 19:54:45 +00:00
|
|
|
title: "StatusWalletColorSelect"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-10-27 11:19:55 +00:00
|
|
|
}
|
2022-01-18 18:06:00 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusPasswordStrengthIndicator"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
2021-06-17 13:04:18 +00:00
|
|
|
StatusListSectionHeadline { text: "StatusQ.Components" }
|
2021-10-13 10:51:54 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusAddress"
|
2022-01-18 19:54:45 +00:00
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-10-13 10:51:54 +00:00
|
|
|
}
|
2021-05-27 17:06:50 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "List Items"
|
2022-01-18 19:54:45 +00:00
|
|
|
selected: viewLoader.source.toString().includes(title.replace(/\s+/g, ''))
|
|
|
|
onClicked: mainPageView.control(title.replace(/\s+/g, ''));
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
2021-06-14 11:30:42 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusChatInfoToolBar"
|
2022-01-18 19:54:45 +00:00
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-06-14 11:30:42 +00:00
|
|
|
}
|
2021-05-27 17:06:50 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "Others"
|
2022-01-18 19:54:45 +00:00
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.control(title);
|
2021-05-04 18:31:15 +00:00
|
|
|
}
|
2021-08-31 11:46:15 +00:00
|
|
|
StatusNavigationListItem {
|
2021-09-07 11:34:35 +00:00
|
|
|
title: "StatusExpandableItem"
|
2022-01-18 19:54:45 +00:00
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page("StatusExpandableSettingsItem");
|
2021-08-31 11:46:15 +00:00
|
|
|
}
|
2021-06-17 13:04:18 +00:00
|
|
|
StatusListSectionHeadline { text: "StatusQ.Popup" }
|
2021-06-02 10:41:31 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusPopupMenu"
|
2022-01-18 19:54:45 +00:00
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-06-02 10:41:31 +00:00
|
|
|
}
|
2021-06-14 12:10:36 +00:00
|
|
|
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusModal"
|
2022-01-18 19:54:45 +00:00
|
|
|
selected: viewLoader.source.toString().includes("Popups")
|
|
|
|
onClicked: mainPageView.control("Popups");
|
2021-06-14 12:10:36 +00:00
|
|
|
}
|
2021-10-28 13:25:49 +00:00
|
|
|
StatusListSectionHeadline { text: "StatusQ.Platform" }
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusMacNotification"
|
2022-01-18 19:54:45 +00:00
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
2021-10-28 13:25:49 +00:00
|
|
|
}
|
2021-05-04 18:31:15 +00:00
|
|
|
}
|
|
|
|
}
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
2021-05-04 18:31:15 +00:00
|
|
|
|
2021-05-27 17:06:50 +00:00
|
|
|
rightPanel: Item {
|
|
|
|
id: rightPanel
|
|
|
|
anchors.fill: parent
|
|
|
|
ScrollView {
|
2021-07-08 11:42:08 +00:00
|
|
|
anchors.fill: parent
|
2021-05-27 17:06:50 +00:00
|
|
|
contentHeight: (pageWrapper.height + pageWrapper.anchors.topMargin) * rootWindow.factor
|
2021-07-08 11:42:08 +00:00
|
|
|
contentWidth: (pageWrapper.width * rootWindow.factor)
|
2021-05-27 17:06:50 +00:00
|
|
|
clip: true
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: pageWrapper
|
|
|
|
width: rightPanel.width
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 64
|
2022-01-18 19:54:45 +00:00
|
|
|
height: Math.max(rootWindow.height, viewLoader.height + 128)
|
2021-05-27 17:06:50 +00:00
|
|
|
scale: rootWindow.factor
|
|
|
|
Loader {
|
2022-01-18 19:54:45 +00:00
|
|
|
id: viewLoader
|
2021-05-27 17:06:50 +00:00
|
|
|
anchors.centerIn: parent
|
2022-01-31 19:55:31 +00:00
|
|
|
source: mainPageView.control("Icons")
|
|
|
|
onSourceChanged: {
|
|
|
|
if (source.toString().includes("Icons")) {
|
|
|
|
item.iconColor = Theme.palette.primaryColor1;
|
|
|
|
}
|
|
|
|
}
|
2021-05-17 10:18:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-05-04 18:31:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Action {
|
|
|
|
shortcut: "CTRL+="
|
|
|
|
onTriggered: {
|
|
|
|
if (rootWindow.factor < 2.0)
|
|
|
|
rootWindow.factor += 0.2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Action {
|
|
|
|
shortcut: "CTRL+-"
|
|
|
|
onTriggered: {
|
|
|
|
if (rootWindow.factor > 0.5)
|
|
|
|
rootWindow.factor -= 0.2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Action {
|
|
|
|
shortcut: "CTRL+0"
|
|
|
|
onTriggered: {
|
|
|
|
rootWindow.factor = 1.0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-31 12:55:01 +00:00
|
|
|
Component {
|
|
|
|
id: demoAppCmp
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
anchors.fill: parent
|
|
|
|
color: Theme.palette.baseColor3
|
2021-08-27 13:21:00 +00:00
|
|
|
|
|
|
|
Row {
|
|
|
|
id: platformSwitch
|
|
|
|
anchors.left: demoApp.left
|
|
|
|
anchors.bottom: demoApp.top
|
|
|
|
anchors.bottomMargin: 20
|
|
|
|
spacing: 2
|
|
|
|
|
|
|
|
Text {
|
|
|
|
text: "OSX"
|
|
|
|
font.pixelSize: 15
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusSwitch {
|
|
|
|
onCheckedChanged: {
|
|
|
|
if (checked) {
|
|
|
|
demoApp.titleStyle = "windows"
|
|
|
|
} else {
|
|
|
|
demoApp.titleStyle = "osx"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
|
|
|
text: "Win"
|
|
|
|
font.pixelSize: 15
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
}
|
2021-05-31 12:55:01 +00:00
|
|
|
DemoApp {
|
|
|
|
id: demoApp
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
}
|
|
|
|
DropShadow {
|
|
|
|
anchors.fill: demoApp
|
|
|
|
source: demoApp
|
|
|
|
horizontalOffset: 0
|
|
|
|
verticalOffset: 5
|
|
|
|
radius: 20
|
|
|
|
samples: 20
|
|
|
|
color: "#22000000"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-06-01 10:01:47 +00:00
|
|
|
|
|
|
|
StatusMacTrafficLights {
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.margins: 13
|
|
|
|
|
2021-08-27 13:21:00 +00:00
|
|
|
visible: Qt.platform.os == "osx"
|
|
|
|
|
|
|
|
onClose: {
|
|
|
|
rootWindow.close()
|
|
|
|
}
|
|
|
|
|
|
|
|
onMinimised: {
|
|
|
|
rootWindow.showMinimized()
|
|
|
|
}
|
|
|
|
|
|
|
|
onMaximized: {
|
|
|
|
rootWindow.toggleFullScreen()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusWindowsTitleBar {
|
|
|
|
anchors.top: parent.top
|
|
|
|
width: parent.width
|
|
|
|
|
|
|
|
visible: Qt.platform.os == "windows"
|
|
|
|
|
2021-06-01 10:01:47 +00:00
|
|
|
onClose: {
|
|
|
|
rootWindow.close()
|
|
|
|
}
|
|
|
|
|
|
|
|
onMinimised: {
|
|
|
|
rootWindow.showMinimized()
|
|
|
|
}
|
|
|
|
|
|
|
|
onMaximized: {
|
|
|
|
rootWindow.toggleFullScreen()
|
|
|
|
}
|
|
|
|
}
|
2021-05-04 18:31:15 +00:00
|
|
|
}
|