Rounded card corners 'hack'

the attached zip has four svg corner icons if interested

rounded card corners.fmp12.zip (294.0 KB)

8 Likes

nice work. It's a great visual effect.

1 Like

Yes, the (rectangular) corners are ugly. I also use this technique for my self-destructing messages. I have a script to display the messages, in which I can specify the icon, the icon color, the message and the duration of the display via script parameters. There is a button on the card window that continues the script, so you can also click on the message to make it go away prematurely.

I use these messages for notifications that do not necessarily need an interaction with the user, like "The PDF/Backup has been saved" or "The Record has been duplicated".

Wy not just send OS notifications instead?

Yes, that would be an option too. But I don't like them very much. I like to have my messages within my software where I have full control.

2 Likes

Can't put a chart in an OS notification :slight_smile:

1 Like

Awesome work, very effective, though that tiny visual imperfection where the background colour doesn't match is something I find hard to get past ! This is where a simple change to the product would be great, an option for roundedness of a card window corner :slight_smile:

I was wondering if this kind of thing were technically possible without a product change, as I enjoy these kinds of ponderings...

Given your parent window, the size of the card, and it's positioning, it is possible to attain the 4 coordinates of the card corners, from the perspective of the parent window.

Knowing these coordinates, the next step would be to poll somehow for the screen colour at these coordinates, I'm thinking MBS must surely have some function capable of this...

Assuming you can attain those colours, each corner of the card could be a web viewer, with the rounded SVG within, however the outer part might just be a background fill colour of the web viewer page, which could be set to the corresponding coordinates colour. Thus each corner can represent a different background colour, giving the appearance of it having true roundedness...

Now, I welcome someone taking on the challenge and producing a sample file :slight_smile:

1 Like

We don't really want to use four web viewers for this job do we?

Sliced background image does the same job.

image

2 Likes

Another good solution, but the point I was trying to make was that the dark grey area of the image slice is still the same colour on all 4 corners.

I was pondering how one might avoid the below artefact where the background colour of the parent layout is something other than white. A web viewer would at least allow you to programatically specify a background fill colour for the grey section - providing you actually can determine what that colour should be.

At the end of the day it's just an interesting but somewhat over-engineered exercise on my part, just thought it was interesting :slight_smile: The original solution is more than fine and you really don't notice it.

Screenshot 2024-06-06 at 8.08.44 AM

2 Likes

I can see how you could lose a morning figuring out how to do this :smile:

It would be nice to specify a radius for corners when calling a new window. That would solve the problem completely.

Another wish: SVG as layout objects. With the ability to define them on the fly so that they could be tweaked to best fit.

1 Like

Grr, this is just making me realize how bad I want actual rounded corners on cards.

4 Likes

Why not just put a rectangle with rounded corners on the background? I think it's a bit overkill to cover the corners with four separate SVG images. :slightly_smiling_face:

invoice paid
invoice created

4 Likes

@Raskolnikov , welcome to The Soup !