aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/Extensions/PicturePlayer/plugin.py
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2008-11-17 23:34:41 +0100
committerghost <andreas.monzner@multimedia-labs.de>2008-11-17 23:34:41 +0100
commit5aa89f34249397330995cc0ab1e080c1f567e174 (patch)
tree18f02352d51552b714d70da9bd65053b32029d5e /lib/python/Plugins/Extensions/PicturePlayer/plugin.py
parent9ca172f45cc02fe5cb693e7d35aade7d2233d448 (diff)
downloadenigma2-5aa89f34249397330995cc0ab1e080c1f567e174.tar.gz
enigma2-5aa89f34249397330995cc0ab1e080c1f567e174.zip
get rid of some floating point values
Diffstat (limited to 'lib/python/Plugins/Extensions/PicturePlayer/plugin.py')
-rw-r--r--lib/python/Plugins/Extensions/PicturePlayer/plugin.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/python/Plugins/Extensions/PicturePlayer/plugin.py b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py
index 7d62d2be..0cdab563 100644
--- a/lib/python/Plugins/Extensions/PicturePlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py
@@ -15,7 +15,7 @@ from Components.ConfigList import ConfigList
from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSelection, ConfigText, ConfigEnableDisable, KEY_LEFT, KEY_RIGHT, KEY_0, getConfigListEntry
-def getAspectforPic():
+def getScale():
return AVSwitch().getFramebufferScale()
config.pic = ConfigSubsection()
@@ -119,8 +119,9 @@ class picshow(Screen):
self.session.openWithCallback(self.callbackView, Pic_Full_View, self.filelist.getFileList(), self.filelist.getSelectionIndex(), self.filelist.getCurrentDirectory())
def setConf(self):
+ sc = getScale()
#0=Width 1=Height 2=Aspect 3=use_cache 4=resize_type 5=Background(#AARRGGBB)
- self.picload.setPara([self["thn"].instance.size().width(), self["thn"].instance.size().height(), getAspectforPic(), config.pic.cache.value, int(config.pic.resize.value), "#00000000"])
+ self.picload.setPara((self["thn"].instance.size().width(), self["thn"].instance.size().height(), sc[0], sc[1], config.pic.cache.value, int(config.pic.resize.value), "#00000000"))
def callbackView(self, val=0):
if val > 0:
@@ -311,10 +312,10 @@ class Pic_Thumb(Screen):
self.ThumbTimer.callback.append(self.showPic)
def setPicloadConf(self):
- self.picload.setPara([self["thumb0"].instance.size().width(), self["thumb0"].instance.size().height(), getAspectforPic(), config.pic.cache.value, int(config.pic.resize.value), self.color])
+ sc = getScale()
+ self.picload.setPara([self["thumb0"].instance.size().width(), self["thumb0"].instance.size().height(), sc[0], sc[1], config.pic.cache.value, int(config.pic.resize.value), self.color])
self.paintFrame()
-
-
+
def paintFrame(self):
#print "index=" + str(self.index)
if self.maxentry < self.index or self.index < 0:
@@ -468,7 +469,8 @@ class Pic_Full_View(Screen):
self.onLayoutFinish.append(self.setPicloadConf)
def setPicloadConf(self):
- self.picload.setPara([self["pic"].instance.size().width(), self["pic"].instance.size().height(), getAspectforPic(), 0, int(config.pic.resize.value), self.bgcolor])
+ sc = getScale()
+ self.picload.setPara([self["pic"].instance.size().width(), self["pic"].instance.size().height(), sc[0], sc[1], 0, int(config.pic.resize.value), self.bgcolor])
self["play_icon"].hide()
if config.pic.infoline.value == False: