Skip to content

Commit

Permalink
fix: excessive window padding and remove open new window logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ejbills committed Dec 22, 2024
1 parent 37f48f2 commit fe39a3e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
3 changes: 0 additions & 3 deletions DockDoor/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -16469,9 +16469,6 @@
}
}
}
},
"Open new window" : {

},
"Open Screen Recording Settings" : {
"extractionState" : "stale",
Expand Down
27 changes: 1 addition & 26 deletions DockDoor/Views/Hover Window/WindowPreviewHoverContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct WindowPreviewHoverContainer: View {

ScrollViewReader { scrollProxy in
ScrollView(orientationIsHorizontal ? .horizontal : .vertical, showsIndicators: false) {
DynStack(direction: orientationIsHorizontal ? .horizontal : .vertical, spacing: 16) {
DynStack(direction: orientationIsHorizontal ? .horizontal : .vertical, spacing: -20) {
ForEach(windowStates.indices, id: \.self) { index in
WindowPreview(
windowInfo: windowStates[index],
Expand Down Expand Up @@ -195,7 +195,6 @@ struct WindowPreviewHoverContainer: View {
.frame(width: 24, height: 24)
}
hoverTitleLabelView(labelSize: labelSize)
newWindowControlView()
}
.padding(.top, 10)
.padding(.leading)
Expand All @@ -212,7 +211,6 @@ struct WindowPreviewHoverContainer: View {
.frame(width: 24, height: 24)
}
hoverTitleLabelView(labelSize: labelSize)
newWindowControlView()
}
.padding(EdgeInsets(top: -11.5, leading: 15, bottom: -1.5, trailing: 1.5))
case .popover:
Expand All @@ -230,7 +228,6 @@ struct WindowPreviewHoverContainer: View {
.frame(width: 24, height: 24)
}
hoverTitleLabelView(labelSize: labelSize)
newWindowControlView()
}
.padding(.vertical, 5)
.padding(.horizontal, 10)
Expand Down Expand Up @@ -280,28 +277,6 @@ struct WindowPreviewHoverContainer: View {
}
}

@ViewBuilder
private func newWindowControlView() -> some View {
if let app = windows.first?.app, hoveringWindowTitle {
Button(action: {
WindowUtil.openNewWindow(app: app)
}) {
Image(systemName: "plus")
.fontWeight(.medium)
.foregroundColor(.primary.opacity(0.85))
.frame(width: 24, height: 24)
.background(
RoundedRectangle(cornerRadius: 6, style: .continuous)
.fill(.regularMaterial)
)
.contentShape(RoundedRectangle(cornerRadius: 6, style: .continuous))
}
.help("Open new window")
.padding(2)
.buttonStyle(.plain)
}
}

private func runUIUpdates() {
runAnimation()
loadAppIcon()
Expand Down

0 comments on commit fe39a3e

Please sign in to comment.