-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Cut User Picture to Circle #133
Comments
I'm pretty sure it's already possible to clip it using a circle mask, but it's already a very tiny icon and clipping like 30% of the picture makes it pretty unrecognizable.
|
No idea why adding this code to // FlatButton.qml
PlasmaCore.IconItem {
id: icon
source: control.iconName || control.iconSource || control.icon
implicitWidth: control._iconSize
implicitHeight: control._iconSize
anchors.centerIn: parent
colorGroup: PlasmaCore.Theme.ButtonColorGroup
// Crop the avatar to fit in a circle, like the lock and login screens
// but don't on software rendering where this won't render
// layer.enabled: faceIcon.GraphicsInfo.api !== GraphicsInfo.Software
layer.enabled: true
layer.effect: QtGraphicalEffects.OpacityMask {
// this Rectangle is a circle due to radius size
maskSource: Rectangle {
width: icon.width
height: icon.height
radius: height / 2
visible: false
}
}
} // SidebarView.qml
SidebarItem {
iconName: kuser.hasFaceIcon ? kuser.faceIconUrl : 'user-identity'
text: kuser.fullName
submenu: userMenu
iconSize: config.flatButtonSize
SidebarContextMenu {
id: userMenu |
For some reason, the circle crop doesn't work when the icon is the smaller size.
It would be Nice if the User Picture would be shown as a circle and not as it's full Squarnes
The text was updated successfully, but these errors were encountered: