mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Add a released callback to Slider (#4821)
The released callback is invoked when the user finished changing the value, for example when the arrow key is released. As a bonus, for the Qt implementation this fixes a few bugs in the keyboard handling: - Handle orientation - Implement click-to-focus - Emit released also on key release Co-authored-by: Luke D. Jones <luke@ljones.dev>
This commit is contained in:
parent
4451d6019a
commit
f27c185daf
10 changed files with 154 additions and 31 deletions
|
@ -423,12 +423,15 @@ export component NativeSpinBox {
|
|||
|
||||
export component NativeSlider {
|
||||
in property <bool> enabled: true;
|
||||
out property <bool> has-focus;
|
||||
in-out property <float> value;
|
||||
in property <float> minimum;
|
||||
in property <float> maximum: 100;
|
||||
in property <Orientation> orientation: Orientation.horizontal;
|
||||
callback changed(float);
|
||||
callback released(float);
|
||||
//-is_internal
|
||||
//-accepts_focus
|
||||
}
|
||||
|
||||
export component NativeProgressIndicator {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue