Always on Top: Pin-Button + Strg+T, blau wenn aktiv
This commit is contained in:
parent
0da4161fa9
commit
59ab798b74
2 changed files with 16 additions and 0 deletions
|
|
@ -381,6 +381,9 @@
|
||||||
<Slider x:Name="SldVolume" Width="100" Minimum="0" Maximum="100" Value="80"
|
<Slider x:Name="SldVolume" Width="100" Minimum="0" Maximum="100" Value="80"
|
||||||
VerticalAlignment="Center" Margin="8,0"
|
VerticalAlignment="Center" Margin="8,0"
|
||||||
ValueChanged="SldVolume_ValueChanged"/>
|
ValueChanged="SldVolume_ValueChanged"/>
|
||||||
|
<Button x:Name="BtnAlwaysOnTop" Content="📌" FontSize="14" Width="40" Height="40"
|
||||||
|
Background="Transparent" Foreground="#888" BorderThickness="0"
|
||||||
|
Click="BtnAlwaysOnTop_Click" Cursor="Hand" ToolTip="Immer im Vordergrund (Strg+T)"/>
|
||||||
<Button x:Name="BtnFullscreen" Content="⛶" FontSize="16" Width="40" Height="40"
|
<Button x:Name="BtnFullscreen" Content="⛶" FontSize="16" Width="40" Height="40"
|
||||||
Background="Transparent" Foreground="White" BorderThickness="0"
|
Background="Transparent" Foreground="White" BorderThickness="0"
|
||||||
Click="BtnFullscreen_Click" Cursor="Hand" ToolTip="Vollbild (F11)"/>
|
Click="BtnFullscreen_Click" Cursor="Hand" ToolTip="Vollbild (F11)"/>
|
||||||
|
|
|
||||||
|
|
@ -693,6 +693,17 @@ public partial class MainWindow : Window
|
||||||
|
|
||||||
private void BtnFullscreen_Click(object sender, RoutedEventArgs e) => ToggleFullscreen();
|
private void BtnFullscreen_Click(object sender, RoutedEventArgs e) => ToggleFullscreen();
|
||||||
|
|
||||||
|
private void BtnAlwaysOnTop_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Topmost = !Topmost;
|
||||||
|
BtnAlwaysOnTop.Foreground = Topmost
|
||||||
|
? new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(0x00, 0x78, 0xD4))
|
||||||
|
: new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(0x88, 0x88, 0x88));
|
||||||
|
BtnAlwaysOnTop.ToolTip = Topmost
|
||||||
|
? "Immer im Vordergrund: AN (Strg+T)"
|
||||||
|
: "Immer im Vordergrund (Strg+T)";
|
||||||
|
}
|
||||||
|
|
||||||
private void ToggleFullscreen()
|
private void ToggleFullscreen()
|
||||||
{
|
{
|
||||||
if (!_isFullscreen)
|
if (!_isFullscreen)
|
||||||
|
|
@ -1234,6 +1245,8 @@ public partial class MainWindow : Window
|
||||||
switch (e.Key)
|
switch (e.Key)
|
||||||
{
|
{
|
||||||
case Key.F11: ToggleFullscreen(); e.Handled = true; break;
|
case Key.F11: ToggleFullscreen(); e.Handled = true; break;
|
||||||
|
case Key.T when Keyboard.Modifiers == ModifierKeys.Control:
|
||||||
|
BtnAlwaysOnTop_Click(this, new RoutedEventArgs()); e.Handled = true; break;
|
||||||
case Key.Escape:
|
case Key.Escape:
|
||||||
if (EpgOverlay.Visibility == Visibility.Visible)
|
if (EpgOverlay.Visibility == Visibility.Visible)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue