tisfeng / Easydict

一个简洁优雅的词典翻译 macOS App。开箱即用,支持离线 OCR 识别,支持有道词典,🍎 苹果系统词典,🍎 苹果系统翻译,OpenAI,Gemini,DeepL,Google,Bing,腾讯,百度,阿里,小牛,彩云和火山翻译。A concise and elegant Dictionary and Translator macOS App for looking up words and translating text.
GNU General Public License v3.0
6.4k stars 325 forks source link

perf(UI): add Confetti effets to about views #535

Closed Jerry23011 closed 1 month ago

Jerry23011 commented 2 months ago

Preview

https://github.com/tisfeng/Easydict/assets/89069957/bf9b0590-e6f6-41f4-817c-d88b527f06ae

https://github.com/tisfeng/Easydict/assets/89069957/1f718efa-1aad-43bf-87ed-3dee0047203f

tisfeng commented 2 months ago

It's strange, it looks like you've changed the layout?

Now

image

Before

https://github.com/tisfeng/Easydict/pull/532#issuecomment-2093237751

image
Jerry23011 commented 2 months ago

Yes, I did add a ZStack so that the effect could work. Let me check it

Jerry23011 commented 2 months ago

I adjusted the constraints and now it should look the same with the original one. The upper bound of the title varies by one pixel and the rest are exactly the same

Now

Updated

Before

Original
tisfeng commented 2 months ago

ok, looks good.

tisfeng commented 2 months ago

I think the layout can be optimized.

image
Jerry23011 commented 2 months ago

I think the layout can be optimized.

image

It's now equal, the 1 px difference at the bottom is caused by the shadow effect

image
tisfeng commented 2 months ago

I suddenly realized that our setting window can be resized, which can cause some strange coordinate issues.

The size of the setting window is carefully designed by us, and resizing it will affect the UI of the configuration.

I think we should prohibit resizing the window, what do you think?

https://github.com/tisfeng/Easydict/assets/25194972/c25df66d-e8a0-4eaf-9e44-42f44fc9914d

Jerry23011 commented 2 months ago

I suddenly realized that our setting window can be resized, which can cause some strange coordinate issues.

The size of the setting window is carefully designed by us, and resizing it will affect the UI of the configuration.

I think we should prohibit resizing the window, what do you think?

I think that would be a great approach -- most apps from Apple (like what I'm using now, Safari) don't have resizable Settings window.

AkaShark commented 2 months ago

I think the layout can be optimized.

image

It's now equal, the 1 px difference at the bottom is caused by the shadow effect image

Just out of curiosity, may I ask how the note the drawing is done. Like 117px is auto?

Jerry23011 commented 2 months ago

Just out of curiosity, may I ask how the note the drawing is done. Like 117px is auto?

Yes it’s auto-calculated by the screenshot app I use: shottr.cc

AkaShark commented 2 months ago

Just out of curiosity, may I ask how the note the drawing is done. Like 117px is auto?

Yes it’s auto-calculated by the screenshot app I use: shottr.cc

Thank you, it is indeed a useful tool.