|
|
|
@ -10,13 +10,9 @@ import FishUI 1.0 as FishUI
|
|
|
|
|
|
|
|
|
|
|
|
ControlCenterDialog {
|
|
|
|
ControlCenterDialog {
|
|
|
|
id: control
|
|
|
|
id: control
|
|
|
|
width: 450
|
|
|
|
|
|
|
|
height: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
minimumWidth: 450
|
|
|
|
width: 500
|
|
|
|
maximumWidth: 450
|
|
|
|
height: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 3
|
|
|
|
minimumHeight: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 2
|
|
|
|
|
|
|
|
maximumHeight: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
property var margin: 4 * Screen.devicePixelRatio
|
|
|
|
property var margin: 4 * Screen.devicePixelRatio
|
|
|
|
property point position: Qt.point(0, 0)
|
|
|
|
property point position: Qt.point(0, 0)
|
|
|
|
@ -80,7 +76,7 @@ ControlCenterDialog {
|
|
|
|
anchors.topMargin: FishUI.Units.largeSpacing * 1.5
|
|
|
|
anchors.topMargin: FishUI.Units.largeSpacing * 1.5
|
|
|
|
anchors.rightMargin: FishUI.Units.largeSpacing * 1.5
|
|
|
|
anchors.rightMargin: FishUI.Units.largeSpacing * 1.5
|
|
|
|
anchors.bottomMargin: FishUI.Units.largeSpacing
|
|
|
|
anchors.bottomMargin: FishUI.Units.largeSpacing
|
|
|
|
spacing: FishUI.Units.largeSpacing
|
|
|
|
spacing: FishUI.Units.largeSpacing * 1.5
|
|
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
Item {
|
|
|
|
id: topItem
|
|
|
|
id: topItem
|
|
|
|
@ -148,7 +144,7 @@ ControlCenterDialog {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
Item {
|
|
|
|
id: controlItem
|
|
|
|
id: cardItems
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
height: 110
|
|
|
|
height: 110
|
|
|
|
visible: wirelessItem.visible || bluetoothItem.visible
|
|
|
|
visible: wirelessItem.visible || bluetoothItem.visible
|
|
|
|
@ -160,7 +156,7 @@ ControlCenterDialog {
|
|
|
|
CardItem {
|
|
|
|
CardItem {
|
|
|
|
id: wirelessItem
|
|
|
|
id: wirelessItem
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.preferredWidth: contentItem.width / 3 - FishUI.Units.largeSpacing * 2
|
|
|
|
Layout.fillWidth: true
|
|
|
|
icon: FishUI.Theme.darkMode || checked ? "qrc:/images/dark/network-wireless-connected-100.svg"
|
|
|
|
icon: FishUI.Theme.darkMode || checked ? "qrc:/images/dark/network-wireless-connected-100.svg"
|
|
|
|
: "qrc:/images/light/network-wireless-connected-100.svg"
|
|
|
|
: "qrc:/images/light/network-wireless-connected-100.svg"
|
|
|
|
visible: network.wirelessHardwareEnabled
|
|
|
|
visible: network.wirelessHardwareEnabled
|
|
|
|
@ -175,7 +171,7 @@ ControlCenterDialog {
|
|
|
|
CardItem {
|
|
|
|
CardItem {
|
|
|
|
id: bluetoothItem
|
|
|
|
id: bluetoothItem
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.preferredWidth: contentItem.width / 3 - FishUI.Units.largeSpacing * 2
|
|
|
|
Layout.fillWidth: true
|
|
|
|
icon: FishUI.Theme.darkMode || checked ? "qrc:/images/dark/bluetooth-symbolic.svg"
|
|
|
|
icon: FishUI.Theme.darkMode || checked ? "qrc:/images/dark/bluetooth-symbolic.svg"
|
|
|
|
: "qrc:/images/light/bluetooth-symbolic.svg"
|
|
|
|
: "qrc:/images/light/bluetooth-symbolic.svg"
|
|
|
|
checked: false
|
|
|
|
checked: false
|
|
|
|
@ -186,7 +182,7 @@ ControlCenterDialog {
|
|
|
|
CardItem {
|
|
|
|
CardItem {
|
|
|
|
id: darkModeItem
|
|
|
|
id: darkModeItem
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.preferredWidth: contentItem.width / 3 - FishUI.Units.largeSpacing * 2
|
|
|
|
Layout.fillWidth: true
|
|
|
|
icon: FishUI.Theme.darkMode || checked ? "qrc:/images/dark/dark-mode.svg"
|
|
|
|
icon: FishUI.Theme.darkMode || checked ? "qrc:/images/dark/dark-mode.svg"
|
|
|
|
: "qrc:/images/light/dark-mode.svg"
|
|
|
|
: "qrc:/images/light/dark-mode.svg"
|
|
|
|
checked: FishUI.Theme.darkMode
|
|
|
|
checked: FishUI.Theme.darkMode
|
|
|
|
@ -194,10 +190,6 @@ ControlCenterDialog {
|
|
|
|
text: FishUI.Theme.darkMode ? qsTr("On") : qsTr("Off")
|
|
|
|
text: FishUI.Theme.darkMode ? qsTr("On") : qsTr("Off")
|
|
|
|
onClicked: appearance.switchDarkMode(!FishUI.Theme.darkMode)
|
|
|
|
onClicked: appearance.switchDarkMode(!FishUI.Theme.darkMode)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -295,8 +287,11 @@ ControlCenterDialog {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
RowLayout {
|
|
|
|
|
|
|
|
spacing: 0
|
|
|
|
|
|
|
|
|
|
|
|
Label {
|
|
|
|
Label {
|
|
|
|
id: timeLabel
|
|
|
|
id: timeLabel
|
|
|
|
|
|
|
|
leftPadding: FishUI.Units.smallSpacing / 2
|
|
|
|
|
|
|
|
|
|
|
|
Timer {
|
|
|
|
Timer {
|
|
|
|
interval: 1000
|
|
|
|
interval: 1000
|
|
|
|
@ -341,6 +336,7 @@ ControlCenterDialog {
|
|
|
|
Label {
|
|
|
|
Label {
|
|
|
|
text: battery.chargePercent + "%"
|
|
|
|
text: battery.chargePercent + "%"
|
|
|
|
color: FishUI.Theme.textColor
|
|
|
|
color: FishUI.Theme.textColor
|
|
|
|
|
|
|
|
rightPadding: FishUI.Units.smallSpacing / 2
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|