UbuntuShape should support "mounts"

Bug #1157720 reported by Michał Sawicz
6
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
}

Tags: shape
Michał Sawicz (saviq)
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)
Revision history for this message
Tim Peeters (tpeeters) wrote :

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.

Revision history for this message
Tim Peeters (tpeeters) wrote :

what is the use case? (example)

Revision history for this message
Michał Sawicz (saviq) wrote : Re: [Bug 1157720] Re: UbuntuShape should support "mounts"

W dniu 26.05.2013 13:14, Tim Peeters pisze:
> So, what you want is something like this, but inside an UbuntuShape?

Yup.

> 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.

Indeed.

> what is the use case? (example)

The Video lens is supposed to display horizontal videos (taken with the
phone camera / from the interwebs) in such a mount inside a vertical
tile to maintain consistency.

--
Michał Sawicz <email address hidden>
Canonical Services Ltd.

tags: added: shape
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
status: New → Triaged
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
status: Triaged → Opinion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.