mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix window opacity in fullscreen mode
This commit is contained in:
parent
8b1e45c0b6
commit
162901b3af
@ -10,6 +10,11 @@ Change Log
|
||||
- Minimize scrolling when focusing a text such as in text search and outline selection.
|
||||
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix an issue that the navigation bar tinted wrongly when the document window is in fullscreen and the editor is non-opaque.
|
||||
|
||||
|
||||
|
||||
4.0.5 (463)
|
||||
--------------------------
|
||||
|
@ -8,7 +8,7 @@
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// © 2014-2020 1024jp
|
||||
// © 2014-2021 1024jp
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -46,8 +46,9 @@ final class DocumentWindow: NSWindow {
|
||||
didSet {
|
||||
backgroundAlpha = backgroundAlpha.clamped(to: 0.2...1.0)
|
||||
|
||||
guard !self.styleMask.contains(.fullScreen) else { return }
|
||||
|
||||
self.isOpaque = (backgroundAlpha == 1.0)
|
||||
self.backgroundColor = self.isOpaque ? nil : self.contentBackgroundColor.withAlphaComponent(backgroundAlpha)
|
||||
|
||||
self.invalidateShadow()
|
||||
self.contentView?.needsDisplay = true
|
||||
@ -85,6 +86,8 @@ final class DocumentWindow: NSWindow {
|
||||
|
||||
guard isOpaque != oldValue else { return }
|
||||
|
||||
self.backgroundColor = isOpaque ? nil : self.contentBackgroundColor.withAlphaComponent(self.backgroundAlpha)
|
||||
|
||||
self.invalidateTitlebarOpacity()
|
||||
|
||||
if isOpaque {
|
||||
|
Loading…
Reference in New Issue
Block a user