Skip to content

Commit cc6ec1c

Browse files
authored
Layouts.md: forgotten group and unneeded mut
One command is missing the `group::`, as it's not imported and program would not compile. Also removed mutability for `normal` variable, as it's not changing anyway.
1 parent 6d42fe8 commit cc6ec1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Layouts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ use fltk::{prelude::*, *};
1414
fn main() {
1515
let a = app::App::default().with_scheme(app::Scheme::Gtk);
1616
let mut win = window::Window::default().with_size(400, 300);
17-
let mut flex = Flex::new(0, 0, 400, 300, None);
17+
let mut flex = group::Flex::new(0, 0, 400, 300, None);
1818
flex.set_type(group::FlexType::Column);
1919
let expanding = button::Button::default().with_label("Expanding");
20-
let mut normal = button::Button::default().with_label("Normal");
21-
flex.fixed(&mut normal, 30);
20+
let normal = button::Button::default().with_label("Normal");
21+
flex.fixed(&normal, 30);
2222
flex.end();
2323
win.end();
2424
win.show();
@@ -150,4 +150,4 @@ These methods are namely:
150150
- `center_x(&widget)`: places the widget at the center (x-axis) of the passed widget.
151151
- `center_y(&widget)`: places the widget at the center (y-axis) of the passed widget.
152152
- `size_of(&widget)`: constructs the widget with the same size of the passed widget.
153-
- `size_of_parent()`: constructs the widget with the same size of its parent.
153+
- `size_of_parent()`: constructs the widget with the same size of its parent.

0 commit comments

Comments
 (0)