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"
ShowInTaskbar="False"
IsHitTestVisible="False"
Topmost="False"
Topmost="True"
SizeToContent="WidthAndHeight">
<Border Background="#AA000000" CornerRadius="8" Padding="20,10">
<TextBlock x:Name="TxtClock"
Foreground="White" FontSize="48" FontWeight="Light"
FontFamily="Consolas"/>
Foreground="White" FontSize="48" FontWeight="Light"
FontFamily="Segoe UI"/>
</Border>
</Window>

View file

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

View file

@ -105,14 +105,12 @@ public partial class MainWindow : Window
var time = DateTime.Now.ToString("HH:mm:ss");
TxtClock.Text = time;
_clockWindow?.UpdateTime(time);
// Nur neu positionieren wenn Hauptfenster bewegt wurde - nicht jede Sekunde
PositionClockWindow();
};
Loaded += MainWindow_Loaded;
Closing += MainWindow_Closing;
KeyDown += MainWindow_KeyDown;
LocationChanged += (_, _) => PositionClockWindow();
SizeChanged += (_, _) => PositionClockWindow();
}
private void OnVideoDoubleClick(object sender, MouseButtonEventArgs e)
@ -427,14 +425,6 @@ public partial class MainWindow : Window
WebView.Visibility = Visibility.Collapsed;
VideoView.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;
try
@ -473,16 +463,6 @@ 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";
@ -748,20 +728,18 @@ 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;
// 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;
}
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);
_clockTimer.Start();
BtnClock.Foreground = new System.Windows.Media.SolidColorBrush(
System.Windows.Media.Color.FromRgb(0x00, 0x78, 0xD4));