Skip to content

Commit

Permalink
Merge branch 'in_app_shortcut' of github.com:AkaShark/Easydict into i…
Browse files Browse the repository at this point in the history
…n_app_shortcut
  • Loading branch information
AkaShark committed Feb 6, 2024
2 parents 4003d18 + afd12af commit 64c51a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions Easydict/NewApp/View/SettingView/SettingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,22 @@ struct SettingView: View {
func resizeWindowFrame() {
guard let window else { return }

// Disable zoom button, ref: https://stackoverflow.com/a/66039864/8378840
// Disable zoom button, refer: https://stackoverflow.com/a/66039864/8378840
window.standardWindowButton(.zoomButton)?.isEnabled = false

// Keep the settings page windows all the same width to avoid strange animations.
let maxWidth = 750
let maxWidth = 780
let height = switch selection {
case .general:
maxWidth - 100
case .service:
600
case .disabled, .shortcut:
case .disabled:
500
case .advanced:
400
case .privacy:
320
case .about:
450
default:
400
maxWidth - 110
}

let newSize = CGSize(width: maxWidth, height: height)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct KeyHolderRowView: View {
HStack {
Text(LocalizedStringKey(title))
Spacer()
KeyHolderWrapper(shortcutType: type, confictAlterMessage: $confictAlterMessage).frame(width: 180, height: 24)
KeyHolderWrapper(shortcutType: type, confictAlterMessage: $confictAlterMessage).frame(width: 180, height: 26)
}
}
}

0 comments on commit 64c51a2

Please sign in to comment.