Skip to content

Commit

Permalink
feat: reduce space between app icon and window title
Browse files Browse the repository at this point in the history
  • Loading branch information
lwouis committed Jan 2, 2025
1 parent dfcf9de commit 295eb2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/logic/Appearance.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class Appearance {
static var windowPadding = CGFloat(18)
static var interCellPadding = CGFloat(1)
static var intraCellPadding = CGFloat(5)
static var appIconLabelSpacing = CGFloat(2)
static var edgeInsetsSize = CGFloat(5)
static var cellCornerRadius = CGFloat(10)
static var windowCornerRadius = CGFloat(23)
Expand Down
8 changes: 4 additions & 4 deletions src/ui/main-window/ThumbnailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ class ThumbnailView: FlippedView {
} else {
vStackView.frame.size = NSSize(width: frame.width, height: frame.height)
hStackView.frame.size = NSSize(width: frame.width - Appearance.edgeInsetsSize * 2, height: max(appIcon.frame.height, label.cell!.cellSize.height))
let labelWidth = hStackView.frame.width - appIcon.frame.width - Appearance.intraCellPadding - indicatorsSpace()
let labelWidth = hStackView.frame.width - appIcon.frame.width - Appearance.appIconLabelSpacing - indicatorsSpace()
label.setWidth(labelWidth)
}
if Preferences.appearanceStyle == .thumbnails {
Expand All @@ -398,10 +398,10 @@ class ThumbnailView: FlippedView {
: indicatorSpace - iconWidth
}
}
let labelWidth = hStackView.frame.width - appIcon.frame.width - Appearance.intraCellPadding - indicatorSpace
let labelWidth = hStackView.frame.width - appIcon.frame.width - Appearance.appIconLabelSpacing - indicatorSpace
label.frame.origin.x = App.shared.userInterfaceLayoutDirection == .leftToRight
? appIcon.frame.maxX + Appearance.intraCellPadding
: hStackView.frame.width - appIcon.frame.width - Appearance.intraCellPadding - labelWidth
? appIcon.frame.maxX + Appearance.appIconLabelSpacing
: hStackView.frame.width - appIcon.frame.width - Appearance.appIconLabelSpacing - labelWidth
label.centerFrameInParent(y: true)
}
if Preferences.appearanceStyle == .thumbnails {
Expand Down

0 comments on commit 295eb2b

Please sign in to comment.