Compare commits

..

No commits in common. "main" and "v0.1.3" have entirely different histories.
main ... v0.1.3

3 changed files with 16 additions and 38 deletions

View file

@ -6,11 +6,11 @@
Background="Transparent" Background="Transparent"
ShowInTaskbar="False" ShowInTaskbar="False"
IsHitTestVisible="False" IsHitTestVisible="False"
Topmost="False" Topmost="True"
SizeToContent="WidthAndHeight"> SizeToContent="WidthAndHeight">
<Border Background="#AA000000" CornerRadius="8" Padding="20,10"> <Border Background="#AA000000" CornerRadius="8" Padding="20,10">
<TextBlock x:Name="TxtClock" <TextBlock x:Name="TxtClock"
Foreground="White" FontSize="48" FontWeight="Light" Foreground="White" FontSize="48" FontWeight="Light"
FontFamily="Consolas"/> FontFamily="Segoe UI"/>
</Border> </Border>
</Window> </Window>

View file

@ -244,7 +244,7 @@
IsHitTestVisible="False"> IsHitTestVisible="False">
<TextBlock x:Name="TxtClock" <TextBlock x:Name="TxtClock"
Foreground="White" FontSize="48" FontWeight="Light" Foreground="White" FontSize="48" FontWeight="Light"
FontFamily="Consolas"/> FontFamily="Segoe UI"/>
</Border> </Border>
<!-- Radio-Cover bei Audio-Streams --> <!-- Radio-Cover bei Audio-Streams -->

View file

@ -105,14 +105,12 @@ public partial class MainWindow : Window
var time = DateTime.Now.ToString("HH:mm:ss"); var time = DateTime.Now.ToString("HH:mm:ss");
TxtClock.Text = time; TxtClock.Text = time;
_clockWindow?.UpdateTime(time); _clockWindow?.UpdateTime(time);
// Nur neu positionieren wenn Hauptfenster bewegt wurde - nicht jede Sekunde PositionClockWindow();
}; };
Loaded += MainWindow_Loaded; Loaded += MainWindow_Loaded;
Closing += MainWindow_Closing; Closing += MainWindow_Closing;
KeyDown += MainWindow_KeyDown; KeyDown += MainWindow_KeyDown;
LocationChanged += (_, _) => PositionClockWindow();
SizeChanged += (_, _) => PositionClockWindow();
} }
private void OnVideoDoubleClick(object sender, MouseButtonEventArgs e) private void OnVideoDoubleClick(object sender, MouseButtonEventArgs e)
@ -427,14 +425,6 @@ public partial class MainWindow : Window
WebView.Visibility = Visibility.Collapsed; WebView.Visibility = Visibility.Collapsed;
VideoView.Visibility = Visibility.Visible; VideoView.Visibility = Visibility.Visible;
VideoOverlay.Visibility = Visibility.Visible; VideoOverlay.Visibility = Visibility.Visible;
// Uhr: separates Fenster -> WPF-Overlay wenn WebView deaktiviert wird
if (_clockVisible && _clockWindow != null)
{
_clockWindow.Close();
_clockWindow = null;
TxtClock.Text = DateTime.Now.ToString("HH:mm:ss");
ClockOverlay.Visibility = Visibility.Visible;
}
if (_libVLC == null || _player == null) return; if (_libVLC == null || _player == null) return;
try try
@ -473,16 +463,6 @@ public partial class MainWindow : Window
RadioCover.Visibility = Visibility.Collapsed; RadioCover.Visibility = Visibility.Collapsed;
VideoOverlay.Visibility = Visibility.Collapsed; VideoOverlay.Visibility = Visibility.Collapsed;
WebView.Visibility = Visibility.Visible; WebView.Visibility = Visibility.Visible;
// Uhr: WPF-Overlay -> separates Fenster wenn WebView aktiv wird
if (_clockVisible && _clockWindow == null)
{
ClockOverlay.Visibility = Visibility.Collapsed;
_clockWindow = new ClockWindow { Owner = this };
_clockWindow.UpdateTime(DateTime.Now.ToString("HH:mm:ss"));
_clockWindow.Show();
_clockWindow.Dispatcher.BeginInvoke(() => PositionClockWindow(),
System.Windows.Threading.DispatcherPriority.Render);
}
// Titelleiste via ApplySidebarLayout gesetzt // Titelleiste via ApplySidebarLayout gesetzt
TxtEpgNow.Text = "🌐 Browser"; TxtEpgNow.Text = "🌐 Browser";
@ -748,20 +728,18 @@ public partial class MainWindow : Window
var time = DateTime.Now.ToString("HH:mm:ss"); var time = DateTime.Now.ToString("HH:mm:ss");
if (_clockVisible) if (_clockVisible)
{ {
// WPF-Overlay (fuer TV-Modus innerhalb VideoView)
TxtClock.Text = time; TxtClock.Text = time;
// WPF-Overlay fuer TV/Radio, separates Fenster nur fuer WebView ClockOverlay.Visibility = Visibility.Visible;
if (WebView.Visibility == Visibility.Visible)
{ // Separates Fenster (fuer WebView-Modus, schwebt ueber allem)
_clockWindow = new ClockWindow { Owner = this }; _clockWindow = new ClockWindow { Owner = this };
_clockWindow.UpdateTime(time); _clockWindow.UpdateTime(time);
_clockWindow.Show(); _clockWindow.Show();
_clockWindow.Dispatcher.BeginInvoke(() => PositionClockWindow(), // Nach Show() ist ActualWidth bekannt
System.Windows.Threading.DispatcherPriority.Render); _clockWindow.Dispatcher.BeginInvoke(() => PositionClockWindow(),
} System.Windows.Threading.DispatcherPriority.Render);
else
{
ClockOverlay.Visibility = Visibility.Visible;
}
_clockTimer.Start(); _clockTimer.Start();
BtnClock.Foreground = new System.Windows.Media.SolidColorBrush( BtnClock.Foreground = new System.Windows.Media.SolidColorBrush(
System.Windows.Media.Color.FromRgb(0x00, 0x78, 0xD4)); System.Windows.Media.Color.FromRgb(0x00, 0x78, 0xD4));