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
diff --git a/App.xaml.cpp b/App.xaml.cpp
index 36e3448..3754cd7 100644
--- a/App.xaml.cpp
+++ b/App.xaml.cpp
@@ -54,19 +54,27 @@
             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()->TitleBar->ButtonBackgroundColor = Colors::LightBlue;

-    ApplicationView::GetForCurrentView()->TitleBar->InactiveBackgroundColor = Colors::LightBlue;

-    ApplicationView::GetForCurrentView()->TitleBar->ButtonInactiveBackgroundColor = Colors::LightBlue;

-    ApplicationView::GetForCurrentView()->TitleBar->BackgroundColor = Colors::LightBlue;

+    ApplicationView::GetForCurrentView()->SetPreferredMinSize(Size(500, 500));

+    Window::Current->Activate();

+

+    auto color = Windows::UI::ColorHelper::FromArgb(255, 59, 193, 211);

+

+    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
diff --git a/MainPage.xaml b/MainPage.xaml
index 82d91f3..d803ef7 100644
--- a/MainPage.xaml
+++ b/MainPage.xaml
@@ -84,7 +84,7 @@
                             <Grid   x:Name="_hamburgerButtonBar_"

                                     Canvas.ZIndex="0"

                                     Grid.Row="0"

-                                    Background="LightBlue"

+                                    Background="#3bc1d3"

                                     Width="320"

                                     HorizontalAlignment="Left">

                                 <Grid.ColumnDefinitions>

diff --git a/MainPage.xaml.cpp b/MainPage.xaml.cpp
index 92e282c..6cac721 100644
--- a/MainPage.xaml.cpp
+++ b/MainPage.xaml.cpp
@@ -55,6 +55,8 @@
 {

     InitializeComponent();

 

+    ApplicationView::GetForCurrentView()->TryResizeView(Size(1024, 768));

+

     UserModel::instance->getUserData();

 

     Window::Current->SizeChanged += ref new WindowSizeChangedEventHandler(this, &MainPage::OnResize);

@@ -156,7 +158,7 @@
             _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 @@
             }));

         }), delay);

     }

-    else if (!load) {

+    else if (!load && isLoading) {

         isLoading = false;

         _fadeOutStoryboard_->Begin();

     }

@@ -182,12 +184,6 @@
     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);

 }

diff --git a/MessageTextPage.xaml b/MessageTextPage.xaml
index 1fa6f4d..b1c97d0 100644
--- a/MessageTextPage.xaml
+++ b/MessageTextPage.xaml
@@ -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"

diff --git a/MessageTextPage.xaml.cpp b/MessageTextPage.xaml.cpp
index b3f2ebf..acd914c 100644
--- a/MessageTextPage.xaml.cpp
+++ b/MessageTextPage.xaml.cpp
@@ -40,6 +40,8 @@
 using namespace Platform;

 using namespace Windows::UI::Core;

 

+using namespace Windows::UI::Popups;

