Merge branch 'qt6_beyond_the_splash' of github.com:Ultimaker/Cura into qt6_beyond_the_splash

This commit is contained in:
Ghostkeeper 2022-04-12 14:11:36 +02:00
commit 6f83927ec3
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
18 changed files with 42 additions and 43 deletions

View file

@ -81,6 +81,7 @@ Item
source: (loggedIn && profile["profile_image_url"]) ? profile["profile_image_url"] : ""
outlineColor: loggedIn ? UM.Theme.getColor("account_widget_outline_active") : UM.Theme.getColor("lining")
maskColor: UM.Theme.getColor("main_window_header_background")
}
contentItem: Item

View file

@ -15,43 +15,44 @@ Item
property alias source: profileImage.source
property alias outlineColor: profileImageOutline.color
// This should be set to the color behind the image
// It fills the space around a rectangular avatar to make the image under it look circular
property alias maskColor: profileImageMask.color
property bool hasAvatar: source != ""
Rectangle
{
id: profileImageBackground
anchors.fill: parent
radius: width
color: "white"
}
Image
{
id: profileImage
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
visible: false
visible: hasAvatar
mipmap: true
}
Rectangle
UM.ColorImage
{
// This image is a rectangle with a hole in the middle.
// Since we don't have access to proper masking in QT6 yet this is used as a primitive masking replacement
id: profileImageMask
anchors.fill: parent
radius: width
color: hasAvatar ? "white" : "transparent"
source: UM.Theme.getIcon("CircleMask")
}
/*
TODO: Reimplement this without OpacityMask.
OpacityMask
{
anchors.fill: parent
source: profileImage
maskSource: profileImageMask
visible: hasAvatar
cached: true
}*/
UM.ColorImage
{
// This creates the circle outline around the image
id: profileImageOutline
anchors.centerIn: parent
// Make it a bit bigger than it has to, otherwise it sometimes shows a white border.
width: parent.width + 2
height: parent.height + 2
anchors.fill: parent
anchors.margins: .25
visible: hasAvatar
source: UM.Theme.getIcon("CircleOutline")
color: UM.Theme.getColor("account_widget_outline_active")

View file

@ -30,6 +30,7 @@ Column
height: UM.Theme.getSize("main_window_header").height
source: profile["profile_image_url"] ? profile["profile_image_url"] : ""
maskColor: UM.Theme.getColor("main_background")
outlineColor: UM.Theme.getColor("main_background")
}
Rectangle

View file

@ -732,7 +732,6 @@ Window
property variant exportUsbDialog: FileDialog
{
title: catalog.i18nc("@title:window", "Export All Materials")
selectExisting: false
nameFilters: ["Material archives (*.umm)", "All files (*)"]
onAccepted:
{

View file

@ -208,7 +208,6 @@ Item
anchors.verticalCenter: parent.verticalCenter
height: troubleshootingLabel.height
width: height
sourceSize.height: width
color: UM.Theme.getColor("text_link")
source: UM.Theme.getIcon("LinkExternal")
}