refactor(menubar): 将刷新间隔移至底栏并恢复顶部单行
This commit is contained in:
@@ -3,7 +3,8 @@ import CoreGraphics
|
||||
|
||||
nonisolated enum PanelLayout {
|
||||
static let baseCardHeight: CGFloat = 204
|
||||
static func headerHeight(width: CGFloat) -> CGFloat { width >= 840 ? 32 : 64 }
|
||||
static let footerHeight: CGFloat = 26
|
||||
static func headerHeight(width: CGFloat) -> CGFloat { width >= 560 ? 32 : 64 }
|
||||
static func columns(width: CGFloat) -> Int { width >= 560 ? 2 : 1 }
|
||||
static func cardWidth(size: CGSize) -> CGFloat {
|
||||
let count = columns(width: size.width)
|
||||
@@ -24,7 +25,7 @@ nonisolated enum PanelLayout {
|
||||
}
|
||||
static func needsResourceScroll(size: CGSize, rows: [CGFloat]) -> Bool {
|
||||
// Outer padding, common toolbar/footer, and two gaps. Process page is separate.
|
||||
resourceHeight(rows: rows) > size.height - 20 - headerHeight(width: size.width) - 18 - 16
|
||||
resourceHeight(rows: rows) > size.height - 20 - headerHeight(width: size.width) - footerHeight - 16
|
||||
}
|
||||
|
||||
static func contentSize(visible: CGRect, chrome: CGSize = .zero) -> CGSize {
|
||||
|
||||
Reference in New Issue
Block a user