mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix setting editor's opacity via AppleScript
This commit is contained in:
parent
f7abd99f9a
commit
201fc59426
@ -35,6 +35,7 @@ develop
|
||||
- Fix an issue where the zoomed character in the character inspector was flipped when the popover is detached.
|
||||
- Fix an issue where `lossy` option in `convert` command by AppleScript scripting was ignored.
|
||||
- Fix an issue on the AppleScript scripting where `range` property of `document` contents could be wrong if document line endings are not LF. (thanks to Kaito Udagawa!).
|
||||
- Fix an issue where the editor opacity couldn't be set via AppleScript.
|
||||
- Fix minor typos.
|
||||
|
||||
|
||||
|
@ -72,6 +72,7 @@
|
||||
<li>Fix an issue where the zoomed character in the character inspector was flipped when the popover is detached.</li>
|
||||
<li>Fix an issue where <code>lossy</code> option in <code>convert</code> command by AppleScript scripting was ignored.</li>
|
||||
<li>Fix an issue on the AppleScript scripting where <code>range</code> property of <code>document</code> contents could be wrong if document line endings are not LF. (thanks to Kaito Udagawa!).</li>
|
||||
<li>Fix an issue where the editor opacity couldn't be set via AppleScript.</li>
|
||||
<li>Fix minor typos.</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
@ -72,6 +72,7 @@
|
||||
<li>文字情報のポップオーバーを独立させたときに拡大された文字がひっくり返って描画された不具合を修正</li>
|
||||
<li>AppleScript の <code>convert</code> コマンドのオプション <code>lossy</code> が実際には無視されていた不具合を修正</li>
|
||||
<li>改行コードが LF 以外のとき、AppleScript の <code>range</code> プロパティがずれることがあった不具合を修正(Kaito Udagawa さんに感謝!)</li>
|
||||
<li>エディタの不透明度が AppleScript で変更できなかった不具合を修正</li>
|
||||
<li>微細なタイポを修正</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
© 2014-2016 1024jp
|
||||
© 2014-2017 1024jp
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -31,18 +31,18 @@ import Cocoa
|
||||
extension NSWindow {
|
||||
|
||||
/// opacity of the editor view for AppleScript (real type)
|
||||
var viewOpacity: NSNumber {
|
||||
var viewOpacity: Double {
|
||||
|
||||
get {
|
||||
guard let alphaWindow = self as? AlphaWindow else { return 1.0 }
|
||||
|
||||
return NSNumber(value: Double(alphaWindow.backgroundAlpha))
|
||||
return Double(alphaWindow.backgroundAlpha)
|
||||
}
|
||||
|
||||
set {
|
||||
guard let alphaWindow = self as? AlphaWindow else { return }
|
||||
|
||||
alphaWindow.backgroundAlpha = CGFloat(viewOpacity.doubleValue)
|
||||
alphaWindow.backgroundAlpha = CGFloat(newValue)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user