Simplify title bar (#442)
Fixes #407 (partially) and #441 Description of the changes: Remove TitleBarHelper and all <Border x:Name="CustomTitleBar" /> Let the system defines the draggable region Centralize all events and functions associated to the title bar in a single control TitleBar instead of code splitted between MainPage/TitleBar/HistoryList/Memory. Use the standard title bar when high contrast is activated instead of the custom one. Modify the color of the title when the window doesn't have focus Fix the right padding of the title bar with high contrast How changes were validated: Manually tested with LtR and RtL languages Manually tested with high contrast Tested when History and Memory flyout are opened
This commit is contained in:
committed by
Daniel Belcher
parent
0d31d5a5a2
commit
bd04c92c1c
@@ -8,7 +8,6 @@
|
||||
#include "Views/DateCalculator.xaml.h"
|
||||
#include "Views/UnitConverter.xaml.h"
|
||||
#include "CalcViewModel/ApplicationViewModel.h"
|
||||
#include "Views/TitleBar.xaml.h"
|
||||
|
||||
namespace CalculatorApp
|
||||
{
|
||||
@@ -44,8 +43,6 @@ namespace CalculatorApp
|
||||
private:
|
||||
void WindowSizeChanged(_In_ Platform::Object^ sender, _In_ Windows::UI::Core::WindowSizeChangedEventArgs^ e);
|
||||
void OnAppPropertyChanged(_In_ Platform::Object^ sender, _In_ Windows::UI::Xaml::Data::PropertyChangedEventArgs^ e);
|
||||
void SetTitleBarControlColors();
|
||||
void ColorValuesChanged(_In_ Windows::UI::ViewManagement::UISettings^ sender, _In_ Platform::Object^ e);
|
||||
|
||||
void OnNavLoaded(_In_ Platform::Object^ sender, _In_ Windows::UI::Xaml::RoutedEventArgs^ e);
|
||||
void OnNavPaneOpening(_In_ Microsoft::UI::Xaml::Controls::NavigationView^ sender, _In_ Platform::Object^ args);
|
||||
@@ -59,16 +56,12 @@ namespace CalculatorApp
|
||||
|
||||
Microsoft::UI::Xaml::Controls::NavigationViewItemHeader^ CreateNavViewHeaderFromGroup(CalculatorApp::Common::NavCategoryGroup^ group);
|
||||
Microsoft::UI::Xaml::Controls::NavigationViewItem^ CreateNavViewItemFromCategory(CalculatorApp::Common::NavCategory^ category);
|
||||
|
||||
Windows::Foundation::EventRegistrationToken m_fullscreenFlyoutClosedToken;
|
||||
void OnFullscreenFlyoutClosed();
|
||||
|
||||
|
||||
void ShowHideControls(CalculatorApp::Common::ViewMode mode);
|
||||
void UpdateViewState();
|
||||
void UpdatePanelViewState();
|
||||
|
||||
void OnPageLoaded(_In_ Platform::Object^ sender, _In_ Windows::UI::Xaml::RoutedEventArgs^ e);
|
||||
void OnPageUnLoaded(_In_ Platform::Object^, _In_ Windows::UI::Xaml::RoutedEventArgs^);
|
||||
|
||||
void EnsureCalculator();
|
||||
void EnsureConverter();
|
||||
@@ -80,12 +73,7 @@ namespace CalculatorApp
|
||||
CalculatorApp::Calculator^ m_calculator;
|
||||
CalculatorApp::UnitConverter^ m_converter;
|
||||
CalculatorApp::DateCalculator^ m_dateCalculator;
|
||||
Windows::Foundation::EventRegistrationToken _windowSizeEventToken;
|
||||
Windows::Foundation::EventRegistrationToken m_hardwareButtonsBackPressedToken;
|
||||
Windows::Foundation::EventRegistrationToken m_colorValuesChangedToken;
|
||||
Windows::Foundation::EventRegistrationToken m_windowSizeEventToken;
|
||||
CalculatorApp::ViewModel::ApplicationViewModel^ m_model;
|
||||
Windows::UI::ViewManagement::UISettings^ m_uiSettings;
|
||||
|
||||
std::unique_ptr<CalculatorApp::Common::TitleBarHelper> m_titleBarHelper;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user