fix: show window controls, even when mouse hover option is disabled

This commit is contained in:
Sam Denty
2021-01-26 00:01:55 +09:00
committed by lwouis
parent 7226c25ed7
commit c2569336ca
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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()
+1 -1
View File
@@ -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 {