mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 14:05:38 -05:00
always center topbar widgets
This commit is contained in:
@@ -29,10 +29,8 @@ PanelWindow {
|
|||||||
if (fonts.indexOf("Material Symbols Rounded") === -1)
|
if (fonts.indexOf("Material Symbols Rounded") === -1)
|
||||||
ToastService.showError("Please install Material Symbols Rounded and Restart your Shell. See README.md for instructions");
|
ToastService.showError("Please install Material Symbols Rounded and Restart your Shell. See README.md for instructions");
|
||||||
|
|
||||||
// Connect to the force refresh signal
|
|
||||||
Prefs.forceTopBarLayoutRefresh.connect(function() {
|
Prefs.forceTopBarLayoutRefresh.connect(function() {
|
||||||
console.log("TopBar: Forcing layout refresh");
|
console.log("TopBar: Forcing layout refresh");
|
||||||
// Force layout recalculation by toggling visibility briefly
|
|
||||||
Qt.callLater(() => {
|
Qt.callLater(() => {
|
||||||
leftSection.visible = false;
|
leftSection.visible = false;
|
||||||
centerSection.visible = false;
|
centerSection.visible = false;
|
||||||
@@ -48,12 +46,11 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|
||||||
function onTopBarTransparencyChanged() {
|
function onTopBarTransparencyChanged() {
|
||||||
root.backgroundTransparency = Prefs.topBarTransparency;
|
root.backgroundTransparency = Prefs.topBarTransparency;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove old manual refresh handlers - ListModel updates are automatic
|
|
||||||
|
|
||||||
target: Prefs
|
target: Prefs
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,63 +150,73 @@ PanelWindow {
|
|||||||
readonly property bool spacingTight: validLayout && (leftToMediaGap < 150 || clockToRightGap < 100)
|
readonly property bool spacingTight: validLayout && (leftToMediaGap < 150 || clockToRightGap < 100)
|
||||||
readonly property bool overlapping: validLayout && (leftToMediaGap < 100 || clockToRightGap < 50)
|
readonly property bool overlapping: validLayout && (leftToMediaGap < 100 || clockToRightGap < 50)
|
||||||
|
|
||||||
// Helper functions - now uses per-instance enabled state from model
|
|
||||||
function getWidgetEnabled(enabled) {
|
function getWidgetEnabled(enabled) {
|
||||||
// Use the enabled state directly from the model
|
return enabled !== undefined ? enabled : true;
|
||||||
return enabled !== undefined ? enabled : true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWidgetVisible(widgetId) {
|
function getWidgetVisible(widgetId) {
|
||||||
// Some widgets have additional visibility conditions
|
|
||||||
switch (widgetId) {
|
switch (widgetId) {
|
||||||
case "launcherButton": return true
|
case "launcherButton":
|
||||||
case "workspaceSwitcher": return true // Simplified - was NiriService.niriAvailable
|
return true;
|
||||||
case "focusedWindow": return true
|
case "workspaceSwitcher":
|
||||||
case "clock": return true
|
return true;
|
||||||
case "music": return true // Simplified - was MprisController.activePlayer
|
case "focusedWindow":
|
||||||
case "weather": return true // Simplified - was complex weather condition
|
return true;
|
||||||
case "systemTray": return true
|
case "clock":
|
||||||
case "clipboard": return true
|
return true;
|
||||||
case "systemResources": return true
|
case "music":
|
||||||
case "notificationButton": return true
|
return true;
|
||||||
case "battery": return true
|
case "weather":
|
||||||
case "controlCenterButton": return true
|
return true;
|
||||||
default: return false
|
case "systemTray":
|
||||||
|
return true;
|
||||||
|
case "clipboard":
|
||||||
|
return true;
|
||||||
|
case "systemResources":
|
||||||
|
return true;
|
||||||
|
case "notificationButton":
|
||||||
|
return true;
|
||||||
|
case "battery":
|
||||||
|
return true;
|
||||||
|
case "controlCenterButton":
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWidgetComponent(widgetId) {
|
function getWidgetComponent(widgetId) {
|
||||||
switch (widgetId) {
|
switch (widgetId) {
|
||||||
case "launcherButton":
|
case "launcherButton":
|
||||||
return launcherButtonComponent
|
return launcherButtonComponent;
|
||||||
case "workspaceSwitcher":
|
case "workspaceSwitcher":
|
||||||
return workspaceSwitcherComponent
|
return workspaceSwitcherComponent;
|
||||||
case "focusedWindow":
|
case "focusedWindow":
|
||||||
return focusedWindowComponent
|
return focusedWindowComponent;
|
||||||
case "clock":
|
case "clock":
|
||||||
return clockComponent
|
return clockComponent;
|
||||||
case "music":
|
case "music":
|
||||||
return mediaComponent
|
return mediaComponent;
|
||||||
case "weather":
|
case "weather":
|
||||||
return weatherComponent
|
return weatherComponent;
|
||||||
case "systemTray":
|
case "systemTray":
|
||||||
return systemTrayComponent
|
return systemTrayComponent;
|
||||||
case "clipboard":
|
case "clipboard":
|
||||||
return clipboardComponent
|
return clipboardComponent;
|
||||||
case "systemResources":
|
case "systemResources":
|
||||||
return systemResourcesComponent
|
return systemResourcesComponent;
|
||||||
case "notificationButton":
|
case "notificationButton":
|
||||||
return notificationButtonComponent
|
return notificationButtonComponent;
|
||||||
case "battery":
|
case "battery":
|
||||||
return batteryComponent
|
return batteryComponent;
|
||||||
case "controlCenterButton":
|
case "controlCenterButton":
|
||||||
return controlCenterButtonComponent
|
return controlCenterButtonComponent;
|
||||||
case "spacer":
|
case "spacer":
|
||||||
return spacerComponent
|
return spacerComponent;
|
||||||
case "separator":
|
case "separator":
|
||||||
return separatorComponent
|
return separatorComponent;
|
||||||
default:
|
default:
|
||||||
return null
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,41 +240,147 @@ PanelWindow {
|
|||||||
model: Prefs.topBarLeftWidgetsModel
|
model: Prefs.topBarLeftWidgetsModel
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
|
property string widgetId: model.widgetId
|
||||||
|
|
||||||
anchors.verticalCenter: parent ? parent.verticalCenter : undefined
|
anchors.verticalCenter: parent ? parent.verticalCenter : undefined
|
||||||
active: topBarContent.getWidgetEnabled(model.enabled) && topBarContent.getWidgetVisible(model.widgetId)
|
active: topBarContent.getWidgetEnabled(model.enabled) && topBarContent.getWidgetVisible(model.widgetId)
|
||||||
sourceComponent: topBarContent.getWidgetComponent(model.widgetId)
|
sourceComponent: topBarContent.getWidgetComponent(model.widgetId)
|
||||||
|
|
||||||
property string widgetId: model.widgetId
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dynamic center section
|
Item {
|
||||||
Row {
|
|
||||||
id: centerSection
|
id: centerSection
|
||||||
|
|
||||||
height: parent.height
|
property var centerWidgets: []
|
||||||
spacing: Theme.spacingS
|
property int totalWidgets: 0
|
||||||
anchors.centerIn: parent
|
property real totalWidth: 0
|
||||||
|
property real spacing: Theme.spacingS
|
||||||
|
|
||||||
|
function updateLayout() {
|
||||||
|
centerWidgets = [];
|
||||||
|
totalWidgets = 0;
|
||||||
|
totalWidth = 0;
|
||||||
|
|
||||||
|
let allItemsReady = true;
|
||||||
|
for (let i = 0; i < centerRepeater.count; i++) {
|
||||||
|
let item = centerRepeater.itemAt(i);
|
||||||
|
if (item && item.active && item.item) {
|
||||||
|
if (item.item.width <= 0) {
|
||||||
|
allItemsReady = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
centerWidgets.push(item.item);
|
||||||
|
totalWidgets++;
|
||||||
|
totalWidth += item.item.width;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!allItemsReady) {
|
||||||
|
Qt.callLater(updateLayout);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (totalWidgets > 1)
|
||||||
|
totalWidth += spacing * (totalWidgets - 1);
|
||||||
|
|
||||||
|
positionWidgets();
|
||||||
|
}
|
||||||
|
|
||||||
|
function positionWidgets() {
|
||||||
|
if (totalWidgets === 0)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
let parentCenterX = width / 2;
|
||||||
|
if (totalWidgets % 2 === 1) {
|
||||||
|
let middleIndex = Math.floor(totalWidgets / 2);
|
||||||
|
let currentX = parentCenterX - (centerWidgets[middleIndex].width / 2);
|
||||||
|
centerWidgets[middleIndex].x = currentX;
|
||||||
|
centerWidgets[middleIndex].anchors.horizontalCenter = undefined;
|
||||||
|
currentX = centerWidgets[middleIndex].x;
|
||||||
|
for (let i = middleIndex - 1; i >= 0; i--) {
|
||||||
|
currentX -= (spacing + centerWidgets[i].width);
|
||||||
|
centerWidgets[i].x = currentX;
|
||||||
|
centerWidgets[i].anchors.horizontalCenter = undefined;
|
||||||
|
}
|
||||||
|
currentX = centerWidgets[middleIndex].x + centerWidgets[middleIndex].width;
|
||||||
|
for (let i = middleIndex + 1; i < totalWidgets; i++) {
|
||||||
|
currentX += spacing;
|
||||||
|
centerWidgets[i].x = currentX;
|
||||||
|
centerWidgets[i].anchors.horizontalCenter = undefined;
|
||||||
|
currentX += centerWidgets[i].width;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let leftMiddleIndex = (totalWidgets / 2) - 1;
|
||||||
|
let rightMiddleIndex = totalWidgets / 2;
|
||||||
|
let gapCenter = parentCenterX;
|
||||||
|
let halfSpacing = spacing / 2;
|
||||||
|
centerWidgets[leftMiddleIndex].x = gapCenter - halfSpacing - centerWidgets[leftMiddleIndex].width;
|
||||||
|
centerWidgets[leftMiddleIndex].anchors.horizontalCenter = undefined;
|
||||||
|
centerWidgets[rightMiddleIndex].x = gapCenter + halfSpacing;
|
||||||
|
centerWidgets[rightMiddleIndex].anchors.horizontalCenter = undefined;
|
||||||
|
let currentX = centerWidgets[leftMiddleIndex].x;
|
||||||
|
for (let i = leftMiddleIndex - 1; i >= 0; i--) {
|
||||||
|
currentX -= (spacing + centerWidgets[i].width);
|
||||||
|
centerWidgets[i].x = currentX;
|
||||||
|
centerWidgets[i].anchors.horizontalCenter = undefined;
|
||||||
|
}
|
||||||
|
currentX = centerWidgets[rightMiddleIndex].x + centerWidgets[rightMiddleIndex].width;
|
||||||
|
for (let i = rightMiddleIndex + 1; i < totalWidgets; i++) {
|
||||||
|
currentX += spacing;
|
||||||
|
centerWidgets[i].x = currentX;
|
||||||
|
centerWidgets[i].anchors.horizontalCenter = undefined;
|
||||||
|
currentX += centerWidgets[i].width;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
height: parent.height
|
||||||
|
width: parent.width
|
||||||
|
anchors.centerIn: parent
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
console.log("Center widgets model count:", Prefs.topBarCenterWidgetsModel.count)
|
console.log("Center widgets model count:", Prefs.topBarCenterWidgetsModel.count);
|
||||||
|
Qt.callLater(() => {
|
||||||
|
Qt.callLater(updateLayout);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
id: centerRepeater
|
||||||
|
|
||||||
model: Prefs.topBarCenterWidgetsModel
|
model: Prefs.topBarCenterWidgetsModel
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
|
property string widgetId: model.widgetId
|
||||||
|
|
||||||
anchors.verticalCenter: parent ? parent.verticalCenter : undefined
|
anchors.verticalCenter: parent ? parent.verticalCenter : undefined
|
||||||
active: topBarContent.getWidgetEnabled(model.enabled) && topBarContent.getWidgetVisible(model.widgetId)
|
active: topBarContent.getWidgetEnabled(model.enabled) && topBarContent.getWidgetVisible(model.widgetId)
|
||||||
sourceComponent: topBarContent.getWidgetComponent(model.widgetId)
|
sourceComponent: topBarContent.getWidgetComponent(model.widgetId)
|
||||||
|
onLoaded: {
|
||||||
property string widgetId: model.widgetId
|
if (item) {
|
||||||
|
item.onWidthChanged.connect(centerSection.updateLayout);
|
||||||
|
Qt.callLater(centerSection.updateLayout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onActiveChanged: {
|
||||||
|
Qt.callLater(centerSection.updateLayout);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
function onCountChanged() {
|
||||||
|
Qt.callLater(centerSection.updateLayout);
|
||||||
|
}
|
||||||
|
|
||||||
|
target: Prefs.topBarCenterWidgetsModel
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dynamic right section
|
|
||||||
Row {
|
Row {
|
||||||
id: rightSection
|
id: rightSection
|
||||||
|
|
||||||
@@ -275,82 +388,96 @@ PanelWindow {
|
|||||||
spacing: Theme.spacingXS
|
spacing: Theme.spacingXS
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
console.log("Right widgets model count:", Prefs.topBarRightWidgetsModel.count)
|
console.log("Right widgets model count:", Prefs.topBarRightWidgetsModel.count);
|
||||||
}
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: Prefs.topBarRightWidgetsModel
|
model: Prefs.topBarRightWidgetsModel
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
|
property string widgetId: model.widgetId
|
||||||
|
|
||||||
anchors.verticalCenter: parent ? parent.verticalCenter : undefined
|
anchors.verticalCenter: parent ? parent.verticalCenter : undefined
|
||||||
active: topBarContent.getWidgetEnabled(model.enabled) && topBarContent.getWidgetVisible(model.widgetId)
|
active: topBarContent.getWidgetEnabled(model.enabled) && topBarContent.getWidgetVisible(model.widgetId)
|
||||||
sourceComponent: topBarContent.getWidgetComponent(model.widgetId)
|
sourceComponent: topBarContent.getWidgetComponent(model.widgetId)
|
||||||
|
|
||||||
property string widgetId: model.widgetId
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Widget Components
|
|
||||||
Component {
|
Component {
|
||||||
id: launcherButtonComponent
|
id: launcherButtonComponent
|
||||||
|
|
||||||
LauncherButton {
|
LauncherButton {
|
||||||
isActive: appDrawerPopout ? appDrawerPopout.isVisible : false
|
isActive: appDrawerPopout ? appDrawerPopout.isVisible : false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (appDrawerPopout)
|
if (appDrawerPopout)
|
||||||
appDrawerPopout.toggle();
|
appDrawerPopout.toggle();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: workspaceSwitcherComponent
|
id: workspaceSwitcherComponent
|
||||||
|
|
||||||
WorkspaceSwitcher {
|
WorkspaceSwitcher {
|
||||||
screenName: root.screenName
|
screenName: root.screenName
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: focusedWindowComponent
|
id: focusedWindowComponent
|
||||||
|
|
||||||
FocusedApp {
|
FocusedApp {
|
||||||
compactMode: topBarContent.spacingTight
|
compactMode: topBarContent.spacingTight
|
||||||
availableWidth: topBarContent.leftToMediaGap
|
availableWidth: topBarContent.leftToMediaGap
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: clockComponent
|
id: clockComponent
|
||||||
|
|
||||||
Clock {
|
Clock {
|
||||||
compactMode: topBarContent.overlapping
|
compactMode: topBarContent.overlapping
|
||||||
onClockClicked: {
|
onClockClicked: {
|
||||||
centcomPopout.calendarVisible = !centcomPopout.calendarVisible;
|
centcomPopout.calendarVisible = !centcomPopout.calendarVisible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: mediaComponent
|
id: mediaComponent
|
||||||
|
|
||||||
Media {
|
Media {
|
||||||
compactMode: topBarContent.spacingTight || topBarContent.overlapping
|
compactMode: topBarContent.spacingTight || topBarContent.overlapping
|
||||||
onClicked: {
|
onClicked: {
|
||||||
centcomPopout.calendarVisible = !centcomPopout.calendarVisible;
|
centcomPopout.calendarVisible = !centcomPopout.calendarVisible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: weatherComponent
|
id: weatherComponent
|
||||||
|
|
||||||
Weather {
|
Weather {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
centcomPopout.calendarVisible = !centcomPopout.calendarVisible;
|
centcomPopout.calendarVisible = !centcomPopout.calendarVisible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: systemTrayComponent
|
id: systemTrayComponent
|
||||||
|
|
||||||
SystemTrayBar {
|
SystemTrayBar {
|
||||||
onMenuRequested: (menu, item, x, y) => {
|
onMenuRequested: (menu, item, x, y) => {
|
||||||
systemTrayContextMenu.currentTrayMenu = menu;
|
systemTrayContextMenu.currentTrayMenu = menu;
|
||||||
@@ -361,10 +488,12 @@ PanelWindow {
|
|||||||
menu.menuVisible = true;
|
menu.menuVisible = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: clipboardComponent
|
id: clipboardComponent
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: 40
|
width: 40
|
||||||
height: 30
|
height: 30
|
||||||
@@ -383,6 +512,7 @@ PanelWindow {
|
|||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: clipboardArea
|
id: clipboardArea
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
@@ -396,12 +526,16 @@ PanelWindow {
|
|||||||
duration: Theme.shortDuration
|
duration: Theme.shortDuration
|
||||||
easing.type: Theme.standardEasing
|
easing.type: Theme.standardEasing
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: systemResourcesComponent
|
id: systemResourcesComponent
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
spacing: Theme.spacingXS
|
spacing: Theme.spacingXS
|
||||||
|
|
||||||
@@ -416,11 +550,14 @@ PanelWindow {
|
|||||||
return processListPopout.toggle();
|
return processListPopout.toggle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: notificationButtonComponent
|
id: notificationButtonComponent
|
||||||
|
|
||||||
NotificationCenterButton {
|
NotificationCenterButton {
|
||||||
hasUnread: root.notificationCount > 0
|
hasUnread: root.notificationCount > 0
|
||||||
isActive: notificationCenter.notificationHistoryVisible
|
isActive: notificationCenter.notificationHistoryVisible
|
||||||
@@ -428,20 +565,24 @@ PanelWindow {
|
|||||||
notificationCenter.notificationHistoryVisible = !notificationCenter.notificationHistoryVisible;
|
notificationCenter.notificationHistoryVisible = !notificationCenter.notificationHistoryVisible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: batteryComponent
|
id: batteryComponent
|
||||||
|
|
||||||
Battery {
|
Battery {
|
||||||
batteryPopupVisible: batteryPopout.batteryPopupVisible
|
batteryPopupVisible: batteryPopout.batteryPopupVisible
|
||||||
onToggleBatteryPopup: {
|
onToggleBatteryPopup: {
|
||||||
batteryPopout.batteryPopupVisible = !batteryPopout.batteryPopupVisible;
|
batteryPopout.batteryPopupVisible = !batteryPopout.batteryPopupVisible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: controlCenterButtonComponent
|
id: controlCenterButtonComponent
|
||||||
|
|
||||||
ControlCenterButton {
|
ControlCenterButton {
|
||||||
isActive: controlCenterPopout.controlCenterVisible
|
isActive: controlCenterPopout.controlCenterVisible
|
||||||
onClicked: {
|
onClicked: {
|
||||||
@@ -449,27 +590,33 @@ PanelWindow {
|
|||||||
if (controlCenterPopout.controlCenterVisible) {
|
if (controlCenterPopout.controlCenterVisible) {
|
||||||
if (NetworkService.wifiEnabled)
|
if (NetworkService.wifiEnabled)
|
||||||
NetworkService.scanWifi();
|
NetworkService.scanWifi();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: spacerComponent
|
id: spacerComponent
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: 20
|
width: 20
|
||||||
height: 30
|
height: 30
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: separatorComponent
|
id: separatorComponent
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: 1
|
width: 1
|
||||||
height: 20
|
height: 20
|
||||||
color: Theme.outline
|
color: Theme.outline
|
||||||
opacity: 0.3
|
opacity: 0.3
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user