Skip to content

Commit

Permalink
fix: show window controls, even when mouse hover option is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
samdenty authored and lwouis committed Jan 25, 2021
1 parent 7226c25 commit c256933
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ui/main-window/ThumbnailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -210,7 +210,7 @@ class ThumbnailView: NSStackView {

func mouseMoved() {
showOrHideWindowControls(true)
if !isHighlighted {
if Preferences.mouseHoverEnabled && !isHighlighted {
mouseMovedCallback()
}
hoverWindowControls()
Expand Down
2 changes: 1 addition & 1 deletion src/ui/main-window/ThumbnailsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c256933

Please sign in to comment.