frontend: update example widgets and linked in resources
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -138,7 +138,7 @@ fn generate_digit_button(
|
||||
column_span: usize,
|
||||
row: usize,
|
||||
) -> Entity {
|
||||
let mut button = Button::create()
|
||||
let mut button = Button::new()
|
||||
.class("single_content")
|
||||
.min_size(48.0, 48.0)
|
||||
.text(sight.to_string())
|
||||
@@ -166,7 +166,7 @@ fn generate_operation_button(
|
||||
column_span: usize,
|
||||
row: usize,
|
||||
) -> Entity {
|
||||
let mut button = Button::create()
|
||||
let mut button = Button::new()
|
||||
.class("single_content")
|
||||
.min_size(48.0, 48.0)
|
||||
.text(sight.to_string())
|
||||
@@ -197,37 +197,37 @@ impl Template for MainView {
|
||||
.height(336.0)
|
||||
.text("")
|
||||
.child(
|
||||
Grid::create()
|
||||
.rows(Rows::create().row(72.0).row("*").build())
|
||||
Grid::new()
|
||||
.rows(Rows::new().add(72.0).add("*").build())
|
||||
.child(
|
||||
Container::create()
|
||||
Container::new()
|
||||
.padding(8.0)
|
||||
.element("container")
|
||||
.class("header")
|
||||
.attach(Grid::row(0))
|
||||
.child(
|
||||
Grid::create()
|
||||
Grid::new()
|
||||
.child(
|
||||
ScrollViewer::create()
|
||||
ScrollViewer::new()
|
||||
.scroll_viewer_mode(("custom", "disabled"))
|
||||
.child(
|
||||
TextBlock::create()
|
||||
TextBlock::new()
|
||||
.width(0.0)
|
||||
.height(14.0)
|
||||
.text("")
|
||||
.element("text-block")
|
||||
.id("input")
|
||||
.vertical_alignment("start")
|
||||
.v_align("start")
|
||||
.build(ctx),
|
||||
)
|
||||
.build(ctx),
|
||||
)
|
||||
.child(
|
||||
TextBlock::create()
|
||||
TextBlock::new()
|
||||
.element("text-block")
|
||||
.text(id)
|
||||
.vertical_alignment("end")
|
||||
.horizontal_alignment("end")
|
||||
.v_align("end")
|
||||
.h_align("end")
|
||||
.build(ctx),
|
||||
)
|
||||
.build(ctx),
|
||||
@@ -235,35 +235,35 @@ impl Template for MainView {
|
||||
.build(ctx),
|
||||
)
|
||||
.child(
|
||||
Container::create()
|
||||
Container::new()
|
||||
.element("container")
|
||||
.class("content")
|
||||
.padding(8.0)
|
||||
.attach(Grid::row(1))
|
||||
.child(
|
||||
Grid::create()
|
||||
Grid::new()
|
||||
.columns(
|
||||
Columns::create()
|
||||
.column(48.0)
|
||||
.column(4.0)
|
||||
.column(48.0)
|
||||
.column(4.0)
|
||||
.column(48.0)
|
||||
.column(4.0)
|
||||
.column(48.0)
|
||||
Columns::new()
|
||||
.add(48.0)
|
||||
.add(4.0)
|
||||
.add(48.0)
|
||||
.add(4.0)
|
||||
.add(48.0)
|
||||
.add(4.0)
|
||||
.add(48.0)
|
||||
.build(),
|
||||
)
|
||||
.rows(
|
||||
Rows::create()
|
||||
.row(48.0)
|
||||
.row(4.0)
|
||||
.row(48.0)
|
||||
.row(4.0)
|
||||
.row(48.0)
|
||||
.row(4.0)
|
||||
.row(48.0)
|
||||
.row(4.0)
|
||||
.row(48.0)
|
||||
Rows::new()
|
||||
.add(48.0)
|
||||
.add(4.0)
|
||||
.add(48.0)
|
||||
.add(4.0)
|
||||
.add(48.0)
|
||||
.add(4.0)
|
||||
.add(48.0)
|
||||
.add(4.0)
|
||||
.add(48.0)
|
||||
.build(),
|
||||
)
|
||||
// row 0
|
||||
@@ -300,12 +300,12 @@ impl Template for MainView {
|
||||
fn main() {
|
||||
Application::new()
|
||||
.window(|ctx| {
|
||||
Window::create()
|
||||
Window::new()
|
||||
.title("OrbTk - Calculator example")
|
||||
.position((100.0, 100.0))
|
||||
.size(212.0, 336.0)
|
||||
.theme(get_theme())
|
||||
.child(MainView::create().build(ctx))
|
||||
.child(MainView::new().build(ctx))
|
||||
.build(ctx)
|
||||
})
|
||||
.run();
|
||||
|
||||
Reference in New Issue
Block a user