Commit bd823804 authored by Nicolas Jager's avatar Nicolas Jager

fix : call button sometime appears when it should not

Change-Id: Id7f9c26b0f0ad062013ddebf16ce964f569e9a14
Tuleap: #1252
parent 2e4c23fd
......@@ -223,7 +223,7 @@
<!-- template for smartpanelitems. -->
<DataTemplate x:Key="SmartPanelItemsTemplate"
x:DataType="controls:SmartPanelItem">
<Grid PointerEntered="Grid_PointerEntered" PointerExited="Grid_PointerExited">
<Grid PointerEntered="Grid_PointerEntered" PointerExited="Grid_PointerExited" PointerMoved="Grid_PointerMoved">
<Grid.RowDefinitions>
<!-- row definition for the contact. -->
<RowDefinition Height="auto"/>
......
......@@ -426,21 +426,22 @@ void RingClientUWP::Views::SmartPanel::_cancelCallBtn__Click(Platform::Object^ s
void RingClientUWP::Views::SmartPanel::Grid_PointerEntered(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e)
{
auto grid = dynamic_cast<Grid^>(sender);
auto listBoxItem = dynamic_cast<ListBoxItem^>(sender);
auto item = dynamic_cast<SmartPanelItem^>(grid->DataContext);
if (item->_callId->IsEmpty())
item->_hovered = Windows::UI::Xaml::Visibility::Visible;
for (auto it : SmartPanelItemsViewModel::instance->itemsList)
it->_hovered = Windows::UI::Xaml::Visibility::Collapsed;
item->_hovered = Windows::UI::Xaml::Visibility::Visible;
}
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 item = dynamic_cast<SmartPanelItem^>(grid->DataContext);
item->_hovered = Windows::UI::Xaml::Visibility::Collapsed;
for each (auto it in SmartPanelItemsViewModel::instance->itemsList)
item->_hovered = Windows::UI::Xaml::Visibility::Collapsed;
}
......@@ -924,3 +925,21 @@ void RingClientUWP::Views::SmartPanel::_selectedAccountAvatarContainer__PointerE
_photoboothIcon_->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:
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__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
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