Commit 0cf42d77 authored by atraczyk's avatar atraczyk

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
......@@ -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
......@@ -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="&#xE700;"
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"
......
......@@ -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
......
......@@ -25,7 +25,6 @@ delegate void ToggleSmartPan();
delegate void SumonMessageTextPage();
delegate void SumonVideoPage();
namespace Views
{
public ref class SmartPanel sealed
......
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment