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:
parent
91b355689c
commit
eea1586772
5 changed files with 129 additions and 4 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue