mirror of
https://github.com/tuxdotrs/highminded.git
synced 2025-08-22 23:51:03 +05:30
feat: togglable window visibility on screenshare
This commit is contained in:
@@ -17,5 +17,5 @@ public partial class MainViewModel : ObservableObject
|
||||
private string _audioShortcutKey = OperatingSystem.IsMacOS() ? "OPTION + SHIFT + A" : "ALT + SHIFT + A";
|
||||
|
||||
[ObservableProperty] private bool _isRecording = false;
|
||||
[ObservableProperty] private bool _isHidden = true;
|
||||
[ObservableProperty] private bool _isVisibleOnScreenshare = false;
|
||||
}
|
@@ -102,6 +102,8 @@ public partial class MainWindow : Window
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
InMemoryDb.Obj.MainViewModel.IsVisibleOnScreenshare = true;
|
||||
}
|
||||
|
||||
private void HideOverlay()
|
||||
@@ -132,6 +134,8 @@ public partial class MainWindow : Window
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
InMemoryDb.Obj.MainViewModel.IsVisibleOnScreenshare = false;
|
||||
}
|
||||
|
||||
private void HideBtnClick(object? sender, RoutedEventArgs e)
|
||||
@@ -143,7 +147,17 @@ public partial class MainWindow : Window
|
||||
{
|
||||
_keyBindings.AddKeyBinding(
|
||||
new KeyBinding(KeyCode.VcH, ModifierKey.Control, ModifierKey.Alt, ModifierKey.Shift),
|
||||
() => Dispatcher.UIThread.Post(ShowOverlay)
|
||||
() => Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
if (InMemoryDb.Obj.MainViewModel.IsVisibleOnScreenshare)
|
||||
{
|
||||
HideOverlay();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowOverlay();
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
_keyBindings.AddKeyBinding(
|
||||
|
Reference in New Issue
Block a user