From c2569336ca5610255140ba6aa0c3d8480ec8b8f9 Mon Sep 17 00:00:00 2001 From: Sam Denty Date: Mon, 14 Dec 2020 03:39:28 +0000 Subject: [PATCH] fix: show window controls, even when mouse hover option is disabled --- src/ui/main-window/ThumbnailView.swift | 4 ++-- src/ui/main-window/ThumbnailsView.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/main-window/ThumbnailView.swift b/src/ui/main-window/ThumbnailView.swift index d28187cd..e85ce260 100644 --- a/src/ui/main-window/ThumbnailView.swift +++ b/src/ui/main-window/ThumbnailView.swift @@ -68,7 +68,7 @@ class ThumbnailView: NSStackView { if let shouldShowWindowControls = shouldShowWindowControls_ { self.shouldShowWindowControls = shouldShowWindowControls } - let shouldShow = shouldShowWindowControls && isHighlighted && !Preferences.hideColoredCircles && !window_!.isWindowlessApp && !Preferences.hideThumbnails + let shouldShow = shouldShowWindowControls && !Preferences.hideColoredCircles && !window_!.isWindowlessApp && !Preferences.hideThumbnails if isShowingWindowControls != shouldShow { isShowingWindowControls = shouldShow [closeIcon, minimizeIcon, maximizeIcon].forEach { $0.isHidden = !shouldShow } @@ -210,7 +210,7 @@ class ThumbnailView: NSStackView { func mouseMoved() { showOrHideWindowControls(true) - if !isHighlighted { + if Preferences.mouseHoverEnabled && !isHighlighted { mouseMovedCallback() } hoverWindowControls() diff --git a/src/ui/main-window/ThumbnailsView.swift b/src/ui/main-window/ThumbnailsView.swift index a288475b..32d2875b 100644 --- a/src/ui/main-window/ThumbnailsView.swift +++ b/src/ui/main-window/ThumbnailsView.swift @@ -211,7 +211,7 @@ class ScrollView: NSScrollView { override func mouseMoved(with event: NSEvent) { // disable mouse hover during scrolling as it creates jank during elastic bounces at the start/end of the scrollview - if !Preferences.mouseHoverEnabled || isCurrentlyScrolling { return } + if isCurrentlyScrolling { return } if let hit = hitTest(App.app.thumbnailsPanel.mouseLocationOutsideOfEventStream) { var target: NSView? = hit while !(target is ThumbnailView) && target != nil {