mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
just 2 small features
This commit is contained in:
parent
bbba30551d
commit
53f8b297c9
9 changed files with 139 additions and 4 deletions
|
|
@ -128,6 +128,12 @@ struct InlineHUD: View {
|
|||
.symbolRenderingMode(.hierarchical)
|
||||
.contentTransition(.interpolate)
|
||||
.frame(width: 20, height: 15, alignment: .center)
|
||||
case .capsLock:
|
||||
Image(systemName: "capslock.fill")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.contentTransition(.interpolate)
|
||||
.frame(width: 20, height: 15, alignment: .center)
|
||||
.foregroundStyle(Defaults[.capsLockIndicatorUseGreenColor] ? .green : .white)
|
||||
default:
|
||||
EmptyView()
|
||||
}
|
||||
|
|
@ -147,7 +153,7 @@ struct InlineHUD: View {
|
|||
frameWidth: infoWidth
|
||||
)
|
||||
}
|
||||
} else {
|
||||
} else if type != .capsLock {
|
||||
Text(Type2Name(type))
|
||||
.font(.subheadline)
|
||||
.fontWeight(.medium)
|
||||
|
|
@ -180,6 +186,16 @@ struct InlineHUD: View {
|
|||
.multilineTextAlignment(.trailing)
|
||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||
.contentTransition(.interpolate)
|
||||
} else if (type == .capsLock) {
|
||||
Text("Caps Lock")
|
||||
.foregroundStyle(Defaults[.capsLockIndicatorUseGreenColor] ? .green : .white)
|
||||
.font(.subheadline)
|
||||
.fontWeight(.medium)
|
||||
.lineLimit(1)
|
||||
.allowsTightening(true)
|
||||
.multilineTextAlignment(.trailing)
|
||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||
.contentTransition(.interpolate)
|
||||
} else if (type == .bluetoothAudio) {
|
||||
if hasBatteryLevel {
|
||||
let indicatorSpacing: CGFloat = {
|
||||
|
|
@ -374,6 +390,8 @@ struct InlineHUD: View {
|
|||
return "Mic"
|
||||
case .bluetoothAudio:
|
||||
return BluetoothAudioManager.shared.lastConnectedDevice?.name ?? "Bluetooth"
|
||||
case .capsLock:
|
||||
return "Caps Lock"
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue