GitHub
Moderator
[skin.py] Add a new skin attribute "scaleFlags". This attribute exposes *all* the option flags for scaling and positioning images. This attribute can replace the old "scale" attribute which has been retained for skin compatibility.
The new flags allow an image to be scaled while retaining the correct aspect ratio. Because the scaled image may not properly fit within the image widget screen area new options are provided to specify where the image will be located within the area. The skin attribute values can be seen in the code.
In summary:
"none": No scaling.
"scale": Scale image to fill the area. The aspect ratio is NOT preserved. This is the same as scale="1".
"scaleKeepAspect": Scale the image and keep the aspect ratio. The image will be shown at the left, top of the area.
"scaleLeftTop": Scale the image and keep the aspect ratio. The image will be shown at the left, top of the area.
"scaleLeftCenter": Scale the image and keep the aspect ratio. The image will be shown at the left, center of the area.
"scaleLeftBotton": Scale the image and keep the aspect ratio. The image will be shown at the left, bottom of the area.
"scaleCenterTop": Scale the image and keep the aspect ratio. The image will be shown at the center, top of the area.
"scaleCenter": Scale the image and keep the aspect ratio. The image will be shown at the center of the area.
"scaleCenterBotton": Scale the image and keep the aspect ratio. The image will be shown at the center, bottom of the area.
"scaleRightTop": Scale the image and keep the aspect ratio. The image will be shown at the right, top of the area.
"scaleRightCenter": Scale the image and keep the aspect ratio. The image will be shown at the right, center of the area.
"scaleRightBottom": Scale the image and keep the aspect ratio. The image will be show at the right, bottom of the area.
To help users with different language skills the word "Center" can be spelled "Centre" and the word "Middle" is also accepted. It would be preferred to use the standard US English spelling to be consistent with the coding standard of using US English spelling.
Code from:https://github.com/OpenVisionE2/enigma2-openvision/commit/90ba5b2f1b7dea418339339b2ebd3d86a87daba3
Continue reading...
The new flags allow an image to be scaled while retaining the correct aspect ratio. Because the scaled image may not properly fit within the image widget screen area new options are provided to specify where the image will be located within the area. The skin attribute values can be seen in the code.
In summary:
"none": No scaling.
"scale": Scale image to fill the area. The aspect ratio is NOT preserved. This is the same as scale="1".
"scaleKeepAspect": Scale the image and keep the aspect ratio. The image will be shown at the left, top of the area.
"scaleLeftTop": Scale the image and keep the aspect ratio. The image will be shown at the left, top of the area.
"scaleLeftCenter": Scale the image and keep the aspect ratio. The image will be shown at the left, center of the area.
"scaleLeftBotton": Scale the image and keep the aspect ratio. The image will be shown at the left, bottom of the area.
"scaleCenterTop": Scale the image and keep the aspect ratio. The image will be shown at the center, top of the area.
"scaleCenter": Scale the image and keep the aspect ratio. The image will be shown at the center of the area.
"scaleCenterBotton": Scale the image and keep the aspect ratio. The image will be shown at the center, bottom of the area.
"scaleRightTop": Scale the image and keep the aspect ratio. The image will be shown at the right, top of the area.
"scaleRightCenter": Scale the image and keep the aspect ratio. The image will be shown at the right, center of the area.
"scaleRightBottom": Scale the image and keep the aspect ratio. The image will be show at the right, bottom of the area.
To help users with different language skills the word "Center" can be spelled "Centre" and the word "Middle" is also accepted. It would be preferred to use the standard US English spelling to be consistent with the coding standard of using US English spelling.
Code from:https://github.com/OpenVisionE2/enigma2-openvision/commit/90ba5b2f1b7dea418339339b2ebd3d86a87daba3
Continue reading...