roubachof / Sharpnado.MaterialFrame

A modern MAUI (and XF) Frame component supporting blur, acrylic, dark mode. Implemented with RealtimeBlurView on Android (custom blurview) and UIVisualEffectView on iOS.
MIT License
498 stars 26 forks source link

macOS project added #18

Closed nor0x closed 3 years ago

nor0x commented 3 years ago

Hey @roubachof 👋

i have added a macOS renderer for Sharpnado.MaterialFrame. It's based on the iOS renderer with little modifications specific to AppKit - it's great that most of the magic is happening in CoreAnimation / CoreGraphics which can be shared between iOS and macOS.

Commit messages

I have also updated Sharpnado.Acrylic and added a macOS project here https://github.com/roubachof/Sharpnado.Acrylic/pull/1

Screenshots img_712937192

mhrastegari commented 3 years ago

Wow nice 😍

roubachof commented 3 years ago

I'll try to find some time to merge this in the following weeks :)

roubachof commented 3 years ago

all those great PR that awaiting to be merged x)

mhrastegari commented 3 years ago

i've tried your renderer and it works fine but it seems that effects Images Radius some how! 🤔 even in your screenshots you can see that profile image doesn't have any Corner radius.

update : no image button and no frame can give images radius on macOS you should only use Image.Clip property.

nor0x commented 3 years ago

i've tried your renderer and it works fine but it seems that effects Images Radius some how! 🤔 even in your screenshots you can see that profile image doesn't have any Corner radius.

update : no image button and no frame can give images radius on macOS you should only use Image.Clip property.

you are right - unfortunately there is no ImageButton on macOS. In https://github.com/roubachof/Sharpnado.Acrylic/pull/1/commits/026b8309be3432c33de73ca4f6777880e6eb0d6f i have replaced it with a regular image + gesture recognizer. I will update the sample and use an EllipseGeometry for clipping 👍

roubachof commented 3 years ago

It's happening :)

roubachof commented 3 years ago

You didn't change the nuspec file so I dont think we can build a nuget :/

roubachof commented 3 years ago

Shouldn't we add a line in the Readme for Mac initialization as well ? Saw you put an Init method on the renderer.

nor0x commented 3 years ago

Shouldn't we add a line in the Readme for Mac initialization as well ? Saw you put an Init method on the renderer.

makes sense, i forgot that in the updated readme - process should be identical to iOS

roubachof commented 3 years ago

also, would you be interested in making a post on Sharpnado about your PR ?

nor0x commented 3 years ago

yes sure, i would love to 🥳

roubachof commented 3 years ago

2 impediments prevent this PR to go through release in Nuget package:

  1. nuspec is not updated to make a mac os nuget package
  2. acrylic effect is inverted in mac os implemented (should be white glow on top and shadow on the bottom but it's the other way around on mac os renderer).
roubachof commented 3 years ago

the package is ready now. So if you still want to write a post on sharpnado you are more than welcome :) If you want to proceed, I just need a markdown with images/gifs in a compressed folder. If you want ideas on how to structure the post, here is what could be a plan

who are you why did you use sharpnado tabs? why you had this idea? first implementation communication on the PR final adjustments It could be small amount of text for each points, or long ones, it's up to you !

You can also come up with a totally different plan, it's fine by me :)

let me know what you think

roubachof commented 3 years ago

If you don't really have time or just the desire to write a post, you can just answers the question here, and I will just turn them into an interview in a blog post :)

nor0x commented 3 years ago

@roubachof sorry for the delay, i just came back from a long vacation ⛵ i have sent you some blogabble content via email, please let me know if this works for you