Update example with comments
This commit is contained in:
parent
52fe4920f2
commit
8036be52dc
1 changed files with 7 additions and 7 deletions
|
|
@ -90,13 +90,13 @@ impl Application for VertSpinnerApp {
|
||||||
fn view(&self) -> Element<Self::Message> {
|
fn view(&self) -> Element<Self::Message> {
|
||||||
let vert_spinner_row = row![
|
let vert_spinner_row = row![
|
||||||
spin_button(
|
spin_button(
|
||||||
"i8",
|
"i8", // label: displayed above the widget no matter the orientation
|
||||||
1,
|
1, // step: how much to increment/decrement by
|
||||||
self.i8_num,
|
self.i8_num, // current value, this is also what's displayed in the center of the widget
|
||||||
-5,
|
-5, // minimum value, if decremented below this the widget's current value rolls to the max value
|
||||||
5,
|
5, // maximum value, if incremented above this the widget's current value rolls to the min value
|
||||||
Direction::Vertical,
|
Direction::Vertical, // oreintation of the widget
|
||||||
SpinBtnMessages::UpdateI8Num
|
SpinBtnMessages::UpdateI8Num // message to send to the application's update function
|
||||||
),
|
),
|
||||||
spin_button(
|
spin_button(
|
||||||
"i16",
|
"i16",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue