Permalink
Browse files

Picture/SlideShow support rotate picture by swipe up/down.

  • Loading branch information...
1 parent 3392ddf commit 87fdcd85e7a07aa2a909761564df10f97f9b9e29 @ulion ulion committed Mar 25, 2013
Showing with 13 additions and 0 deletions.
  1. +13 −0 xbmc/pictures/GUIWindowSlideShow.cpp
@@ -772,6 +772,19 @@ bool CGUIWindowSlideShow::OnAction(const CAction &action)
Zoom(m_iZoomFactor + 1);
break;
+ case ACTION_GESTURE_SWIPE_UP:
+ case ACTION_GESTURE_SWIPE_DOWN:
+ if (m_iZoomFactor == 1 || !m_Image[m_iCurrentPic].m_bCanMoveVertically)
+ {
+ bool swipeOnLeft = action.GetAmount() < g_graphicsContext.GetWidth() / 2;
+ bool swipeUp = action.GetID() == ACTION_GESTURE_SWIPE_UP;
+ if (swipeUp == swipeOnLeft)
+ Rotate(90.0f);
+ else
+ Rotate(-90.0f);
+ }
+ break;
+
case ACTION_ROTATE_PICTURE_CW:
Rotate(90.0f);
break;

0 comments on commit 87fdcd8

Please sign in to comment.