From 2b6c6d13b750495f82da5c1dd7ca21085c6fa680 Mon Sep 17 00:00:00 2001 From: Philipp <Philipp1.mueller@student.reutlingen-university.de> Date: Mon, 10 Mar 2025 22:10:33 +0100 Subject: [PATCH] added dpi compatibility mode --- InnoLabProjektDektopApp/InnoLabProjektDektopApp/App.xaml.cs | 6 +++++- .../Screens/FirstLaunch/03_2ProgramsList.xaml | 2 +- .../InnoLabProjektDektopApp/Utils/NotifyIconManager.cs | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/App.xaml.cs b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/App.xaml.cs index 025d94d..2017094 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/App.xaml.cs +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/App.xaml.cs @@ -23,9 +23,13 @@ namespace InnoLabProjektDektopApp public App() { + // enable high DPI support + System.Windows.FrameworkElement.LanguageProperty.OverrideMetadata( + typeof(System.Windows.FrameworkElement), + new FrameworkPropertyMetadata(System.Windows.Markup.XmlLanguage.GetLanguage(System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag))); } - + protected override void OnStartup(StartupEventArgs e) { diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/03_2ProgramsList.xaml b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/03_2ProgramsList.xaml index 20db2a2..578869f 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/03_2ProgramsList.xaml +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/03_2ProgramsList.xaml @@ -85,7 +85,7 @@ </Border> </Grid> <TextBlock Margin="0,10,0,0" - Text="On the left side, you can find the programs that you marked as distracting. On the left, you find all currently running programs that you can potentially add to the distracting programs." /> + Text="On the left side, you can find the programs that you marked as distracting. On the right, you find all currently running programs that you can potentially add to the distracting programs." /> <!-- Überschrift --> <Grid Margin="0,20"> diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Utils/NotifyIconManager.cs b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Utils/NotifyIconManager.cs index cce6aeb..5e2585d 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Utils/NotifyIconManager.cs +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Utils/NotifyIconManager.cs @@ -131,8 +131,7 @@ namespace InnoLabProjektDektopApp.Utils // Reopen the context menu if requested if (showContextMenu) { - var mousePosition = System.Windows.Forms.Control.MousePosition; - _notifyIcon.ContextMenuStrip.Show(mousePosition); + _notifyIcon.ContextMenuStrip.Show(); } } -- GitLab