Skip to content
Snippets Groups Projects
Commit bd823804 authored by Nicolas Jager's avatar Nicolas Jager
Browse files

fix : call button sometime appears when it should not

Change-Id: Id7f9c26b0f0ad062013ddebf16ce964f569e9a14
Tuleap: #1252
parent 2e4c23fd
Branches
Tags
No related merge requests found
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
<!-- template for smartpanelitems. --> <!-- template for smartpanelitems. -->
<DataTemplate x:Key="SmartPanelItemsTemplate" <DataTemplate x:Key="SmartPanelItemsTemplate"
x:DataType="controls:SmartPanelItem"> x:DataType="controls:SmartPanelItem">
<Grid PointerEntered="Grid_PointerEntered" PointerExited="Grid_PointerExited"> <Grid PointerEntered="Grid_PointerEntered" PointerExited="Grid_PointerExited" PointerMoved="Grid_PointerMoved">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<!-- row definition for the contact. --> <!-- row definition for the contact. -->
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
......
...@@ -426,20 +426,21 @@ void RingClientUWP::Views::SmartPanel::_cancelCallBtn__Click(Platform::Object^ s ...@@ -426,20 +426,21 @@ void RingClientUWP::Views::SmartPanel::_cancelCallBtn__Click(Platform::Object^ s
void RingClientUWP::Views::SmartPanel::Grid_PointerEntered(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) void RingClientUWP::Views::SmartPanel::Grid_PointerEntered(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e)
{ {
auto grid = dynamic_cast<Grid^>(sender); auto grid = dynamic_cast<Grid^>(sender);
auto listBoxItem = dynamic_cast<ListBoxItem^>(sender);
auto item = dynamic_cast<SmartPanelItem^>(grid->DataContext); auto item = dynamic_cast<SmartPanelItem^>(grid->DataContext);
if (item->_callId->IsEmpty()) for (auto it : SmartPanelItemsViewModel::instance->itemsList)
it->_hovered = Windows::UI::Xaml::Visibility::Collapsed;
item->_hovered = Windows::UI::Xaml::Visibility::Visible; item->_hovered = Windows::UI::Xaml::Visibility::Visible;
} }
void RingClientUWP::Views::SmartPanel::Grid_PointerExited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) void RingClientUWP::Views::SmartPanel::Grid_PointerExited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e)
{ {
auto listBoxItem = dynamic_cast<ListBoxItem^>(sender);
auto grid = dynamic_cast<Grid^>(sender); auto grid = dynamic_cast<Grid^>(sender);
auto item = dynamic_cast<SmartPanelItem^>(grid->DataContext); auto item = dynamic_cast<SmartPanelItem^>(grid->DataContext);
for each (auto it in SmartPanelItemsViewModel::instance->itemsList)
item->_hovered = Windows::UI::Xaml::Visibility::Collapsed; item->_hovered = Windows::UI::Xaml::Visibility::Collapsed;
} }
...@@ -924,3 +925,21 @@ void RingClientUWP::Views::SmartPanel::_selectedAccountAvatarContainer__PointerE ...@@ -924,3 +925,21 @@ void RingClientUWP::Views::SmartPanel::_selectedAccountAvatarContainer__PointerE
_photoboothIcon_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _photoboothIcon_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_shaderPhotoboothIcon_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _shaderPhotoboothIcon_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
} }
void RingClientUWP::Views::SmartPanel::_smartList__PointerExited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e)
{
}
void RingClientUWP::Views::SmartPanel::Grid_PointerMoved(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e)
{
auto grid = dynamic_cast<Grid^>(sender);
auto item = dynamic_cast<SmartPanelItem^>(grid->DataContext);
for (auto it : SmartPanelItemsViewModel::instance->itemsList)
it->_hovered = Windows::UI::Xaml::Visibility::Collapsed;
item->_hovered = Windows::UI::Xaml::Visibility::Visible;
}
...@@ -136,6 +136,8 @@ private: ...@@ -136,6 +136,8 @@ private:
void _selectedAccountAvatarContainer__PointerEntered(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e); void _selectedAccountAvatarContainer__PointerEntered(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
void _selectedAccountAvatarContainer__PointerReleased(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e); void _selectedAccountAvatarContainer__PointerReleased(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
void _selectedAccountAvatarContainer__PointerExited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e); void _selectedAccountAvatarContainer__PointerExited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
void _smartList__PointerExited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
void Grid_PointerMoved(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
}; };
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment