From 453787d6cab437d72511f70a7b0f9b764ecee6df Mon Sep 17 00:00:00 2001 From: Jerry <89069957+Jerry23011@users.noreply.github.com> Date: Sun, 5 May 2024 23:02:16 +0800 Subject: [PATCH] perf(UI): dynamic calculation for confetti location --- .../Swift/View/SettingView/Tabs/TabView/AboutTab.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Easydict/Swift/View/SettingView/Tabs/TabView/AboutTab.swift b/Easydict/Swift/View/SettingView/Tabs/TabView/AboutTab.swift index e1a7fccbb..49ab3a923 100644 --- a/Easydict/Swift/View/SettingView/Tabs/TabView/AboutTab.swift +++ b/Easydict/Swift/View/SettingView/Tabs/TabView/AboutTab.swift @@ -53,12 +53,12 @@ struct AboutTab: View { .padding(.bottom, 2) .padding(.leading, 16) .padding(.trailing, 16) - .onTapGesture { + .onTapGesture { location in proxy.move( - to: CGPoint( - // Unify x-point for Settings and Menubar About view - x: (geometry.size.width / 2) - 159.5, - y: 70 + to: + CGPoint( + x: location.x + ((geometry.size.width / 2) - 222), + y: location.y + 58 ) ) proxy.burst()