cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Matren
Responsive Resident
Responsive Resident

Minimum Size Icon

Hello Power App Community,

 

I want my apps' icons to have a minimum width when the screen size is changed. For example, when I open two apps in Windows and snap them to the side of the screen, so there are two apps side by side, the icons are too small. How would I configure them so that the icons' width never gets smaller than a certain size?

 

My current app display configuration is Display Scale to Fit - ON and Lock Aspect Ratio - OFF. I would prefer to continue to use those settings.

 

Also, I have a workaround solution where the user can click an icon to make the icons larger; however, I would like to automatically ensure that the icons never get smaller than a certain width when the screen is resized (e.g. snap to side of Windows screen), so the user doesn't have to click an icon.

 

Any suggestions?

 

Thanks for reading,
Matren

1 ACCEPTED SOLUTION

Accepted Solutions
TheRobRush
Super User
Super User

Not when you have Scaled to fit turned ON no, it will always just return to you the Design Width and not the actual width of display/window the app is running in. Best to turn that off when making responsive apps. Then you will get an accurate reading of the width/height of current display

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

View solution in original post

6 REPLIES 6
TheRobRush
Super User
Super User

These two references in height and width will establish a minimum or maximum size of a control in an app

 

Min(App.Width,2000)

 

Would return either app width, or 2000 whichever is smaller

 

 

Max(App.Width,2000)

 

Would return the larger of the two numbers (This is the one you would use, just change app.width to your previos size formula or value, and 2000 to minimum size you want to see )

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
Matren
Responsive Resident
Responsive Resident

Hi @TheRobRush,

 

Thanks for your reply! I think I'm missing something, or it didn't work. I used Max(App.Width, 35)

 

Here is some more information.

 

My icon width are normally set to 25. However, when the screen is snapped for a side by side view, the icons are relatively sized down and they are too small to see. I noticed that if I set the icons to 35 when the screen is snapped, then they are viewable. However, once I expand the app again to the full screen they are too big.

 

In summary, is there a way to alter the width of the icon from 25 (full app width) to an appropriate value when half-app width?

TheRobRush
Super User
Super User

I actually haven't used scale to fit in years now, and now remember why. I reference App.Width and App.Height for Height and width of most controls in my apps, IE) Height= App.Height *.025, that way my apps look accurate no matter what device they are displayed on. Can even rearrange app layout based on If(App.Height>App.Width), or change font sizes etc to really tailor best UI experience for different device types.  Was playing around in an app i set up to test your issue just now and really when you have scale to fit turned on there's nothing you can really reference to make the icons adaptive. Whether you have it full screen, or half, or quarter, or even a tiny little box in corner, App.Width will always just return the value of the design width and height, as will Parent.Width.

 

I know you wanted to keep those settings but I would recommend starting to work with scale to fit turned off, and lock orientation turned off (Unless you make an app you only want to be used in one orientation, then turn second one on) Otherwise I think you will just be stuck with Icons getting too small once the app shrinks past a certain point.

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
TheRobRush
Super User
Super User

This is how it would have looked, if scale to fit was turned off

 

 

Max(App.Width*.09, 60)

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
Matren
Responsive Resident
Responsive Resident

Hi @TheRobRush,

 

Thanks for your response. To confirm, is there anything in Power Apps that I can reference that would give me the width of the app? For example, it would say 1366 if the app was expanded to my laptop, or 683 (1366/2) if the app was snapped to the edge of my laptop's screen?

 

Thanks,
Matren

TheRobRush
Super User
Super User

Not when you have Scaled to fit turned ON no, it will always just return to you the Design Width and not the actual width of display/window the app is running in. Best to turn that off when making responsive apps. Then you will get an accurate reading of the width/height of current display

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,378)