From 2b8ed17f52a1db6fa4f55ebe51d6ee1bfa449b2c Mon Sep 17 00:00:00 2001 From: dimedtec Date: Fri, 19 Jun 2026 00:17:51 +0200 Subject: [PATCH 1/3] Uhr: Topmost=False, separates Fenster nur bei WebView --- ClockWindow.xaml | 2 +- MainWindow.xaml.cs | 42 +++++++++++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/ClockWindow.xaml b/ClockWindow.xaml index ef4fe54..5dfd2aa 100644 --- a/ClockWindow.xaml +++ b/ClockWindow.xaml @@ -6,7 +6,7 @@ Background="Transparent" ShowInTaskbar="False" IsHitTestVisible="False" - Topmost="True" + Topmost="False" SizeToContent="WidthAndHeight"> 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; try @@ -463,6 +471,16 @@ public partial class MainWindow : Window RadioCover.Visibility = Visibility.Collapsed; VideoOverlay.Visibility = Visibility.Collapsed; 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 TxtEpgNow.Text = "🌐 Browser"; @@ -728,18 +746,20 @@ public partial class MainWindow : Window var time = DateTime.Now.ToString("HH:mm:ss"); if (_clockVisible) { - // WPF-Overlay (fuer TV-Modus innerhalb VideoView) TxtClock.Text = time; - ClockOverlay.Visibility = Visibility.Visible; - - // Separates Fenster (fuer WebView-Modus, schwebt ueber allem) - _clockWindow = new ClockWindow { Owner = this }; - _clockWindow.UpdateTime(time); - _clockWindow.Show(); - // Nach Show() ist ActualWidth bekannt - _clockWindow.Dispatcher.BeginInvoke(() => PositionClockWindow(), - System.Windows.Threading.DispatcherPriority.Render); - + // WPF-Overlay fuer TV/Radio, separates Fenster nur fuer WebView + if (WebView.Visibility == Visibility.Visible) + { + _clockWindow = new ClockWindow { Owner = this }; + _clockWindow.UpdateTime(time); + _clockWindow.Show(); + _clockWindow.Dispatcher.BeginInvoke(() => PositionClockWindow(), + System.Windows.Threading.DispatcherPriority.Render); + } + else + { + ClockOverlay.Visibility = Visibility.Visible; + } _clockTimer.Start(); BtnClock.Foreground = new System.Windows.Media.SolidColorBrush( System.Windows.Media.Color.FromRgb(0x00, 0x78, 0xD4)); From d62139afc9a6d9c99b7468f5d978e3e5703dac1d Mon Sep 17 00:00:00 2001 From: dimedtec Date: Fri, 19 Jun 2026 00:20:03 +0200 Subject: [PATCH 2/3] Uhr: keine sekuendliche Neupositionierung - kein Geisterbild mehr --- MainWindow.xaml.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index f8b416d..619792e 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -105,12 +105,14 @@ public partial class MainWindow : Window var time = DateTime.Now.ToString("HH:mm:ss"); TxtClock.Text = time; _clockWindow?.UpdateTime(time); - PositionClockWindow(); + // Nur neu positionieren wenn Hauptfenster bewegt wurde - nicht jede Sekunde }; Loaded += MainWindow_Loaded; Closing += MainWindow_Closing; KeyDown += MainWindow_KeyDown; + LocationChanged += (_, _) => PositionClockWindow(); + SizeChanged += (_, _) => PositionClockWindow(); } private void OnVideoDoubleClick(object sender, MouseButtonEventArgs e) From 60ed10ffef9414f50fb7e6bf6dec6ced18bd7a5d Mon Sep 17 00:00:00 2001 From: dimedtec Date: Fri, 19 Jun 2026 00:28:46 +0200 Subject: [PATCH 3/3] Uhr: Consolas Monospace - keine Verschiebung mehr bei Ziffern --- ClockWindow.xaml | 4 ++-- MainWindow.xaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ClockWindow.xaml b/ClockWindow.xaml index 5dfd2aa..810a148 100644 --- a/ClockWindow.xaml +++ b/ClockWindow.xaml @@ -10,7 +10,7 @@ SizeToContent="WidthAndHeight"> + Foreground="White" FontSize="48" FontWeight="Light" + FontFamily="Consolas"/> diff --git a/MainWindow.xaml b/MainWindow.xaml index ef7e74d..a16bdf9 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -244,7 +244,7 @@ IsHitTestVisible="False"> + FontFamily="Consolas"/>