Introducing fragment shaders for image rounding.

This commit is contained in:
LemmyCook 2025-08-22 13:59:49 -04:00
parent 8f951946ea
commit b6379da96c
12 changed files with 193 additions and 31 deletions

View file

@ -109,14 +109,14 @@ Row {
visible: Settings.data.audio.showMiniplayerAlbumArt
Rectangle {
width: 16 * scaling
height: 16 * scaling
width: 18 * scaling
height: 18 * scaling
radius: width * 0.5
color: Color.transparent
antialiasing: true
clip: true
NImageRounded {
NImageCircled {
id: trackArt
visible: MediaService.trackArtUrl.toString() !== ""
anchors.fill: parent
@ -126,8 +126,6 @@ Row {
fallbackIcon: MediaService.isPlaying ? "pause" : "play_arrow"
borderWidth: 0
border.color: Color.transparent
imageRadius: width
antialiasing: true
}
// Fallback icon when no album art available

View file

@ -465,13 +465,12 @@ Loader {
}
}
NImageRounded {
NImageCircled {
anchors.centerIn: parent
width: 100 * scaling
height: 100 * scaling
imagePath: Settings.data.general.avatarImage
fallbackIcon: "person"
imageRadius: width * 0.5
}
// Hover animation

View file

@ -211,14 +211,13 @@ ColumnLayout {
Layout.preferredWidth: Style.baseWidgetSize * 2 * scaling
Layout.preferredHeight: Style.baseWidgetSize * 2 * scaling
NImageRounded {
NImageCircled {
imagePath: modelData.avatar_url || ""
anchors.fill: parent
anchors.margins: Style.marginXS * scaling
fallbackIcon: "person"
borderColor: Color.mPrimary
borderWidth: Math.max(1, Style.borderL * scaling)
imageRadius: width * 0.5
borderWidth: Math.max(1, Style.borderM * scaling)
}
}

View file

@ -44,13 +44,13 @@ ColumnLayout {
spacing: Style.marginL * scaling
// Avatar preview
NImageRounded {
NImageCircled {
width: 64 * scaling
height: 64 * scaling
imagePath: Settings.data.general.avatarImage
fallbackIcon: "person"
borderColor: Color.mPrimary
borderWidth: Math.max(1, Style.borderM)
borderWidth: Math.max(1, Style.borderM * scaling)
}
NTextInput {

View file

@ -164,7 +164,7 @@ NBox {
border.width: Math.max(1, Style.borderS * scaling)
clip: true
NImageRounded {
NImageCircled {
id: trackArt
visible: MediaService.trackArtUrl.toString() !== ""
@ -174,7 +174,6 @@ NBox {
fallbackIcon: "music_note"
borderColor: Color.mOutline
borderWidth: Math.max(1, Style.borderS * scaling)
imageRadius: width * 0.5
}
// Fallback icon when no album art available

View file

@ -28,7 +28,7 @@ NBox {
anchors.margins: Style.marginM * scaling
spacing: Style.marginM * scaling
NImageRounded {
NImageCircled {
width: Style.baseWidgetSize * 1.25 * scaling
height: Style.baseWidgetSize * 1.25 * scaling
imagePath: Settings.data.general.avatarImage