mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Added distro logo (for SidePanel widget)
BarTab: add toggle for distro logo replacement DistroLogoService: handle all logo detection logic SidePanelToggle: add support for distro logo WidgetLoader: fix small issue with with screen null warning
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import QtQuick.Effects
|
||||
import qs.Commons
|
||||
import qs.Widgets
|
||||
import qs.Services
|
||||
@@ -9,7 +11,7 @@ NIconButton {
|
||||
property ShellScreen screen
|
||||
property real scaling: 1.0
|
||||
|
||||
icon: "widgets"
|
||||
icon: Settings.data.bar.useDistroLogo ? "" : "widgets"
|
||||
tooltipText: "Open side panel"
|
||||
sizeRatio: 0.8
|
||||
|
||||
@@ -20,4 +22,25 @@ NIconButton {
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: PanelService.getPanel("sidePanel")?.toggle(screen)
|
||||
|
||||
// When enabled, draw the distro logo instead of the icon glyph
|
||||
IconImage {
|
||||
id: logo
|
||||
anchors.centerIn: parent
|
||||
width: root.width * 0.6
|
||||
height: width
|
||||
source: Settings.data.bar.useDistroLogo ? DistroLogoService.osLogo : ""
|
||||
visible: false //Settings.data.bar.useDistroLogo && source !== ""
|
||||
smooth: true
|
||||
}
|
||||
|
||||
MultiEffect {
|
||||
anchors.fill: logo
|
||||
source: logo
|
||||
//visible: logo.visible
|
||||
colorization: 1
|
||||
brightness: 1
|
||||
saturation: 1
|
||||
colorizationColor: root.hovering ? Color.mSurfaceVariant : Color.mOnSurface
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,6 +97,15 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Replace SidePanel toggle with distro logo"
|
||||
description: "Show distro logo instead of the SidePanel toggle button in the bar."
|
||||
checked: Settings.data.bar.useDistroLogo
|
||||
onToggled: checked => {
|
||||
Settings.data.bar.useDistroLogo = checked
|
||||
}
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
label: "Show Workspaces Labels"
|
||||
description: "Display the workspace name or index in the workspace indicator"
|
||||
|
||||
Reference in New Issue
Block a user