Commit aeb4a5c5 authored by atraczyk's avatar atraczyk Committed by Andreas Traczyk

ui/ux: homogenizes parts of the ui

- makes chat messages selectable
- changes ui colors to the Ring blue shades
- attempts to resize the window appropriately at app start
- adds confirmation modals for removing converstations and contacts
- corrects and error in the debug logger
- corrects vcardutils not handling JPEGs

Change-Id: I2c8a63f9c18c734a25dfd61086b137143cdac659
Tuleap: #790
parent 1f3cd1c4
......@@ -54,19 +54,27 @@ App::OnLaunched(LaunchActivatedEventArgs^ e)
rootFrame->Navigate(TypeName(Views::LoadingPage::typeid), e->Arguments);
Window::Current->Content = rootFrame;
Window::Current->Activate();
} else
}
else {
rootFrame->Navigate(TypeName(Views::LoadingPage::typeid), e->Arguments);
Window::Current->Content = rootFrame;
}
ApplicationView::GetForCurrentView()->SetPreferredMinSize(Size(500, 500));
Window::Current->Activate();
auto color = Windows::UI::ColorHelper::FromArgb(255, 59, 193, 211);
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->ButtonBackgroundColor = color;
ApplicationView::GetForCurrentView()->TitleBar->InactiveBackgroundColor = color;
ApplicationView::GetForCurrentView()->TitleBar->ButtonInactiveBackgroundColor = color;
ApplicationView::GetForCurrentView()->TitleBar->BackgroundColor = color;
ApplicationView::GetForCurrentView()->TitleBar->ForegroundColor = Colors::White;
ApplicationView::GetForCurrentView()->TitleBar->ButtonForegroundColor = Colors::White;
}
void App::OnsummonWizard()
{
ApplicationView::GetForCurrentView()->TryResizeView(Size(400, 600));
rootFrame->Navigate(Windows::UI::Xaml::Interop::TypeName(Views::Wizard::typeid));
}
\ No newline at end of file
......@@ -84,7 +84,7 @@
<Grid x:Name="_hamburgerButtonBar_"
Canvas.ZIndex="0"
Grid.Row="0"
Background="LightBlue"
Background="#3bc1d3"
Width="320"
HorizontalAlignment="Left">
<Grid.ColumnDefinitions>
......
......@@ -55,6 +55,8 @@ MainPage::MainPage()
{
InitializeComponent();
ApplicationView::GetForCurrentView()->TryResizeView(Size(1024, 768));
UserModel::instance->getUserData();
Window::Current->SizeChanged += ref new WindowSizeChangedEventHandler(this, &MainPage::OnResize);
......@@ -156,7 +158,7 @@ RingClientUWP::MainPage::showLoadingOverlay(bool load, bool modal)
_loadingOverlayRect_->Opacity = 1.0;
}
TimeSpan delay;
delay.Duration = 500000;
delay.Duration = 10000 * 50;
ThreadPoolTimer^ delayTimer = ThreadPoolTimer::CreateTimer(
ref new TimerElapsedHandler([this](ThreadPoolTimer^ source)
{
......@@ -167,7 +169,7 @@ RingClientUWP::MainPage::showLoadingOverlay(bool load, bool modal)
}));
}), delay);
}
else if (!load) {
else if (!load && isLoading) {
isLoading = false;
_fadeOutStoryboard_->Begin();
}
......@@ -182,12 +184,6 @@ RingClientUWP::MainPage::PositionImage()
auto bitmapImage = ref new Windows::UI::Xaml::Media::Imaging::BitmapImage();
Windows::Foundation::Uri^ uri;
uri = ref new Windows::Foundation::Uri("ms-appx:///Assets/SplashScreen.scale-200.png");
bitmapImage->UriSource = uri;
img->Source = bitmapImage;
_loadingImage_->Source = img->Source;
_loadingImage_->SetValue(Canvas::LeftProperty, bounds.Width * 0.5 - _loadingImage_->Width * 0.5);
_loadingImage_->SetValue(Canvas::TopProperty, bounds.Height * 0.5 - _loadingImage_->Height * 0.5);
}
......
......@@ -34,7 +34,7 @@
<views:BubbleHorizontalAlignement x:Key="_bubbleHorizontalAlignement_" />
<DataTemplate x:Key="ConversationMessageTemplate"
x:DataType="local:ConversationMessage">
<Grid Margin="0"
<Grid Margin="6,0,12,0"
HorizontalAlignment="{x:Bind FromContact, Converter={StaticResource _bubbleHorizontalAlignement_}}" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
......@@ -51,6 +51,7 @@
<!--Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."-->
<TextBlock x:Name="_msgContent_"
TextWrapping="Wrap"
IsTextSelectionEnabled="True"
Text="{x:Bind Payload}"
Foreground="White"/>
</ContentPresenter>
......@@ -89,7 +90,7 @@
Margin="{TemplateBinding BorderThickness}"
Opacity="1"
Grid.ColumnSpan="2"
BorderBrush="LightBlue"
BorderBrush="#3bc1d3"
BorderThickness="1"
Grid.RowSpan="1"/>
<ScrollViewer x:Name="ContentElement"
......@@ -111,7 +112,7 @@
Background="Transparent"
Grid.Row="1"
FontFamily="Segoe MDL2 Assets"
Foreground="LightBlue"
Foreground="#3bc1d3"
Content="&#xE122;"
IsTabStop="False"
Grid.Column="1"
......@@ -139,59 +140,92 @@
<RowDefinition Height="*"/>
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0"
<Grid Grid.Row="0"
Background="White"
Height="90"
Orientation="Horizontal"
Padding="10,10">
<Image Source="ms-appx:///contact-avatar-test.png" />
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<TextBlock x:Name="_title_"
Grid.Column="0"
Text="[TEXT MISSING]"
TextWrapping="NoWrap"
VerticalAlignment="Center"
FontSize="20"
Margin="20,0" />
<Button x:Name="_audioCall_"
Height="90">
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="280"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Ellipse Grid.Column="0"
Width="50"
Height="50">
<Ellipse.Fill>
<ImageBrush x:Name="_contactBarAvatar_"
ImageSource="ms-appx:///Assets/TESTS/contactAvatar.png"/>
</Ellipse.Fill>
</Ellipse>
<TextBlock x:Name="_title_"
Grid.Column="1"
Click="_audioCall__Click"
Content="audio call"/>
<Button x:Name="_videoCall_"
Click="_videoCall__Click"
Text="[TEXT MISSING]"
TextWrapping="NoWrap"
TextTrimming="CharacterEllipsis"
VerticalAlignment="Center"
FontSize="18"
Margin="6" />
<ComboBox x:Name="_associableAccountsList_"
Grid.Column="2"
Content="video call"/>
</Grid>
<StackPanel Orientation="Horizontal">
<ComboBox x:Name="_associableAccountsList_">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="local:Account">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{x:Bind name_, Mode=OneWay}" />
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Button x:Name="_deleteContact_"
Content="delete"
Click="_deleteContact__Click"/>
<Button x:Name="_clearConversation_"
Content="clear conversation"
Click="_clearConversation__Click"/>
</StackPanel>
</StackPanel>
</StackPanel>
Margin="6,14,6,6"
Visibility="Collapsed">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="local:Account">
<TextBlock Text="{x:Bind name_, Mode=OneWay}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Button x:Name="_videoCall_"
Click="_videoCall__Click"
Grid.Column="0"
Content="&#xE714;"
FontFamily="Segoe MDL2 Assets"
FontSize="14"
Style="{StaticResource ButtonStyle4}"
Margin="6,2,6,6"/>
<Button x:Name="_audioCall_"
Grid.Column="1"
Click="_audioCall__Click"
Content="&#xE13A;"
FontSize="14"
FontFamily="Segoe MDL2 Assets"
Style="{StaticResource ButtonStyle4}"
Margin="6,2,6,6"/>
<Button x:Name="_clearConversation_"
Grid.Column="2"
Click="_clearConversation__Click"
Content="&#xE894;"
FontFamily="Segoe MDL2 Assets"
FontSize="14"
Style="{StaticResource ButtonStyle4}"
Margin="6,2,6,6"/>
<Button x:Name="_deleteContact_"
Grid.Column="3"
Click="_deleteContact__Click"
Content="&#xE74D;"
FontFamily="Segoe MDL2 Assets"
FontSize="14"
Style="{StaticResource ButtonStyle4}"
Margin="6,2,6,6"/>
</Grid>
</Grid>
<ScrollViewer x:Name="_scrollView_"
BorderThickness="0,1,0,0"
BorderBrush="LightBlue"
Grid.Row="1">
BorderThickness="0,0,0,0"
BorderBrush="#3bc1d3"
Grid.Row="1"
ScrollViewer.VerticalScrollBarVisibility="Auto">
<StackPanel>
<ListBox x:Name="_messagesList_"
Margin="0"
......
......@@ -40,6 +40,8 @@ using namespace Windows::ApplicationModel::Core;
using namespace Platform;
using namespace Windows::UI::Core;
using namespace Windows::UI::Popups;
MessageTextPage::MessageTextPage()
{
InitializeComponent();
......@@ -72,6 +74,10 @@ RingClientUWP::Views::MessageTextPage::updatePageContent()
/* show the name of contact on the page */
_title_->Text = contact->name_;
String^ image_path = Utils::toPlatformString(RingD::instance->getLocalFolder()) + ".vcards\\" + contact->_vcardUID + ".png";
auto uri = ref new Windows::Foundation::Uri(image_path);
_contactBarAvatar_->ImageSource = ref new Windows::UI::Xaml::Media::Imaging::BitmapImage(uri);
/* show messages */
_messagesList_->ItemsSource = contact->_conversation->_messages;
......@@ -138,10 +144,9 @@ RingClientUWP::Views::MessageTextPage::sendMessage()
Object ^ RingClientUWP::Views::BubbleBackground::Convert(Object ^ value, Windows::UI::Xaml::Interop::TypeName targetType, Object ^ parameter, String ^ language)
{
auto settings = ref new Windows::UI::ViewManagement::UISettings();
auto color = settings->GetColorValue(Windows::UI::ViewManagement::UIColorType::Accent);
return ((bool)value) ? ref new SolidColorBrush(color) : ref new SolidColorBrush(Windows::UI::Colors::LightBlue);
auto color1 = Windows::UI::ColorHelper::FromArgb(255, 0, 76, 96);
auto color2 = Windows::UI::ColorHelper::FromArgb(255, 58, 192, 210);
return ((bool)value) ? ref new SolidColorBrush(color1) : ref new SolidColorBrush(color2);
}
// we only do OneWay so the next function is not used
......@@ -185,10 +190,20 @@ void RingClientUWP::Views::MessageTextPage::_deleteContact__Click(Platform::Obje
auto item = SmartPanelItemsViewModel::instance->_selectedItem;
auto contact = item->_contact;
closeMessageTextPage();
auto messageDialog = ref new MessageDialog("Are you sure you want to remove this contact?", "Remove Contact");
messageDialog->Commands->Append(ref new UICommand("Cancel", ref new UICommandInvokedHandler([this](IUICommand^ command)
{})));
messageDialog->Commands->Append(ref new UICommand("Remove", ref new UICommandInvokedHandler([=](IUICommand^ command)
{
closeMessageTextPage();
ContactsViewModel::instance->deleteContact(contact);
SmartPanelItemsViewModel::instance->removeItem(item);
})));
messageDialog->DefaultCommandIndex = 1;
ContactsViewModel::instance->deleteContact(contact);
SmartPanelItemsViewModel::instance->removeItem(item);
messageDialog->ShowAsync();
}
......@@ -196,8 +211,20 @@ void RingClientUWP::Views::MessageTextPage::_clearConversation__Click(Platform::
{
auto item = SmartPanelItemsViewModel::instance->_selectedItem;
auto contact = item->_contact;
contact->_conversation->_messages->Clear();
contact->saveConversationToFile();
auto messageDialog = ref new MessageDialog("Are you sure you want to clear the conversation?", "Clear conversation");
messageDialog->Commands->Append(ref new UICommand("Cancel", ref new UICommandInvokedHandler([this](IUICommand^ command)
{})));
messageDialog->Commands->Append(ref new UICommand("Clear", ref new UICommandInvokedHandler([=](IUICommand^ command)
{
contact->_conversation->_messages->Clear();
contact->saveConversationToFile();
})));
messageDialog->DefaultCommandIndex = 1;
messageDialog->ShowAsync();
}
......
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="Savoir-faireLinux.GNURing" Publisher="CN=8121A5F7-3CA1-4CAA-92B2-4F595B011941" Version="1.1.10.0" />
<Identity Name="Savoir-faireLinux.GNURing" Publisher="CN=8121A5F7-3CA1-4CAA-92B2-4F595B011941" Version="1.1.11.0" />
<mp:PhoneIdentity PhoneProductId="2385953f-9019-423d-aa82-d1bbacfa258b" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>GNU Ring</DisplayName>
......
......@@ -71,6 +71,7 @@ RingDebug::print(const std::string& message, const Type& type,
/* set message type. */
wString = (type>Type::WNG)?(L"(EE) "):((type>Type::MSG)?(L"(WW) "):(L"")) + wString;
String^ msg;
#if UWP_DBG_VS
/* screen it into VS debug console */
OutputDebugString((wString + L"\n").c_str());
......@@ -78,7 +79,7 @@ RingDebug::print(const std::string& message, const Type& type,
#if UWP_DBG_CLIENT
/* fire the event. */
auto msg = ref new String(wString.c_str(), wString.length());
msg = ref new String(wString.c_str(), wString.length());
messageToScreen(msg);
#endif
......
......@@ -19,7 +19,7 @@
#define UWP_DBG_CLIENT 0
#define UWP_DBG_VS 1
#define UWP_DBG_FILE 0
#define UWP_DBG_FILE 1
using namespace Windows::Storage;
......
......@@ -94,7 +94,7 @@
<Grid Margin="0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="290"/>
<ColumnDefinition Width="280"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0"
Margin="5,0"
......@@ -113,10 +113,14 @@
FontSize="20"
Foreground="White"
Background="Transparent"
BorderThickness="0"
Padding="0,4,0,2"
Margin="0,0,12,0"
Width="28"
Visibility="{x:Bind _isSelected, Converter={StaticResource _AccountSelectedToVisibility_}, Mode=OneWay}"
Grid.Column="1">
<Button.RenderTransform>
<TranslateTransform X="-5" Y="-5"/>
<TranslateTransform Y="-10"/>
</Button.RenderTransform>
</Button>
<StackPanel Grid.Column="1">
......@@ -277,7 +281,7 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- drop down menus. -->
<Grid Background="LightBlue">
<Grid Background="#3bc1d3">
<Grid.RowDefinitions>
<!-- where the selected account is shown. -->
<RowDefinition x:Name="_selectedAccountRow_"
......@@ -332,7 +336,8 @@
VerticalAlignment="Bottom">
<TextBlock x:Name="_selectedAccountName_"
Text="[TEXT MISSING]"
Margin="10"
Margin="10,0,0,10"
TextTrimming="CharacterEllipsis"
Style="{StaticResource TextStyle2}"/>
<StackPanel Orientation="Horizontal">
<!--Content="&#xE0A1;-->
......@@ -377,7 +382,7 @@
MaxHeight="350"
Grid.Row="1"
Visibility="Collapsed"
Background="LightBlue">
Background="#3bc1d3">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
......@@ -415,7 +420,7 @@
<Grid x:Name="_accountCreationMenuGrid_"
Grid.Row="2"
Visibility="Collapsed"
Background="LightBlue">
Background="#3bc1d3">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
......@@ -627,7 +632,7 @@
<Grid x:Name="_accountAddMenuGrid_"
Visibility="Collapsed"
Grid.Row="2"
Background="LightBlue">
Background="#3bc1d3">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
......@@ -713,7 +718,7 @@
<Grid x:Name="_accountEditionGrid_"
Grid.Row="2"
Visibility="Collapsed"
Background="LightBlue">
Background="#3bc1d3">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
......@@ -881,7 +886,7 @@
<Grid x:Name="_shareMenuGrid_"
Grid.Row="2"
Visibility="Collapsed"
Background="LightBlue">
Background="#3bc1d3">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
......@@ -894,7 +899,7 @@
</Grid.RowDefinitions>
<Grid Background="white"
Margin="10"
MaxHeight="150"
MaxHeight="140"
MaxWidth="140"
Padding="5">
<Image x:Name="_selectedAccountQrCode_"
......@@ -924,14 +929,11 @@
<Grid x:Name="_devicesMenuGrid_"
Grid.Row="2"
Visibility="Collapsed"
Background="LightBlue">
Background="#3bc1d3">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<ScrollViewer x:Name="_scrollViewerDevicesMenu_"
Grid.Row="0"
MaxHeight="400">
<Grid Background="#FFE4F1F9">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
......@@ -942,14 +944,14 @@
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<!-- about this device -->
<StackPanel Orientation="Horizontal"
<StackPanel Orientation="Horizontal"
Grid.Row="0"
Margin="10,20">
<TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
<TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
Margin="0,0,10,0"
Text="&#xE211;"/>
<TextBlock Text="Your device ID"/>
</StackPanel>
<TextBlock Text="Your device ID"/>
</StackPanel>
<TextBlock x:Name="_deviceId_"
Margin="10"
Text="[TEXT_MISSING]"
......@@ -958,16 +960,16 @@
Grid.Row="1"
IsTextSelectionEnabled="True"
HorizontalAlignment="Center"/>
<!-- about linked devices -->
<StackPanel Orientation="Horizontal"
<!-- about linked devices -->
<StackPanel Orientation="Horizontal"
Grid.Row="2"
Margin="10,20">
<TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
<TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
Margin="0,0,10,0"
Text="&#xEBD2;"/>
<TextBlock Text="other linked devices"/>
</StackPanel>
<TextBlock x:Name="_waitingDevicesList_"
<TextBlock Text="other linked devices"/>
</StackPanel>
<TextBlock x:Name="_waitingDevicesList_"
Text="waiting for devices list..."
Grid.Row="3"
IsTextSelectionEnabled="True"
......@@ -978,7 +980,6 @@
Background="#FFE4F1F9"
Grid.Row="3"/>
</Grid>
</ScrollViewer>
<!-- button to add device. -->
<Button x:Name="_addDevice_"
Grid.Row="1"
......@@ -992,7 +993,7 @@
<Grid x:Name="_addingDeviceGrid_"
Grid.Row="2"
Visibility="Collapsed"
Background="LightBlue">
Background="#3bc1d3">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
......@@ -1038,7 +1039,7 @@
<Grid x:Name="_waitingForPin_"
Grid.Row="2"
Visibility="Collapsed"
Background="LightBlue">
Background="#3bc1d3">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
......@@ -1112,11 +1113,12 @@
Background="Transparent"
Grid.Column="1"
FontFamily="Segoe MDL2 Assets"
Foreground="LightBlue"
Foreground="#3bc1d3"
Content=" &#xE1E2;"
Click="_ringTxtBx__Click"
BorderThickness="0"
Visibility="Visible"
IsTabStop="False"
FontSize="20"
Width="38"
Margin="6"
......@@ -1140,11 +1142,13 @@
<!-- settings. -->
<Grid x:Name="_settingsMenu_"
Grid.Row="0"
Visibility="Collapsed">
Visibility="Collapsed"
Background="#FFE4F1F9">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ScrollViewer>
<ScrollViewer
ScrollViewer.VerticalScrollBarVisibility="Auto">
<Grid x:Name="_videoSettings_"
Grid.Row="0">
<StackPanel Margin="10">
......
......@@ -209,6 +209,8 @@ void RingClientUWP::Views::SmartPanel::_accountsMenuButton__Checked(Object^ send
_accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_devicesMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_addingDeviceGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
}
void RingClientUWP::Views::SmartPanel::_accountsMenuButton__Unchecked(Object^ sender, RoutedEventArgs^ e)
......@@ -217,6 +219,8 @@ void RingClientUWP::Views::SmartPanel::_accountsMenuButton__Unchecked(Object^ se
_accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountEditionGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountAddMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
}
void RingClientUWP::Views::SmartPanel::_settingsMenu__Checked(Object^ sender, RoutedEventArgs^ e)
......@@ -227,8 +231,10 @@ void RingClientUWP::Views::SmartPanel::_settingsMenu__Checked(Object^ sender, Ro
_shareMenuButton_->IsChecked = false;
_devicesMenuButton__Unchecked(nullptr,nullptr);
_devicesMenuButton_->IsChecked = false;
_smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_settingsMenu_->Visibility = Windows::UI::Xaml::Visibility::Visible;
_smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
auto vcm = Video::VideoManager::instance->captureManager();
if (vcm->deviceList->Size > 0) {
if (!vcm->isInitialized)
......@@ -242,7 +248,9 @@ void RingClientUWP::Views::SmartPanel::_settingsMenu__Checked(Object^ sender, Ro
void RingClientUWP::Views::SmartPanel::_settingsMenu__Unchecked(Object^ sender, RoutedEventArgs^ e)
{
_settingsMenu_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
auto vcm = Video::VideoManager::instance->captureManager();
if (vcm->deviceList->Size > 0) {
vcm->StopPreviewAsync()
......@@ -298,6 +306,8 @@ void RingClientUWP::Views::SmartPanel::_shareMenuButton__Checked(Platform::Objec
_accountsMenuButton_->IsChecked = false;
_devicesMenuButton_->IsChecked = false;
_smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
generateQRcode();
}
......@@ -307,6 +317,8 @@ void RingClientUWP::Views::SmartPanel::_shareMenuButton__Unchecked(Platform::Obj
_accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountEditionGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
}
void RingClientUWP::Views::SmartPanel::_addAccountBtn__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
......@@ -845,6 +857,7 @@ void RingClientUWP::Views::SmartPanel::_devicesMenuButton__Unchecked(Platform::O
// refacto : do something better...
_waitingAndResult_->Text = "Exporting account on the Ring...";
_smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
}
......@@ -873,6 +886,8 @@ void RingClientUWP::Views::SmartPanel::_devicesMenuButton__Checked(Platform::Obj
_addingDeviceGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountsMenuButton_->IsChecked = false;
_shareMenuButton_->IsChecked = false;
_smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
}
......@@ -1666,4 +1681,4 @@ void RingClientUWP::Views::SmartPanel::_PINTextBox__GotFocus(Platform::Object^ s
void RingClientUWP::Views::SmartPanel::OnregistrationStateRegistered()
{
_addAccountNo__Click(nullptr, nullptr);
}
}
\ No newline at end of file
......@@ -21,13 +21,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- general -->
<Style x:Key="GridLightBlue" TargetType="Grid">
<Style x:Key="Grid#3bc1d3" TargetType="Grid">
<Setter Property="Background"
Value="#FFE4F1F9"/>
Value="#3bc1d3"/>
</Style>
<Style x:Key="StackLightBlue" TargetType="StackPanel">
<Style x:Key="Stack#3bc1d3" TargetType="StackPanel">
<Setter Property="Background"
Value="#FFE4F1F9"/>
Value="#3bc1d3"/>
</Style>
<Style x:Key="TextStyle1"
TargetType="TextBlock">
......@@ -181,6 +181,8 @@
Value="Segoe MDL2 Assets"/>
<Setter Property="Foreground"
Value="White"/>
<Setter Property="BorderThickness"
Value="0"/>
</Style>
<Style x:Key="HamburgerButtonStyle"
TargetType="Button">
......@@ -194,6 +196,8 @@
Value="White"/>
<Setter Property="Background"
Value="Transparent"/>
<Setter Property="BorderThickness"
Value="0"/>
</Style>
<Style x:Key="ButtonStyle2"
TargetType="Button">
......@@ -206,7 +210,9 @@
<Setter Property="Foreground"
Value="White"/>
<Setter Property="Background"
Value="Transparent"/>
Value="#3bc1d3"/>
<Setter Property="BorderThickness"
Value="0"/>
</Style>
<Style x:Key="ButtonStyle3"
TargetType="Button">
......@@ -222,13 +228,17 @@
Value="120"/>
<Setter Property="FontSize"
Value="70"/>
<Setter Property="BorderThickness"
Value="0"/>
</Style>
<Style x:Key="ButtonStyle4"
TargetType="Button">
<Setter Property="Foreground"
Value="White"/>
<Setter Property="Background"
Value="LightBlue"/>
Value="#3bc1d3"/>
<Setter Property="BorderThickness"
Value="0"/>
</Style>
<Style x:Key="ButtonStyle5"
TargetType="Button">
......@@ -241,7 +251,9 @@
<Setter Property="Foreground"
Value="White"/>
<Setter Property="Background"
Value="Transparent"/>
Value="#3bc1d3"/>
<Setter Property="BorderThickness"
Value="0"/>
</Style>
<Style x:Key="ButtonStyle6"
TargetType="Button">
......@@ -255,6 +267,8 @@
Value="White"/>
<Setter Property="Background"
Value="Transparent"/>
<Setter Property="BorderThickness"
Value="0"/>
</Style>
<Style x:Key="ButtonStyle7"
TargetType="Button">
......@@ -268,6 +282,8 @@
Value="White"/>
<Setter Property="Background"
Value="Transparent"/>
<Setter Property="BorderThickness"
Value="0"/>
</Style>
<Style x:Key="ToggleButtonStyle1"
TargetType="ToggleButton">
......@@ -281,6 +297,8 @@
Value="White"/>
<Setter Property="Background"
Value="Transparent"/>
<Setter Property="BorderThickness"
Value="0"/>
</Style>
<Style x:Key="TextBoxStyle2"
TargetType="TextBox">
......@@ -369,7 +387,7 @@
<Style x:Key="BorderStyle1"
TargetType="Border">
<Setter Property="Background" Value="LightBlue"/>
<Setter Property="Background" Value="#3bc1d3"/>
<Setter Property="CornerRadius" Value="6"/>
<Setter Property="Width" Value="25"/>
<Setter Property="Height" Value="23"/>
......@@ -385,7 +403,7 @@
</Style>