fix: switcher could appear collapsed in titles style (closes #3744)

This commit is contained in:
lwouis committed 2024-12-11 21:51:09 +01:00
1 parent 41ddd7c1a6
commit 60534bcfe3
1 file changed
+3 -1
+3 -1
View File
@@ -375,6 +375,8 @@ class ThumbnailView: NSStackView {
} else {
contentWidth = thumbnail.frame.size.width
}
} else if Preferences.appearanceStyle == .titles {
contentWidth = ThumbnailView.maxThumbnailWidth(screen) - Appearance.edgeInsetsSize * 2
} else {
contentWidth = max(hStackView.frame.size.width, Appearance.iconSize)
}
@@ -390,7 +392,7 @@ class ThumbnailView: NSStackView {
} else {
let visibleCount = [fullscreenIcon, minimizedIcon, hiddenIcon, spaceIcon].filter { !$0.isHidden }.count
let fontIconWidth = CGFloat(visibleCount) * (Appearance.fontHeight + Appearance.intraCellPadding)
let labelWidth = max(vStackView.frame.width, frame.width)
let labelWidth = frame.width
- Appearance.edgeInsetsSize * 2
- Appearance.iconSize
- Appearance.intraCellPadding - fontIconWidth