diff --git a/App.xaml.cpp b/App.xaml.cpp index e3f6a8de9fb463a4d06645bb97beddebc0b1735a..7239a55690bce11df7e47303ec00fce751b37381 100644 --- a/App.xaml.cpp +++ b/App.xaml.cpp @@ -53,9 +53,10 @@ App::OnLaunched(LaunchActivatedEventArgs^ e) } else rootFrame->Navigate(TypeName(Views::LoadingPage::typeid), e->Arguments); - CoreApplication::GetCurrentView()->TitleBar->ExtendViewIntoTitleBar = true; ApplicationView::GetForCurrentView()->TitleBar->ButtonBackgroundColor = Colors::LightBlue; + ApplicationView::GetForCurrentView()->TitleBar->InactiveBackgroundColor = Colors::LightBlue; ApplicationView::GetForCurrentView()->TitleBar->ButtonInactiveBackgroundColor = Colors::LightBlue; + ApplicationView::GetForCurrentView()->TitleBar->BackgroundColor = Colors::LightBlue; ApplicationView::GetForCurrentView()->TitleBar->ForegroundColor = Colors::White; ApplicationView::GetForCurrentView()->TitleBar->ButtonForegroundColor = Colors::White; } \ No newline at end of file diff --git a/MainPage.xaml b/MainPage.xaml index 718f292ed1009149d057875e00bfab1e0aff0482..ba9061dac854d998ae6fc4247910cb182070d725 100644 --- a/MainPage.xaml +++ b/MainPage.xaml @@ -28,10 +28,14 @@ <RowDefinition Height="32"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> - <Grid Canvas.ZIndex="2" Grid.Row="0" Background="LightBlue"> + <Grid x:Name="_hamburgerButtonBar_" + Canvas.ZIndex="2" + Grid.Row="0" + Background="LightBlue" + Width="320" + HorizontalAlignment="Left"> <Grid.ColumnDefinitions> - <ColumnDefinition Width="50"/> - <ColumnDefinition Width="*"/> + <ColumnDefinition Width="60"/> </Grid.ColumnDefinitions> <!-- hamburger button. --> <Button x:Name="_toggleSmartBoxButton_" @@ -39,13 +43,7 @@ Content="" Click="_toggleSmartBoxButton__Click" HorizontalAlignment="Center" - Style="{StaticResource ButtonStyle2}"/> - <!-- _titleBar_ is used to move the window. --> - <Rectangle x:Name="_titleBar_" - Grid.Column="1" - Height="32" - VerticalAlignment="Top" - Fill="Transparent"/> + Style="{StaticResource HamburgerButtonStyle}"/> </Grid> <SplitView x:Name="_outerSplitView_" Grid.Row="1" diff --git a/MainPage.xaml.cpp b/MainPage.xaml.cpp index aa7c13d6656e59907481f73523fcec952634dcc0..d6b4bb9d4921d4b6a16b3dcc93a655f96cbf2f4e 100644 --- a/MainPage.xaml.cpp +++ b/MainPage.xaml.cpp @@ -51,8 +51,6 @@ MainPage::MainPage() { InitializeComponent(); - Window::Current->SetTitleBar(_titleBar_); - _welcomeFrame_->Navigate(TypeName(RingClientUWP::Views::WelcomePage::typeid)); _smartPanel_->Navigate(TypeName(RingClientUWP::Views::SmartPanel::typeid)); _consolePanel_->Navigate(TypeName(RingClientUWP::Views::RingConsolePanel::typeid)); @@ -80,6 +78,14 @@ MainPage::OnKeyDown(KeyRoutedEventArgs^ e) void RingClientUWP::MainPage::_toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) { _innerSplitView_->IsPaneOpen = !_innerSplitView_->IsPaneOpen; + if (_innerSplitView_->IsPaneOpen) { + dynamic_cast<SmartPanel^>(_smartPanel_->Content)->setMode(Views::SmartPanel::Mode::Normal); + _hamburgerButtonBar_->Width = 320; + } + else { + dynamic_cast<SmartPanel^>(_smartPanel_->Content)->setMode(Views::SmartPanel::Mode::Minimized); + _hamburgerButtonBar_->Width = 60; + } } void diff --git a/SmartPanel.xaml.h b/SmartPanel.xaml.h index 4cd126804825bd8deb7c512528f4688886c44390..29e6a562e4eb0467bc3127cea92f4a33321f9288 100644 --- a/SmartPanel.xaml.h +++ b/SmartPanel.xaml.h @@ -25,7 +25,6 @@ delegate void ToggleSmartPan(); delegate void SumonMessageTextPage(); delegate void SumonVideoPage(); - namespace Views { public ref class SmartPanel sealed diff --git a/Styles.xaml b/Styles.xaml index 3a87cd946fa901c78aa3f79117f622a2796c2f94..f512b97729341ea98d4474f58913e55524b9d908 100644 --- a/Styles.xaml +++ b/Styles.xaml @@ -80,6 +80,19 @@ <Setter Property="Foreground" Value="White"/> </Style> + <Style x:Key="HamburgerButtonStyle" + TargetType="Button"> + <Setter Property="Width" + Value="50"/> + <Setter Property="Height" + Value="30"/> + <Setter Property="FontFamily" + Value="Segoe MDL2 Assets"/> + <Setter Property="Foreground" + Value="White"/> + <Setter Property="Background" + Value="Transparent"/> + </Style> <Style x:Key="ButtonStyle2" TargetType="Button"> <Setter Property="Width"