+

 MessageTextPage::MessageTextPage()

 {

     InitializeComponent();

@@ -72,6 +74,10 @@
     /* 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 @@
 

 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 @@
     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");

 

-    ContactsViewModel::instance->deleteContact(contact);

-    SmartPanelItemsViewModel::instance->removeItem(item);

+    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;

+

+    messageDialog->ShowAsync();

 }

 

 

@@ -196,8 +211,20 @@
 {

     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();

 }

 

 

diff --git a/Package.appxmanifest b/Package.appxmanifest
index 7f83564..6d756c2 100644
--- a/Package.appxmanifest
+++ b/Package.appxmanifest
@@ -1,6 +1,6 @@
 <?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>

diff --git a/RingDebug.cpp b/RingDebug.cpp
index 0c63a27..fca4ee1 100644
--- a/RingDebug.cpp
+++ b/RingDebug.cpp
@@ -71,6 +71,7 @@
     /* 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 @@
 

 #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

 

diff --git a/RingDebug.h b/RingDebug.h
index a5444db..9f3ec26 100644
--- a/RingDebug.h
+++ b/RingDebug.h
@@ -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;

 

diff --git a/SmartPanel.xaml b/SmartPanel.xaml
index f029280..4fe5600 100644
--- a/SmartPanel.xaml
+++ b/SmartPanel.xaml
@@ -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">

diff --git a/SmartPanel.xaml.cpp b/SmartPanel.xaml.cpp
index 54fcb9a..f546ef2 100644
--- a/SmartPanel.xaml.cpp
+++ b/SmartPanel.xaml.cpp
@@ -209,6 +209,8 @@
     _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 @@
     _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 @@
     _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__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 @@
     _accountsMenuButton_->IsChecked = false;

     _devicesMenuButton_->IsChecked = false;

 

+    _smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;

+

     generateQRcode();

 }

 

@@ -307,6 +317,8 @@
     _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 @@
     // refacto : do something better...

     _waitingAndResult_->Text = "Exporting account on the Ring...";

 

+    _smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;

 }

 

 

@@ -873,6 +886,8 @@
     _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::OnregistrationStateRegistered()

 {

     _addAccountNo__Click(nullptr, nullptr);

-}

+}
\ No newline at end of file
diff --git a/Styles.xaml b/Styles.xaml
index dfebf51..91bb4dc 100644
--- a/Styles.xaml
+++ b/Styles.xaml
@@ -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>

     <Style x:Key="BorderStyle3"

            TargetType="Border">

-        <Setter Property="Background" Value="LightBlue"/>

+        <Setter Property="Background" Value="#3bc1d3"/>

         <Setter Property="CornerRadius" Value="6"/>

         <Setter Property="Width" Value="28"/>

         <Setter Property="Height" Value="50"/>

@@ -397,7 +415,7 @@
        TargetType="ListBoxItem">

         <Setter Property="HorizontalAlignment" Value="Stretch" />

         <Setter Property="HorizontalContentAlignment" Value="Stretch" />

-        <Setter Property="Margin" Value="20,0,40,0"/>

+        <Setter Property="Margin" Value="0,0,2,0"/>

         <Setter Property="Template">

             <Setter.Value>

                 <ControlTemplate TargetType="ListBoxItem">

@@ -423,7 +441,7 @@
             <Setter.Value>

                 <ControlTemplate TargetType ="Button">

                     <Grid>

-                        <Ellipse Name ="OuterRing" Width ="30" Height ="30" Fill ="LightBlue"/>

+                        <Ellipse Name ="OuterRing" Width ="30" Height ="30" Fill ="#3bc1d3"/>

                         <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>

                     </Grid>

                 </ControlTemplate>

diff --git a/VCardUtils.cpp b/VCardUtils.cpp
index 8ffae3c..7751fe5 100644
--- a/VCardUtils.cpp
+++ b/VCardUtils.cpp
@@ -79,7 +79,12 @@
 

         // because android client builds vcard differently (TYPE=PNG: vs PNG:)

         size_t pos = _line.find("PNG:");

-        if (pos != std::string::npos)

+        if (pos == std::string::npos) {

+            pos = _line.find("JPEG:");

+            if (pos != std::string::npos)

+                m_mParts[Property::PHOTO].append(_line.substr(pos + 5));

+        }

+        else

             m_mParts[Property::PHOTO].append(_line.substr(pos + 4));

 

         return VCARD_INCOMPLETE;

diff --git a/VideoPage.xaml b/VideoPage.xaml
index a1cf59f..1f7a6df 100644
--- a/VideoPage.xaml
+++ b/VideoPage.xaml
@@ -52,7 +52,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*" />

@@ -69,6 +69,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>

@@ -107,7 +108,7 @@
                                     Margin="{TemplateBinding BorderThickness}"

                                     Opacity="1"

                                     Grid.ColumnSpan="2"

-                                    BorderBrush="LightBlue"

+                                    BorderBrush="#3bc1d3"

                                     BorderThickness="1"

                                     Grid.RowSpan="1"/>

                             <ScrollViewer x:Name="ContentElement"

@@ -129,7 +130,7 @@
                                     Background="Transparent"

                                     Grid.Row="1"

                                     FontFamily="Segoe MDL2 Assets"

-                                    Foreground="LightBlue"

+                                    Foreground="#3bc1d3"

                                     Content="&#xE122;"

                                     IsTabStop="False"

                                     Grid.Column="1"

@@ -355,7 +356,8 @@
                             <RowDefinition Height="auto" />

                         </Grid.RowDefinitions>

                         <ScrollViewer   x:Name="_scrollView_"

-                                        Grid.Row="1">

+                                        Grid.Row="1"

+                                        ScrollViewer.VerticalScrollBarVisibility="Auto">

                             <StackPanel>

                                 <ListBox    x:Name="_messagesList_"

                                             Margin="0"

diff --git a/Wizard.xaml b/Wizard.xaml
index bb20ceb..4e5cf06 100644
--- a/Wizard.xaml
+++ b/Wizard.xaml
@@ -13,7 +13,7 @@
             <StackPanel Width="400">

                 <Rectangle Height="50"/>

                 <StackPanel Height="auto"

-                            Background="LightBlue"

+                            Background="#3bc1d3"

                             Grid.Column="0">

                     <Button x:Name="_showCreateAccountMenuTitle_"

                             Content="Create New Account"

@@ -29,7 +29,7 @@
                             Style="{StaticResource ButtonStyle4}"

                             Click="_showCreateAccountMenuBtn__Click"/>

                     <Grid x:Name="_accountCreationMenuGrid_"

-                          Background="LightBlue"

+                          Background="#3bc1d3"

                           Visibility="Collapsed">

                         <Grid.RowDefinitions>

                             <RowDefinition Height="auto"/>

@@ -181,7 +181,7 @@
                 <Rectangle Height="50"/>

                 <!-- add account. -->

                 <StackPanel Height="auto"

-                        Background="LightBlue"

+                        Background="#3bc1d3"

                         Grid.Column="2">

                     <StackPanel x:Name="addExistingAccountStep1">

                     </StackPanel>

@@ -201,7 +201,7 @@
                                 Click="_showAddAccountMenuBtn__Click"/>

                         <Grid x:Name="_accountAddMenuGrid_"

                           Visibility="Collapsed"

-                          Background="LightBlue">

+                          Background="#3bc1d3">

                             <Grid.RowDefinitions>

                                 <RowDefinition Height="30"/>

                                 <RowDefinition Height="auto"/>

diff --git a/_language-fr.appx b/_language-fr.appx
index cbd5177..a190ec9 100644
--- a/_language-fr.appx
+++ b/_language-fr.appx
Binary files differ
diff --git a/_scale-100.appx b/_scale-100.appx
index 622a8ba..ae55ac1 100644
--- a/_scale-100.appx
+++ b/_scale-100.appx
Binary files differ
diff --git a/_scale-125.appx b/_scale-125.appx
index 45387f0..3c46cf3 100644
--- a/_scale-125.appx
+++ b/_scale-125.appx
Binary files differ
diff --git a/_scale-150.appx b/_scale-150.appx
index 0ffbcee..e24b373 100644
--- a/_scale-150.appx
+++ b/_scale-150.appx
Binary files differ
diff --git a/_scale-400.appx b/_scale-400.appx
index 37070f6..6c9e63e 100644
--- a/_scale-400.appx
+++ b/_scale-400.appx
Binary files differ