UbuntuShape should support "mounts"
Bug #1157720 reported by
Michał Sawicz
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Opinion
|
Wishlist
|
Loïc Molinari |
Bug Description
When an image is of different aspect ratio than the UbuntuShape, it should be possible to provide a "mount" - a background image that will be drawn behind the image itself.
This could be done by using the UbuntuShape with just the mount image and overlaying a cropped image on top of the UbuntuShape, but building it into the UbuntuShape should be more performant and we'd need to wrap the UbuntuShape as a QML component otherwise.
I propose the following addition to the UbuntuShape API:
UbuntuShape {
property Image mount: undefined
}
Changed in ubuntu-ui-toolkit: | |
assignee: | nobody → Ubuntu SDK team (ubuntu-sdk-team) |
description: | updated |
Changed in ubuntu-ui-toolkit: | |
assignee: | Ubuntu SDK team (ubuntu-sdk-team) → Florian Boucault (fboucault) |
importance: | Undecided → Wishlist |
Changed in ubuntu-ui-toolkit: | |
status: | New → Opinion |
Changed in ubuntu-ui-toolkit: | |
status: | Opinion → New |
Changed in ubuntu-ui-toolkit: | |
assignee: | Florian Boucault (fboucault) → nobody |
Changed in ubuntu-ui-toolkit: | |
assignee: | nobody → Loïc Molinari (loic.molinari) |
tags: | added: shape |
Changed in ubuntu-ui-toolkit: | |
status: | New → Triaged |
Changed in ubuntu-ui-toolkit: | |
status: | Triaged → Opinion |
To post a comment you must log in.
So, what you want is something like this, but inside an UbuntuShape?
Item {
id: shape
Image {
id: mount
anchors.fill: shape
source: "mountSource.png"
}
Image {
id: crop
anchors {
top: parent.top
bottom: parent.bottom
}
// crop.width < shape.width
source: "cropSource.png"
}
}
What you propose that you could put the crop image on top of the UbuntuShape does not work if (as in the example) the cropped image still touches at least one of the edges of the UbuntuShape, because the shadow/shape of the UbuntuShape will not be applied to the cropped image there.