Skip to content

Commit

Permalink
Feat: Hide the window title in the preview window if it's the same as…
Browse files Browse the repository at this point in the history
… the app name (#46)
  • Loading branch information
ShlomoCode authored Jul 1, 2024
1 parent 6c4402f commit be593fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DockDoor/Views/HoverWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ struct WindowPreview: View {

Spacer()

if let windowTitle = windowInfo.window?.title, !windowTitle.isEmpty {
if let windowTitle = windowInfo.window?.title, !windowTitle.isEmpty, windowTitle != windowInfo.appName {
let maxLabelWidth = calculatedSize.width - 150
let stringMeasurementWidth = measureString(windowTitle, fontSize: 12).width + 5
let width = maxLabelWidth > stringMeasurementWidth ? stringMeasurementWidth : maxLabelWidth
Expand Down

0 comments on commit be593fe

Please sign in to comment.