Skip to content
Snippets Groups Projects
Commit 0cf42d77 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

UI: return to vanilla title bar and bind hamburger button

- removes the custom title bar area

- makes the hamburger toggle the smartpanel correctly

Change-Id: I0692581924529dba7c4db3cec6feca115008d066
Tuleap: #1002
parent 196936ea
No related branches found
No related tags found
No related merge requests found
...@@ -53,9 +53,10 @@ App::OnLaunched(LaunchActivatedEventArgs^ e) ...@@ -53,9 +53,10 @@ App::OnLaunched(LaunchActivatedEventArgs^ e)
} else } else
rootFrame->Navigate(TypeName(Views::LoadingPage::typeid), e->Arguments); rootFrame->Navigate(TypeName(Views::LoadingPage::typeid), e->Arguments);
CoreApplication::GetCurrentView()->TitleBar->ExtendViewIntoTitleBar = true;
ApplicationView::GetForCurrentView()->TitleBar->ButtonBackgroundColor = Colors::LightBlue; ApplicationView::GetForCurrentView()->TitleBar->ButtonBackgroundColor = Colors::LightBlue;
ApplicationView::GetForCurrentView()->TitleBar->InactiveBackgroundColor = Colors::LightBlue;
ApplicationView::GetForCurrentView()->TitleBar->ButtonInactiveBackgroundColor = Colors::LightBlue; ApplicationView::GetForCurrentView()->TitleBar->ButtonInactiveBackgroundColor = Colors::LightBlue;
ApplicationView::GetForCurrentView()->TitleBar->BackgroundColor = Colors::LightBlue;
ApplicationView::GetForCurrentView()->TitleBar->ForegroundColor = Colors::White; ApplicationView::GetForCurrentView()->TitleBar->ForegroundColor = Colors::White;
ApplicationView::GetForCurrentView()->TitleBar->ButtonForegroundColor = Colors::White; ApplicationView::GetForCurrentView()->TitleBar->ButtonForegroundColor = Colors::White;
} }
\ No newline at end of file
...@@ -28,10 +28,14 @@ ...@@ -28,10 +28,14 @@
<RowDefinition Height="32"/> <RowDefinition Height="32"/>
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </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> <Grid.ColumnDefinitions>
<ColumnDefinition Width="50"/> <ColumnDefinition Width="60"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- hamburger button. --> <!-- hamburger button. -->
<Button x:Name="_toggleSmartBoxButton_" <Button x:Name="_toggleSmartBoxButton_"
...@@ -39,13 +43,7 @@ ...@@ -39,13 +43,7 @@
Content="&#xE700;" Content="&#xE700;"
Click="_toggleSmartBoxButton__Click" Click="_toggleSmartBoxButton__Click"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Style="{StaticResource ButtonStyle2}"/> Style="{StaticResource HamburgerButtonStyle}"/>
<!-- _titleBar_ is used to move the window. -->
<Rectangle x:Name="_titleBar_"
Grid.Column="1"
Height="32"
VerticalAlignment="Top"
Fill="Transparent"/>
</Grid> </Grid>
<SplitView x:Name="_outerSplitView_" <SplitView x:Name="_outerSplitView_"
Grid.Row="1" Grid.Row="1"
......
...@@ -51,8 +51,6 @@ MainPage::MainPage() ...@@ -51,8 +51,6 @@ MainPage::MainPage()
{ {
InitializeComponent(); InitializeComponent();
Window::Current->SetTitleBar(_titleBar_);
_welcomeFrame_->Navigate(TypeName(RingClientUWP::Views::WelcomePage::typeid)); _welcomeFrame_->Navigate(TypeName(RingClientUWP::Views::WelcomePage::typeid));
_smartPanel_->Navigate(TypeName(RingClientUWP::Views::SmartPanel::typeid)); _smartPanel_->Navigate(TypeName(RingClientUWP::Views::SmartPanel::typeid));
_consolePanel_->Navigate(TypeName(RingClientUWP::Views::RingConsolePanel::typeid)); _consolePanel_->Navigate(TypeName(RingClientUWP::Views::RingConsolePanel::typeid));
...@@ -80,6 +78,14 @@ MainPage::OnKeyDown(KeyRoutedEventArgs^ e) ...@@ -80,6 +78,14 @@ MainPage::OnKeyDown(KeyRoutedEventArgs^ e)
void RingClientUWP::MainPage::_toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) void RingClientUWP::MainPage::_toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{ {
_innerSplitView_->IsPaneOpen = !_innerSplitView_->IsPaneOpen; _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 void
......
...@@ -25,7 +25,6 @@ delegate void ToggleSmartPan(); ...@@ -25,7 +25,6 @@ delegate void ToggleSmartPan();
delegate void SumonMessageTextPage(); delegate void SumonMessageTextPage();
delegate void SumonVideoPage(); delegate void SumonVideoPage();
namespace Views namespace Views
{ {
public ref class SmartPanel sealed public ref class SmartPanel sealed
......
...@@ -80,6 +80,19 @@ ...@@ -80,6 +80,19 @@
<Setter Property="Foreground" <Setter Property="Foreground"
Value="White"/> Value="White"/>
</Style> </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" <Style x:Key="ButtonStyle2"
TargetType="Button"> TargetType="Button">
<Setter Property="Width" <Setter Property="Width"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment