mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Prevent NPanel dragging when popup are open.
This commit is contained in:
@@ -52,9 +52,11 @@ NIconButton {
|
||||
width: root.width * 0.8
|
||||
height: width
|
||||
source: {
|
||||
if (customIconPath !== "") return customIconPath;
|
||||
if (useDistroLogo) return DistroLogoService.osLogo;
|
||||
return "";
|
||||
if (customIconPath !== "")
|
||||
return customIconPath
|
||||
if (useDistroLogo)
|
||||
return DistroLogoService.osLogo
|
||||
return ""
|
||||
}
|
||||
visible: source !== ""
|
||||
smooth: true
|
||||
|
||||
@@ -26,7 +26,7 @@ Popup {
|
||||
height: content.implicitHeight + padding * 2
|
||||
padding: Style.marginXL * scaling
|
||||
modal: true
|
||||
|
||||
|
||||
onOpened: {
|
||||
// Mark this popup has opened in the PanelService
|
||||
PanelService.willOpenPopup(widgetSettings)
|
||||
@@ -120,7 +120,7 @@ Popup {
|
||||
}
|
||||
}
|
||||
|
||||
function loadWidgetSettings() {
|
||||
function loadWidgetSettings() {
|
||||
const widgetSettingsMap = {
|
||||
"ActiveWindow": "WidgetSettings/ActiveWindowSettings.qml",
|
||||
"Battery": "WidgetSettings/BatterySettings.qml",
|
||||
@@ -147,5 +147,4 @@ Popup {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginM * scaling
|
||||
|
||||
@@ -79,9 +78,9 @@ ColumnLayout {
|
||||
id: iconPicker
|
||||
initialIcon: valueIcon
|
||||
onIconSelected: iconName => {
|
||||
valueIcon = iconName
|
||||
valueCustomIconPath = ""
|
||||
}
|
||||
valueIcon = iconName
|
||||
valueCustomIconPath = ""
|
||||
}
|
||||
}
|
||||
|
||||
NFilePicker {
|
||||
@@ -89,4 +88,4 @@ ColumnLayout {
|
||||
title: "Select a custom icon"
|
||||
onAccepted: paths => valueCustomIconPath = paths[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ NPanel {
|
||||
|
||||
panelKeyboardFocus: true
|
||||
|
||||
draggable: true
|
||||
draggable: (PanelService.openedPopup === null)
|
||||
|
||||
// Tabs enumeration, order is NOT relevant
|
||||
enum Tab {
|
||||
|
||||
@@ -18,7 +18,8 @@ NPanel {
|
||||
panelAnchorHorizontalCenter: true
|
||||
panelAnchorVerticalCenter: true
|
||||
panelKeyboardFocus: true
|
||||
draggable: true
|
||||
|
||||
draggable: (PanelService.openedPopup === null)
|
||||
|
||||
panelContent: Rectangle {
|
||||
id: wallpaperPanel
|
||||
|
||||
@@ -26,7 +26,14 @@ Popup {
|
||||
y: (parent.height - height) * 0.5
|
||||
|
||||
modal: true
|
||||
clip: true
|
||||
|
||||
onOpened: {
|
||||
PanelService.willOpenPopup(root)
|
||||
}
|
||||
|
||||
onClosed: {
|
||||
PanelService.willClosePopup(root)
|
||||
}
|
||||
|
||||
function rgbToHsv(r, g, b) {
|
||||
r /= 255
|
||||
@@ -110,9 +117,9 @@ Popup {
|
||||
border.width: Math.max(1, Style.borderM * scaling)
|
||||
}
|
||||
|
||||
NScrollView {
|
||||
contentItem: NScrollView {
|
||||
id: scrollView
|
||||
anchors.fill: parent
|
||||
width: parent.width
|
||||
|
||||
verticalPolicy: ScrollBar.AlwaysOff
|
||||
horizontalPolicy: ScrollBar.AlwaysOff
|
||||
|
||||
Reference in New Issue
Block a user