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

Toggle switch widget moves outside of slider area #28

Closed
bradamiller opened this issue Jun 24, 2017 · 4 comments
Closed

Toggle switch widget moves outside of slider area #28

bradamiller opened this issue Jun 24, 2017 · 4 comments
Labels
bug Incorrect or inefficient behavior in shuffleboard, its API, or a plugin ui

Comments

@bradamiller
Copy link

When toggling a Toggle Switch widget it moves outside of the oval track on the right side. See attached screen shot.
toggleswitch

@SamCarlberg SamCarlberg added bug Incorrect or inefficient behavior in shuffleboard, its API, or a plugin ui labels Jul 17, 2017
@SamCarlberg SamCarlberg added this to the Sprint 4 milestone Jul 17, 2017
@SamCarlberg
Copy link
Member

I think this is a glitch with toggle sliders in general; it also happens with the playback "loop" slider

@SamCarlberg
Copy link
Member

SamCarlberg commented Sep 7, 2017

I've determined the culprit (but not the underlying cause).

api/src/main/resources/edu/wpi/first/shuffleboard/api/base.css

.tile {
    -fx-font-size: 11pt;
}

I can confirm the following behavior:

Font size Correct behavior?
9pt
10pt
11pt
12pt
13pt
14pt
15pt
16pt
17pt
18pt
19pt
20pt
21pt

Seems like it works in 3pt-increments? This is also definitely interacting weirdly with something else in the stylesheets (either material or base), as these font sizes all work with the default controlsfx stylesheets.

The easiest fix I can think of would to add this to the base stylesheet:

.tile .toggle-switch {
    -fx-font-size: 12pt;
}

but that doesn't fix the problems with toggle switches not in tiles that have their font sizes set, nor does it solve the issue of invisible toggle switches in tile property sheets

SamCarlberg added a commit to SamCarlberg/shuffleboard that referenced this issue Sep 7, 2017
@nightpool
Copy link
Contributor

nightpool commented Sep 7, 2017

.toggle-switch {
    -fx-font-size: 12px !important;
}

?

@SamCarlberg
Copy link
Member

That would lock all toggle switches to the same size, which I would prefer not to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect or inefficient behavior in shuffleboard, its API, or a plugin ui
Projects
None yet
Development

No branches or pull requests

3 participants