feat(menubar): 调整两排卡片布局并加入复合曲线与数值动效
This commit is contained in:
@@ -2,6 +2,9 @@ import Foundation
|
||||
import CoreGraphics
|
||||
|
||||
nonisolated enum PanelLayout {
|
||||
static func resourceRowHeight(size: CGSize) -> CGFloat { min(230, max(220, size.height - 590)) }
|
||||
static func firstRowWideCardWidth(size: CGSize) -> CGFloat { (size.width - 36 - resourceRowHeight(size: size)) / 2 }
|
||||
|
||||
static func contentSize(visible: CGRect, chrome: CGSize = .zero) -> CGSize {
|
||||
CGSize(width: max(1, min(1240, visible.width - 32 - max(0, chrome.width))),
|
||||
height: max(1, min(820, visible.height - 32 - max(0, chrome.height))))
|
||||
|
||||
Reference in New Issue
Block a user