add orBottomToTop, orRightToLeft, orLeftToRight(orHorizontal), orTopToBottom(OrVertic...
[enigma2.git] / skin.py
diff --git a/skin.py b/skin.py
index 97954715c4d94f6a1f765cfb4ec708f8aa88f8d0..0c5f336836c886866c4b7c46539c9d25dd13d4cd 100644 (file)
--- a/skin.py
+++ b/skin.py
@@ -144,13 +144,23 @@ def applySingleAttribute(guiObject, desktop, attrib, value, scale = ((1,1),(1,1)
                                  "blend": 2,
                                }[value])
                elif attrib == "orientation": # used by eSlider
-                       try:
-                               guiObject.setOrientation(
-                                       { "orVertical": guiObject.orVertical,
-                                               "orHorizontal": guiObject.orHorizontal
-                                       }[value])
-                       except KeyError:
-                               print "oprientation must be either orVertical or orHorizontal!"
+                       if value in ("orHorizontal", "orLeftToRight"):
+                               orientation = guiObject.orHorizontal
+                               direction = guiObject.dirNormal
+                       elif value in ("orVertical", "orTopToBottom"):
+                               orientation = guiObject.orVertical
+                               direction = guiObject.dirNormal
+                       elif value == "orRightToLeft":
+                               orientation = guiObject.orHorizontal
+                               direction = guiObject.dirSwapped
+                       elif value == "orBottomToTop":
+                               orientation = guiObject.orVertical
+                               direction = guiObject.dirSwapped
+                       else:
+                               print "orientation must be one of: orTopToBottom,orBottomToTop,orLeftToRight,orRightToLeft"
+                               return
+                       guiObject.setOrientation(orientation)
+                       guiObject.setDirection(direction)
                elif attrib == "valign":
                        try:
                                guiObject.setVAlign(