Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GUI] add orientation support to slider controls #9704

Merged
merged 3 commits into from
May 20, 2016

Conversation

ronie
Copy link
Member

@ronie ronie commented Apr 28, 2016

allow skins to create a vertical slider, as requested on the forum:
http://forum.kodi.tv/showthread.php?tid=218756&pid=2318996#pid2318996

ping @AchimTuran

@tamland i tried to add it to the xbmcgui.ControlSlider() class as well for python addons,
but i'm pretty uncomfortable messing in this code area, please review.

*note this will mess up existing sliders as the default orientation defined globally in kodi is vertical.
skins/addons will need to adopt.

@ronie ronie added Type: Feature non-breaking change which adds functionality Component: GUI engine labels Apr 28, 2016
@@ -1517,7 +1519,8 @@ namespace XBMCAddon
#ifndef SWIG
std::string strTextureBack;
std::string strTexture;
std::string strTextureFoc;
std::string strTextureFoc;
int iOrientation;

This comment was marked as spam.

@AchimTuran
Copy link
Member

@ronie
Awesome work, which is perfect for adsp.biquad.filters and it's build in EQ. This will improve the usability :-)

@AchimTuran
Copy link
Member

*note this will mess up existing sliders as the default orientation defined globally in kodi is vertical.
skins/addons will need to adopt.

Is it not possible to use existing skin code? If not would it be possible to set the slide as vertical if the orientation tag is missing?

@@ -533,12 +533,14 @@ namespace XBMCAddon
ControlSlider::ControlSlider(long x, long y, long width, long height,
const char* textureback,
const char* texture,
const char* texturefocus)
const char* texturefocus,
long orientation)

This comment was marked as spam.

@AchimTuran
Copy link
Member

Except the things what @tamland mentioned I can't see any issues.

Many thanks for the patch, can't wait to see it in our master branch. I guess Rjsachse will be very happy about this.

@ronie ronie force-pushed the slider-orientation branch 2 times, most recently from 18a2a23 to 8fb1cab Compare May 1, 2016 22:15
@rjsachse
Copy link
Contributor

rjsachse commented May 3, 2016

Wouldn't a skinner just need to change the default.xml so it don't break the rest of the skin. Should not be a huge deal breaker since krypton has so many changes.

@ronie
Copy link
Member Author

ronie commented May 3, 2016

Wouldn't a skinner just need to change the default.xml so it don't break the rest of the skin. Should not be a huge deal breaker since krypton has so many changes.

correct, it's exactly 1 line of code skinners need to add to defaults.xml

@ronie
Copy link
Member Author

ronie commented May 3, 2016

@tamland updated the python implementation.
compile & runtime tested.

*
* x : integer - x coordinate of control.\n
* y : integer - y coordinate of control.\n
* width : integer - width of control.\n
* height : integer - height of control.\n
* textureback : [opt] string - image filename.\n
* texture : [opt] string - image filename.\n
* texturefocus : [opt] string - image filename.n"
* texturefocus : [opt] string - image filename.\n
* orientation : [opt] integer - orientation of slider (0=horizontal / 1=vertical(default)).

This comment was marked as spam.

This comment was marked as spam.

@ronie
Copy link
Member Author

ronie commented May 7, 2016

@tamland thx! i need a bit of hand holding now and then :-)
please check if last commit does the trick.

jenkins build this please

@ronie
Copy link
Member Author

ronie commented May 10, 2016

squashed & added skin needed changes

@ronie
Copy link
Member Author

ronie commented May 18, 2016

rebased after #9674

@tamland good to go?

@tamland
Copy link
Member

tamland commented May 19, 2016

yeah, if it builds:)

@ronie
Copy link
Member Author

ronie commented May 20, 2016

jenkins build this please

@ronie ronie merged commit 578e9d5 into xbmc:master May 20, 2016
@ronie ronie deleted the slider-orientation branch October 15, 2016 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: GUI engine Type: Feature non-breaking change which adds functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants