Skip to content

Commit f623a4b

Browse files
committed
Updated the setup for the delete account button to use system colors
1 parent cccb8c7 commit f623a4b

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
lines changed

Simplenote/NSColor+Theme.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ extension NSColor {
237237

238238
@objc
239239
static var simplenoteAlertControlTextColor: NSColor {
240-
dynamicColor(lightStudio: .red50, darkStudio: .white, lightColorAlpha: AppKitConstants.alpha0_8, darkColorAlpha: AppKitConstants.alpha0_8)
240+
dynamicColor(lightStudio: .red50, darkStudio: .red10)
241241
}
242242

243243
@objc

Simplenote/Preferences.storyboard

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@
6363
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
6464
</textFieldCell>
6565
</textField>
66-
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Fm6-Vq-xaX" customClass="Button" customModule="Simplenote" customModuleProvider="target">
66+
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Fm6-Vq-xaX">
6767
<rect key="frame" x="248" y="13" width="127" height="32"/>
68-
<buttonCell key="cell" type="push" title="Delete Account" bezelStyle="rounded" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="bct-IO-zCI" customClass="ButtonCell" customModule="Simplenote" customModuleProvider="target">
68+
<buttonCell key="cell" type="push" title="Delete Account" bezelStyle="rounded" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="bct-IO-zCI">
6969
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
7070
<font key="font" metaFont="system"/>
7171
</buttonCell>

Simplenote/PreferencesViewController.swift

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -89,30 +89,13 @@ class PreferencesViewController: NSViewController {
8989

9090
let allButtons: [NSButton] = [logoutButton, lineLengthNarrowRadio, lineLengthFullRadio, sortOrderPopUp, condensedNoteListCheckbox, sortTagsAlphabeticallyCheckbox, themePopUp, shareAnalyticsCheckbox]
9191
allButtons.forEach { $0.setTitleColor(.simplenoteTextColor) }
92-
93-
setupDeleteAccountButtonStyle()
92+
deleteAccountButton.setTitleColor(.simplenoteAlertControlTextColor)
9493

9594
if simperium.user == nil {
9695
accountSectionBackground.isHidden = true
9796
}
9897
}
9998

100-
private func setupDeleteAccountButtonStyle() {
101-
deleteAccountButton.bezelStyle = .roundRect
102-
deleteAccountButton.textInsets = Constants.deleteButtonInsets
103-
104-
let shadow = NSShadow()
105-
shadow.shadowBlurRadius = AppKitConstants.alpha0_8
106-
shadow.shadowColor = .buttonShadowColor
107-
deleteAccountButton.shadow = shadow
108-
109-
let cell = deleteAccountButton.cell as? ButtonCell
110-
cell?.regularBackgroundColor = .simplenoteAlertControlBackgroundColor
111-
cell?.textColor = .simplenoteAlertControlTextColor
112-
cell?.isBordered = true
113-
cell?.highlightedBackgroundColor = .simplenoteSecondarySelectedBackgroundColor
114-
}
115-
11699
private func setupLabels() {
117100
accountTitleLabel.stringValue = Strings.account
118101
sortOrderLabel.stringValue = Strings.noteSortOrder

0 commit comments

Comments
 (0)