mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-07 04:15:26 +00:00
Shaders: path from root for easier maintenance + cleanup fallback icons
This commit is contained in:
@@ -139,7 +139,7 @@ Variants {
|
|||||||
property real screenWidth: width
|
property real screenWidth: width
|
||||||
property real screenHeight: height
|
property real screenHeight: height
|
||||||
|
|
||||||
fragmentShader: Qt.resolvedUrl("../../Shaders/qsb/wp_fade.frag.qsb")
|
fragmentShader: Qt.resolvedUrl(Quickshell.shellDir + "/Shaders/qsb/wp_fade.frag.qsb")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wipe transition shader
|
// Wipe transition shader
|
||||||
@@ -164,7 +164,7 @@ Variants {
|
|||||||
property real screenWidth: width
|
property real screenWidth: width
|
||||||
property real screenHeight: height
|
property real screenHeight: height
|
||||||
|
|
||||||
fragmentShader: Qt.resolvedUrl("../../Shaders/qsb/wp_wipe.frag.qsb")
|
fragmentShader: Qt.resolvedUrl(Quickshell.shellDir + "/Shaders/qsb/wp_wipe.frag.qsb")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disc reveal transition shader
|
// Disc reveal transition shader
|
||||||
@@ -191,7 +191,7 @@ Variants {
|
|||||||
property real screenWidth: width
|
property real screenWidth: width
|
||||||
property real screenHeight: height
|
property real screenHeight: height
|
||||||
|
|
||||||
fragmentShader: Qt.resolvedUrl("../../Shaders/qsb/wp_disc.frag.qsb")
|
fragmentShader: Qt.resolvedUrl(Quickshell.shellDir + "/Shaders/qsb/wp_disc.frag.qsb")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Diagonal stripes transition shader
|
// Diagonal stripes transition shader
|
||||||
@@ -218,7 +218,7 @@ Variants {
|
|||||||
property real screenWidth: width
|
property real screenWidth: width
|
||||||
property real screenHeight: height
|
property real screenHeight: height
|
||||||
|
|
||||||
fragmentShader: Qt.resolvedUrl("../../Shaders/qsb/wp_stripes.frag.qsb")
|
fragmentShader: Qt.resolvedUrl(Quickshell.shellDir + "/Shaders/qsb/wp_stripes.frag.qsb")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Animation for the transition progress
|
// Animation for the transition progress
|
||||||
|
|||||||
@@ -728,7 +728,7 @@ Loader {
|
|||||||
border.width: Math.max(1, Style.borderM * scaling)
|
border.width: Math.max(1, Style.borderM * scaling)
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
id: iconPower
|
id: iconPower
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
icon: "power"
|
icon: "power"
|
||||||
font.pointSize: Style.fontSizeXXXL * scaling
|
font.pointSize: Style.fontSizeXXXL * scaling
|
||||||
|
|||||||
@@ -205,14 +205,12 @@ Variants {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: Style.marginM * scaling
|
spacing: Style.marginM * scaling
|
||||||
|
|
||||||
// Avatar
|
// Image
|
||||||
NImageCircled {
|
NImageCircled {
|
||||||
id: appAvatar
|
|
||||||
Layout.preferredWidth: 40 * scaling
|
Layout.preferredWidth: 40 * scaling
|
||||||
Layout.preferredHeight: 40 * scaling
|
Layout.preferredHeight: 40 * scaling
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
imagePath: model.image && model.image !== "" ? model.image : ""
|
imagePath: model.image && model.image !== "" ? model.image : ""
|
||||||
fallbackIcon: ""
|
|
||||||
borderColor: Color.transparent
|
borderColor: Color.transparent
|
||||||
borderWidth: 0
|
borderWidth: 0
|
||||||
visible: (model.image && model.image !== "")
|
visible: (model.image && model.image !== "")
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ Text {
|
|||||||
property string icon: defaultIcon
|
property string icon: defaultIcon
|
||||||
|
|
||||||
text: {
|
text: {
|
||||||
if (Bootstrap.icons[icon] === undefined) {
|
if (icon === undefined || Bootstrap.icons[icon] === undefined) {
|
||||||
Logger.warn("Icon", `"${icon}"`, "doesn't exist in the bootstrap font")
|
Logger.warn("Icon", `"${icon}"`, "doesn't exist in the bootstrap font")
|
||||||
Logger.callStack()
|
Logger.callStack()
|
||||||
return Bootstrap.icons[defaultIcon]
|
return Bootstrap.icons[defaultIcon]
|
||||||
|
|||||||
@@ -46,18 +46,20 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property real imageOpacity: root.opacity
|
property real imageOpacity: root.opacity
|
||||||
fragmentShader: Qt.resolvedUrl("../Shaders/qsb/circled_image.frag.qsb")
|
fragmentShader: Qt.resolvedUrl(Quickshell.shellDir + "/Shaders/qsb/circled_image.frag.qsb")
|
||||||
supportsAtlasTextures: false
|
supportsAtlasTextures: false
|
||||||
blending: true
|
blending: true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback icon
|
// Fallback icon
|
||||||
NIcon {
|
Loader {
|
||||||
anchors.centerIn: parent
|
active: fallbackIcon !== undefined && fallbackIcon !== "" && (imagePath === undefined || imagePath === "")
|
||||||
icon: fallbackIcon
|
sourceComponent: NIcon {
|
||||||
font.pointSize: fallbackIconSize
|
anchors.centerIn: parent
|
||||||
visible: fallbackIcon !== undefined && fallbackIcon !== "" && (imagePath === undefined || imagePath === "")
|
icon: fallbackIcon
|
||||||
z: 0
|
font.pointSize: fallbackIconSize
|
||||||
|
z: 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ Rectangle {
|
|||||||
property real itemHeight: root.height
|
property real itemHeight: root.height
|
||||||
property real cornerRadius: root.radius
|
property real cornerRadius: root.radius
|
||||||
property real imageOpacity: root.opacity
|
property real imageOpacity: root.opacity
|
||||||
fragmentShader: Qt.resolvedUrl("../Shaders/qsb/rounded_image.frag.qsb")
|
fragmentShader: Qt.resolvedUrl(Quickshell.shellDir + "/Shaders/qsb/rounded_image.frag.qsb")
|
||||||
|
|
||||||
// Qt6 specific properties - ensure proper blending
|
// Qt6 specific properties - ensure proper blending
|
||||||
supportsAtlasTextures: false
|
supportsAtlasTextures: false
|
||||||
@@ -72,12 +72,14 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fallback icon
|
// Fallback icon
|
||||||
NIcon {
|
Loader {
|
||||||
anchors.centerIn: parent
|
active: fallbackIcon !== undefined && fallbackIcon !== "" && (imagePath === undefined || imagePath === "")
|
||||||
icon: fallbackIcon
|
sourceComponent: NIcon {
|
||||||
font.pointSize: fallbackIconSize
|
anchors.centerIn: parent
|
||||||
visible: fallbackIcon !== undefined && fallbackIcon !== "" && (imagePath === undefined || imagePath === "")
|
icon: fallbackIcon
|
||||||
z: 0
|
font.pointSize: fallbackIconSize
|
||||||
|
z: 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user