Make avatar images rounded
This commit is contained in:
parent
81382b213c
commit
54b2673f9a
3 changed files with 24 additions and 33 deletions
|
|
@ -5,14 +5,27 @@ import Quickshell.Widgets
|
|||
import qs.Services
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
radius: width * 0.5
|
||||
|
||||
readonly property real scaling: Scaling.scale(screen)
|
||||
property string imagePath: ""
|
||||
property string fallbackIcon: ""
|
||||
property color borderColor: "transparent"
|
||||
property real borderWidth: 0
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginTiniest * scaling
|
||||
|
||||
// Border
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: parent.radius
|
||||
color: "transparent"
|
||||
border.color: parent.borderColor
|
||||
border.width: parent.borderWidth
|
||||
z: 10
|
||||
}
|
||||
|
||||
Image {
|
||||
id: img
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue