Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3803 from pqrs-org/jwodnicki-settings_disable_not…
…ifications Added System setting to disable notifications #2
- Loading branch information
Showing
11 changed files
with
191 additions
and
61 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/apps/SettingsWindow/Resources/Assets.xcassets/notification-window.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "notification-window.png", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+26 KB
.../Resources/Assets.xcassets/notification-window.imageset/notification-window.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
import SwiftUI | ||
|
||
struct UI1View: View { | ||
@ObservedObject private var settings = LibKrbn.Settings.shared | ||
|
||
var body: some View { | ||
VStack(alignment: .leading, spacing: 24.0) { | ||
GroupBox(label: Text("Menu bar")) { | ||
VStack(alignment: .leading, spacing: 12.0) { | ||
HStack { | ||
Toggle(isOn: $settings.showIconInMenuBar) { | ||
Text("Show icon in menu bar (Default: on)") | ||
} | ||
.switchToggleStyle() | ||
|
||
Spacer() | ||
} | ||
|
||
HStack { | ||
Toggle(isOn: $settings.showProfileNameInMenuBar) { | ||
Text("Show profile name in menu bar (Default: off)") | ||
} | ||
.switchToggleStyle() | ||
|
||
Spacer() | ||
} | ||
|
||
HStack { | ||
Toggle(isOn: $settings.askForConfirmationBeforeQuitting) { | ||
Text("Ask for confirmation when quitting (Default: on)") | ||
} | ||
.switchToggleStyle() | ||
|
||
Spacer() | ||
} | ||
|
||
} | ||
.padding(6.0) | ||
} | ||
|
||
GroupBox(label: Text("Karabiner Notification Window")) { | ||
VStack(alignment: .leading, spacing: 12.0) { | ||
HStack { | ||
Toggle(isOn: $settings.enableNotificationWindow) { | ||
Text("Enable Karabiner Notification Window (Default: on)") | ||
} | ||
.switchToggleStyle() | ||
|
||
Spacer() | ||
} | ||
|
||
HStack { | ||
Toggle(isOn: $settings.virtualHIDKeyboardIndicateStickyModifierKeysState) { | ||
Text("Indicate sticky modifier keys state (Default: on)") | ||
} | ||
.switchToggleStyle() | ||
|
||
Spacer() | ||
} | ||
|
||
VStack(alignment: .leading, spacing: 12.0) { | ||
Label( | ||
"What is the Karabiner Notification Window?", | ||
systemImage: "lightbulb" | ||
) | ||
VStack(alignment: .leading, spacing: 0.0) { | ||
Text( | ||
"Karabiner Notification Window is a window that displays messages, located at the bottom right of the screen. " | ||
) | ||
Text( | ||
"It is used for temporary alerts, displaying the status of sticky modifiers, and showing messages for some complex modifications." | ||
) | ||
} | ||
|
||
Image(decorative: "notification-window") | ||
.resizable() | ||
.aspectRatio(contentMode: .fit) | ||
.frame(height: 150) | ||
|
||
} | ||
.padding() | ||
.foregroundColor(Color.warningForeground) | ||
.background(Color.warningBackground) | ||
} | ||
.padding(6.0) | ||
} | ||
|
||
Spacer() | ||
} | ||
.padding() | ||
} | ||
} | ||
|
||
struct UI1View_Previews: PreviewProvider { | ||
static var previews: some View { | ||
UI1View() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.