mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-19 07:07:18 +03:00
Hide "Restore to Defaults" button if needless
This commit is contained in:
parent
ab91035c20
commit
7012f50c3b
@ -10,6 +10,7 @@ Change Log
|
||||
- Change not to highlight occurrences of the selection when there are more than 100.
|
||||
- Update validation pane in the syntax style editor:
|
||||
- Now, validation is performed automatically when the pane switched to “Valitation”.
|
||||
- [trivial] Remove “Restore to Defaults” button in the syntax style editor if the style has no defaults.
|
||||
|
||||
|
||||
### Fixes
|
||||
|
@ -262,7 +262,7 @@
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="140" id="i12-7i-sAj"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="push" title="Restore Defaults" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" inset="2" id="1020">
|
||||
<buttonCell key="cell" type="push" title="Restore Defaults" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="1020">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<connections>
|
||||
@ -271,6 +271,11 @@
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="setToFactoryDefaults:" target="8Mx-zQ-ItP" id="b5I-xl-dUQ"/>
|
||||
<binding destination="8Mx-zQ-ItP" name="hidden" keyPath="isBundledStyle" id="qs6-2z-iwf">
|
||||
<dictionary key="options">
|
||||
<string key="NSValueTransformerName">NSNegateBoolean</string>
|
||||
</dictionary>
|
||||
</binding>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dje-ga-BFL">
|
||||
|
@ -70,7 +70,7 @@ final class SyntaxEditViewController: NSViewController, NSTextFieldDelegate, NST
|
||||
@objc private dynamic var message: String?
|
||||
@objc private dynamic var isStyleNameValid = true
|
||||
@objc private dynamic var isRestoreble = false
|
||||
private var isBundledStyle = false
|
||||
@objc private dynamic var isBundledStyle = false
|
||||
|
||||
private var tabViewController: NSTabViewController?
|
||||
|
||||
@ -170,7 +170,6 @@ final class SyntaxEditViewController: NSViewController, NSTextFieldDelegate, NST
|
||||
else { return }
|
||||
|
||||
self.style.setDictionary(style)
|
||||
self.isRestoreble = false
|
||||
|
||||
// update validation result if displayed
|
||||
let tabViewController = self.tabViewController!
|
||||
|
Loading…
Reference in New Issue
Block a user