-
Notifications
You must be signed in to change notification settings - Fork 323
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
Numeric slider component enhancement #3885
Merged
mergify
merged 210 commits into
develop
from
wip/galin-enso/numeric-slider-enhancement-183816694
Dec 12, 2022
Merged
Numeric slider component enhancement #3885
mergify
merged 210 commits into
develop
from
wip/galin-enso/numeric-slider-enhancement-183816694
Dec 12, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wdanilo
approved these changes
Dec 12, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge it :)
mergify
bot
deleted the
wip/galin-enso/numeric-slider-enhancement-183816694
branch
December 12, 2022 08:53
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
This is an enhancement of the
Slider
component implemented in #3852. It adds the following features:Tooltips
An information tooltip can now be added to a slider, it is shown when the mouse hovers over the component. Additionally, a pop-up indicating the slider's precision appears when the slider's precision has been adjusted.
unknown_2022.12.07-10.51.mp4
Slider limits
The previous slider implementation clamped the adjusted value to the slider's minimum/maximum limits. Now the following behaviors are available:
These behaviors can be set to the lower and upper limits of a slider independently.
unknown_2022.12.07-10.52.mp4
Textual editing
The slider's value can now be entered through a text input field. Double-click to edit the slider's current value. To confirm the edit press
enter
, or pressescape
to cancel the edit. If an invalid value is entered on confirmation the slider will revert to its value before the edit. The slider's precision will be adjusted based on the number of decimal places of the value entered.unknown_2022.12.07-10.54.mp4
Vertical layout
The slider component now supports a vertical layout. In this case value adjustment is performed by a vertical mouse movement, and a horizontal movement adjusts the slider's precision. The slider's track now fills the component in a vertical direction, and the slider's label is displayed near the top end of the component.
unknown_2022.12.07-10.58_1.mp4
Scroll bar mode
The slider component supports two indicator modes:
Track
: The component is filled with a colored bar from the lower limit (empty) to the upper limit (full) dependent on the slider's value.Thumb
: The component contains a rounded indicator that moves along the slider from one end to the other, indicating the slider's value proportionally to the slider's limits. The width of the indicator is configurable.In addition, the value text, text entry, and precision adjustment can be turned off to provide a scroll bar appearance when used with the
Thumb
indicator.unknown_2022.12.07-10.59.mp4
Example scene shortcuts
The example scene contains two shortcuts in order to evaluate the dynamic addition and removal of the slider components:
CTRL+D
drops all the slider components that are added to the scene.CTRL+A
adds a new set of example slider components to the scene.Important Notes
Checklist
Please include the following checklist in your PR:
Scala,
Java,
and
Rust
style guides.
./run ide build
and./run ide watch
.