mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-22 04:29:01 +08:00
Add white background to thumbnails
Regardless of the theme, the thumbnail should always have a white background so that the author can base their colours on that. Also this properly renders transparent images with a white background so that the Ultimaker robot is visible again in the dark theme.
This commit is contained in:
parent
b07af898eb
commit
e2b6a3f411
@ -25,14 +25,11 @@ Item
|
|||||||
rightMargin: UM.Theme.getSize("wide_margin").width
|
rightMargin: UM.Theme.getSize("wide_margin").width
|
||||||
}
|
}
|
||||||
height: UM.Theme.getSize("toolbox_detail_header").height
|
height: UM.Theme.getSize("toolbox_detail_header").height
|
||||||
Image
|
Rectangle
|
||||||
{
|
{
|
||||||
id: thumbnail
|
id: thumbnail
|
||||||
width: UM.Theme.getSize("toolbox_thumbnail_medium").width
|
width: UM.Theme.getSize("toolbox_thumbnail_medium").width
|
||||||
height: UM.Theme.getSize("toolbox_thumbnail_medium").height
|
height: UM.Theme.getSize("toolbox_thumbnail_medium").height
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: details === null ? "" : (details.icon_url || "../images/logobot.svg")
|
|
||||||
mipmap: true
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: parent.top
|
top: parent.top
|
||||||
@ -40,6 +37,14 @@ Item
|
|||||||
leftMargin: UM.Theme.getSize("wide_margin").width
|
leftMargin: UM.Theme.getSize("wide_margin").width
|
||||||
topMargin: UM.Theme.getSize("wide_margin").height
|
topMargin: UM.Theme.getSize("wide_margin").height
|
||||||
}
|
}
|
||||||
|
color: white //Always a white background for image (regardless of theme).
|
||||||
|
Image
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
source: details === null ? "" : (details.icon_url || "../images/logobot.svg")
|
||||||
|
mipmap: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
|
Loading…
x
Reference in New Issue
Block a user