openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Support non-quadratic images in ObjectPageHeader

Open sloewhite opened this issue 9 years ago • 4 comments

OpenUI5 version: 1.44.8

When the ObjectPageHeader is "snapped" any image (even non-quadratic ones) is squeezed to width and height of 3 rem.

image

Possible fix: The current CSS looks like this:

.sapUxAPObjectPageHeaderIdentifier .sapUxAPObjectPageHeaderObjectImageForce .sapUxAPObjectPageHeaderObjectImage, .sapUxAPObjectPageHeaderStickied .sapUxAPObjectPageHeaderIdentifier .sapUxAPObjectPageHeaderObjectImage {
    width: 3rem;
    height: 3rem;
    display: inline-block;
    margin-right: 1rem;
}

How about

.sapUxAPObjectPageHeaderIdentifier .sapUxAPObjectPageHeaderObjectImageForce .sapUxAPObjectPageHeaderObjectImage, .sapUxAPObjectPageHeaderStickied .sapUxAPObjectPageHeaderIdentifier .sapUxAPObjectPageHeaderObjectImage {
    max-width: 3rem;
    max-height: 3rem;
    width: initial;
    height: initial:
    display: inline-block;
    margin-right: 1rem;
}

sloewhite avatar Mar 21 '17 13:03 sloewhite

Hello mschleeweiss,

thank you for reporting this issue to us. We actually have a new control called sap.m.Avatar meant especially for this use case. Not all composites like the sap.uxap.ObjectPageHeader have been adjusted yet to use it. I think it will resolve your issue, plese check it out directly: https://openui5nightly.hana.ondemand.com/explored.html#/entity/sap.f.Avatar/samples

I Informed the responsible developer to make sure he is aware about this limitation. He will get back to you here if the issue is not addressed yet.

Otherwise please just use your workaround until the issue is centrally resolved with a future commit and patch set.

Kind Regards,

Michael

Michadelic avatar Mar 23 '17 16:03 Michadelic

internally tracked as BCP# 1770108821

Michadelic avatar Mar 23 '17 16:03 Michadelic

Hi mschleeweiss, Michael is right - we are going to change this behavior with the sap.f.Avatar control in the future, so no fixes are planned for the current behavior, because it will come out of the box with the change.

Regards, Mihail.

myordanov avatar Mar 24 '17 12:03 myordanov

Thank you for your reply. I played around with the sample avatars in the explored app and the behaviour with non-quadratic images seems to fit my needs.

sloewhite avatar Mar 24 '17 13:03 sloewhite