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

ScrollThumb is loading the wrong skin #109

Open
vdbongard opened this issue Jun 14, 2017 · 4 comments
Open

ScrollThumb is loading the wrong skin #109

vdbongard opened this issue Jun 14, 2017 · 4 comments
Labels

Comments

@vdbongard
Copy link
Member

The ScrollThumb has 6 thumb states:
'horizontal_up', 'vertical_up', 'horizontal_down', 'vertical_down', 'horizontal_hover', 'vertical_hover',
but in the redraw function it is trying to load a skin named 'horizontal_thumb' or 'vertical_thumb'
which is not present.
Is there a reason why the skin names and states are different?
Shouldn't the ScrollThumb have a hover and down skin like a normal button?

@brean
Copy link
Collaborator

brean commented Jun 15, 2017

The ScrollThumb inherrits Button. Buttons can have 3 different states (up/down/hover), so why not have those states for the ScrollThumb, too?
The theme you use does only support one image for all 3 states.
But I think a theme designer should be able to create different states for the ScrollThumb.
There is a mapping in the JSON theme file that maps the state names to the skin names.

The themes from feathers provide different images for vertical and horizontal, so it makes sense to have both, with the 3 button states this leads to 6 states in total.
We could force the UI-designer to only use one direction and either rotate it or assume that it is a scale9 that does not have a direction and just transform its width/height differently but I think for different shadow-directions on the images it makes sense to have both horizontal and vertical as different images.

@brean
Copy link
Collaborator

brean commented Jun 15, 2017

Oh, another alternative would be to have HorizontalScrollThumb and VerticalScrollThumb as different Components, but I am not so sure about that...

@vdbongard
Copy link
Member Author

Yes, I agree that the ScrollThumb should have the same button states. But why is the redraw function looking for a skin named horizontal_thumb or vertical_thumb?
this.fromSkin(this.scrollable.direction+'_thumb', this.showTrack); (line 116)
Shouldn't it look for a up/down/hover skin corresponding to the current button state?

@brean
Copy link
Collaborator

brean commented Jun 16, 2017

I think you are right... I think this as a bug.

@brean brean added the bug label Jun 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants