mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 00:12:50 -05:00
make show on overview top bar independent
This commit is contained in:
@@ -89,7 +89,7 @@ Singleton {
|
|||||||
property real cornerRadius: 12
|
property real cornerRadius: 12
|
||||||
property bool notificationOverlayEnabled: false
|
property bool notificationOverlayEnabled: false
|
||||||
property bool topBarAutoHide: false
|
property bool topBarAutoHide: false
|
||||||
property bool topBarOpenOnOverview: false
|
property bool topBarOpenOnOverview: true
|
||||||
property bool topBarVisible: true
|
property bool topBarVisible: true
|
||||||
property real topBarSpacing: 4
|
property real topBarSpacing: 4
|
||||||
property real topBarBottomGap: 0
|
property real topBarBottomGap: 0
|
||||||
@@ -253,7 +253,7 @@ Singleton {
|
|||||||
cornerRadius = settings.cornerRadius !== undefined ? settings.cornerRadius : 12
|
cornerRadius = settings.cornerRadius !== undefined ? settings.cornerRadius : 12
|
||||||
notificationOverlayEnabled = settings.notificationOverlayEnabled !== undefined ? settings.notificationOverlayEnabled : false
|
notificationOverlayEnabled = settings.notificationOverlayEnabled !== undefined ? settings.notificationOverlayEnabled : false
|
||||||
topBarAutoHide = settings.topBarAutoHide !== undefined ? settings.topBarAutoHide : false
|
topBarAutoHide = settings.topBarAutoHide !== undefined ? settings.topBarAutoHide : false
|
||||||
topBarOpenOnOverview = settings.topBarOpenOnOverview !== undefined ? settings.topBarOpenOnOverview : false
|
topBarOpenOnOverview = settings.topBarOpenOnOverview !== undefined ? settings.topBarOpenOnOverview : true
|
||||||
topBarVisible = settings.topBarVisible !== undefined ? settings.topBarVisible : true
|
topBarVisible = settings.topBarVisible !== undefined ? settings.topBarVisible : true
|
||||||
notificationTimeoutLow = settings.notificationTimeoutLow !== undefined ? settings.notificationTimeoutLow : 5000
|
notificationTimeoutLow = settings.notificationTimeoutLow !== undefined ? settings.notificationTimeoutLow : 5000
|
||||||
notificationTimeoutNormal = settings.notificationTimeoutNormal !== undefined ? settings.notificationTimeoutNormal : 5000
|
notificationTimeoutNormal = settings.notificationTimeoutNormal !== undefined ? settings.notificationTimeoutNormal : 5000
|
||||||
|
|||||||
@@ -578,71 +578,12 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Rectangle {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: Theme.spacingM
|
height: 1
|
||||||
visible: SettingsData.topBarAutoHide && CompositorService.isNiri
|
color: Theme.outline
|
||||||
|
opacity: 0.2
|
||||||
DankIcon {
|
|
||||||
name: "fullscreen"
|
|
||||||
size: Theme.iconSize
|
|
||||||
color: Theme.primary
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
Column {
|
|
||||||
width: parent.width - Theme.iconSize - Theme.spacingM
|
|
||||||
- overviewToggle.width - Theme.spacingM
|
|
||||||
spacing: Theme.spacingXS
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
text: "Open on Overview"
|
|
||||||
font.pixelSize: Theme.fontSizeLarge
|
|
||||||
font.weight: Font.Medium
|
|
||||||
color: Theme.surfaceText
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
text: "Always show the top bar when niri's overview is open"
|
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
|
||||||
color: Theme.surfaceVariantText
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
width: parent.width
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DankToggle {
|
|
||||||
id: overviewToggle
|
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
checked: SettingsData.topBarOpenOnOverview
|
|
||||||
onToggled: toggled => {
|
|
||||||
return SettingsData.setTopBarOpenOnOverview(
|
|
||||||
toggled)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Manual Visibility Toggle
|
|
||||||
StyledRect {
|
|
||||||
width: parent.width
|
|
||||||
height: topBarVisibilitySection.implicitHeight + Theme.spacingL * 2
|
|
||||||
radius: Theme.cornerRadius
|
|
||||||
color: Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g,
|
|
||||||
Theme.surfaceVariant.b, 0.3)
|
|
||||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g,
|
|
||||||
Theme.outline.b, 0.2)
|
|
||||||
border.width: 1
|
|
||||||
|
|
||||||
Column {
|
|
||||||
id: topBarVisibilitySection
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: Theme.spacingL
|
|
||||||
spacing: Theme.spacingM
|
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@@ -688,9 +629,64 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: parent.width
|
||||||
|
height: 1
|
||||||
|
color: Theme.outline
|
||||||
|
opacity: 0.2
|
||||||
|
visible: CompositorService.isNiri
|
||||||
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
width: parent.width
|
||||||
|
spacing: Theme.spacingM
|
||||||
|
visible: CompositorService.isNiri
|
||||||
|
|
||||||
|
DankIcon {
|
||||||
|
name: "fullscreen"
|
||||||
|
size: Theme.iconSize
|
||||||
|
color: Theme.primary
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
Column {
|
||||||
|
width: parent.width - Theme.iconSize - Theme.spacingM
|
||||||
|
- overviewToggle.width - Theme.spacingM
|
||||||
|
spacing: Theme.spacingXS
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: "Show on Overview"
|
||||||
|
font.pixelSize: Theme.fontSizeLarge
|
||||||
|
font.weight: Font.Medium
|
||||||
|
color: Theme.surfaceText
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: "Always show the top bar when niri's overview is open"
|
||||||
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
|
color: Theme.surfaceVariantText
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
width: parent.width
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DankToggle {
|
||||||
|
id: overviewToggle
|
||||||
|
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
checked: SettingsData.topBarOpenOnOverview
|
||||||
|
onToggled: toggled => {
|
||||||
|
return SettingsData.setTopBarOpenOnOverview(
|
||||||
|
toggled)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Spacing
|
// Spacing
|
||||||
StyledRect {
|
StyledRect {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|||||||
@@ -139,7 +139,19 @@ PanelWindow {
|
|||||||
|
|
||||||
property real backgroundTransparency: SettingsData.topBarTransparency
|
property real backgroundTransparency: SettingsData.topBarTransparency
|
||||||
property bool autoHide: SettingsData.topBarAutoHide
|
property bool autoHide: SettingsData.topBarAutoHide
|
||||||
property bool reveal: SettingsData.topBarVisible && (!autoHide || topBarMouseArea.containsMouse || hasActivePopout || (SettingsData.topBarOpenOnOverview && CompositorService.isNiri && NiriService.inOverview))
|
property bool reveal: {
|
||||||
|
// Handle Niri overview state first
|
||||||
|
if (CompositorService.isNiri && NiriService.inOverview) {
|
||||||
|
// If Show on Overview is enabled, show the bar
|
||||||
|
if (SettingsData.topBarOpenOnOverview) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
// If Show on Overview is disabled, hide the bar
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// Normal visibility logic when not in overview
|
||||||
|
return SettingsData.topBarVisible && (!autoHide || topBarMouseArea.containsMouse || hasActivePopout)
|
||||||
|
}
|
||||||
|
|
||||||
property var notepadInstance: null
|
property var notepadInstance: null
|
||||||
property bool notepadInstanceVisible: notepadInstance?.notepadVisible ?? false
|
property bool notepadInstanceVisible: notepadInstance?.notepadVisible ?? false
|
||||||
|
|||||||
Reference in New Issue
Block a user