mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 04:18:10 +00:00
fix(core/rust) Handle also touchStop event in brightess dialog
This commit is contained in:
parent
2e0e8eb39b
commit
262747baa7
1
core/.changelog.d/4261.fixed
Normal file
1
core/.changelog.d/4261.fixed
Normal file
@ -0,0 +1 @@
|
|||||||
|
[T3T1] Add instruction to Swipe up after changing brightness.
|
@ -76,8 +76,7 @@ impl Component for NumberInputSliderDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn event(&mut self, ctx: &mut EventCtx, event: Event) -> Option<Self::Msg> {
|
fn event(&mut self, ctx: &mut EventCtx, event: Event) -> Option<Self::Msg> {
|
||||||
if let Some(value) = self.input.event(ctx, event) {
|
let msg_opt = self.input.event(ctx, event);
|
||||||
self.val = value;
|
|
||||||
|
|
||||||
if self.val == self.init_val || self.input.touching {
|
if self.val == self.init_val || self.input.touching {
|
||||||
self.footer
|
self.footer
|
||||||
@ -91,9 +90,10 @@ impl Component for NumberInputSliderDialog {
|
|||||||
ctx.request_paint();
|
ctx.request_paint();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Some(Self::Msg::Changed(value));
|
msg_opt.map(|value| {
|
||||||
}
|
self.val = value;
|
||||||
None
|
Self::Msg::Changed(value)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn paint(&mut self) {
|
fn paint(&mut self) {
|
||||||
|
Loading…
Reference in New Issue
Block a user