-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added zh_Hans localization; added app-icon for windows list; improved…
… recording indicator on menu bar; deprecate the AppKit entry in main.swift and replace it with native SwiftUI; create preferences window using SwiftUI instead of AppKit
- Loading branch information
lihaoyun6
committed
Apr 14, 2024
1 parent
67e4178
commit e1672ed
Showing
9 changed files
with
233 additions
and
77 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// MenuBar.swift | ||
// Azayaka | ||
// | ||
// Created by apple on 2024/4/14. | ||
// | ||
|
||
import SwiftUI | ||
import Foundation | ||
|
||
struct MenuBar: View { | ||
@State var recordingStatus: Bool! | ||
@State var recordingLength = "00:00" | ||
var body: some View { | ||
ZStack { | ||
if recordingStatus { | ||
Rectangle() | ||
.cornerRadius(3) | ||
.opacity(0.1) | ||
} | ||
HStack(spacing: 2.5) { | ||
if recordingStatus { | ||
Image(systemName: "record.circle") | ||
.foregroundStyle(.red) | ||
Text(recordingLength) | ||
.offset(y: -0.5) | ||
} else { | ||
Image(systemName: "record.circle") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
MenuBar() | ||
} |
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.