Skip to content

Commit

Permalink
Hiding tab preview in case the window is minimized or going full scre…
Browse files Browse the repository at this point in the history
…en (#2226)

Task/Issue URL:
https://app.asana.com/0/1177771139624306/1206635109534553/f

**Description**:
This PR fixes a bug with tab preview positioning when a window is
maximized.
  • Loading branch information
tomasstrba authored Feb 20, 2024
1 parent 5f31e19 commit edb4ab2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions DuckDuckGo/MainWindow/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ final class MainViewController: NSViewController {
tabBarViewController.hideTabPreview()
}

func windowWillMiniaturize() {
tabBarViewController.hideTabPreview()
}

func windowWillEnterFullScreen() {
tabBarViewController.hideTabPreview()
}

func toggleBookmarksBarVisibility() {
updateBookmarksBarViewVisibility(visible: !(mainView.bookmarksBarHeightConstraint.constant > 0))
}
Expand Down
5 changes: 5 additions & 0 deletions DuckDuckGo/MainWindow/MainWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ extension MainWindowController: NSWindowDelegate {

func windowWillEnterFullScreen(_ notification: Notification) {
mainViewController.tabBarViewController.draggingSpace.isHidden = true
mainViewController.windowWillEnterFullScreen()
}

func windowWillMiniaturize(_ notification: Notification) {
mainViewController.windowWillMiniaturize()
}

func windowDidEnterFullScreen(_ notification: Notification) {
Expand Down

0 comments on commit edb4ab2

Please sign in to comment.