From cb3eaa1466ebf88f5d3df04e9b95a62671b1743a Mon Sep 17 00:00:00 2001 From: hawkeye Date: Fri, 21 Jul 2023 17:45:16 -0400 Subject: [PATCH] Fixed pop out title bar customization saving issue --- DomainModel/Setting/PopOutTitleBarCustomization.cs | 6 ++++-- MainApp/UserControl/PopOutPanelCard.xaml | 2 ++ Orchestration/PanelConfigurationOrchestrator.cs | 2 ++ RELEASENOTES.md | 2 ++ VERSION.md | 2 ++ WindowsAgent/WindowEventManager.cs | 4 ++++ 6 files changed, 16 insertions(+), 2 deletions(-) diff --git a/DomainModel/Setting/PopOutTitleBarCustomization.cs b/DomainModel/Setting/PopOutTitleBarCustomization.cs index a925460..0d24775 100644 --- a/DomainModel/Setting/PopOutTitleBarCustomization.cs +++ b/DomainModel/Setting/PopOutTitleBarCustomization.cs @@ -1,6 +1,8 @@ -namespace MSFSPopoutPanelManager.DomainModel.Setting +using MSFSPopoutPanelManager.Shared; + +namespace MSFSPopoutPanelManager.DomainModel.Setting { - public class PopOutTitleBarCustomization + public class PopOutTitleBarCustomization : ObservableObject { public PopOutTitleBarCustomization() { diff --git a/MainApp/UserControl/PopOutPanelCard.xaml b/MainApp/UserControl/PopOutPanelCard.xaml index 99df8b8..4d7c718 100644 --- a/MainApp/UserControl/PopOutPanelCard.xaml +++ b/MainApp/UserControl/PopOutPanelCard.xaml @@ -231,11 +231,13 @@ Margin="20,0,0,0" BindingPath="Width" DataItem="{Binding DataItem}" + IsEnabled="{c:Binding 'DataItem.PanelType!=profileDomain:PanelType.HudBarWindow'}" SourceUpdated="Data_SourceUpdated" /> diff --git a/Orchestration/PanelConfigurationOrchestrator.cs b/Orchestration/PanelConfigurationOrchestrator.cs index 5812830..2e70c57 100644 --- a/Orchestration/PanelConfigurationOrchestrator.cs +++ b/Orchestration/PanelConfigurationOrchestrator.cs @@ -121,6 +121,8 @@ namespace MSFSPopoutPanelManager.Orchestration break; case PanelConfigPropertyName.Width: case PanelConfigPropertyName.Height: + if (panelConfig.PanelType == PanelType.HudBarWindow) + return; if (panelConfig.HideTitlebar) { diff --git a/RELEASENOTES.md b/RELEASENOTES.md index f0f742b..965c7ad 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -2,4 +2,6 @@ * Fixed issue when full screen mode is activated which may cause black bar to appear on either size (top/bottom or left/right). +* Fixed preferences pop out title bar color customization setting not saving. + * Added preference option in pop out settings to disable pop out progress messages from appearing. \ No newline at end of file diff --git a/VERSION.md b/VERSION.md index 119bb79..adbec28 100644 --- a/VERSION.md +++ b/VERSION.md @@ -5,6 +5,8 @@ * Fixed issue when full screen mode is activated which may cause black bar to appear on either size (top/bottom or left/right). +* Fixed preferences pop out title bar color customization setting not saving. + * Added preference option in pop out settings to disable pop out progress messages from appearing. ## Version 4.0.0 diff --git a/WindowsAgent/WindowEventManager.cs b/WindowsAgent/WindowEventManager.cs index 5b04ef3..3cb5efa 100644 --- a/WindowsAgent/WindowEventManager.cs +++ b/WindowsAgent/WindowEventManager.cs @@ -166,6 +166,10 @@ namespace MSFSPopoutPanelManager.WindowsAgent var rect = WindowActionManager.GetWindowRectangle(panelConfig.PanelHandle); panelConfig.Left = rect.Left; panelConfig.Top = rect.Top; + + if (panelConfig.PanelType == PanelType.HudBarWindow) + return; + panelConfig.Width = rect.Width; panelConfig.Height = rect.Height;