bin: policycheck: simplified core to check policy number
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -1,16 +1,17 @@
|
|||||||
use orbtk::prelude::*;
|
use orbtk::prelude::*;
|
||||||
use orbtk::theme::DEFAULT_THEME_CSS;
|
|
||||||
//use orbtk::theme::LIGHT_THEME_EXTENSION_CSS;
|
|
||||||
|
|
||||||
//#[cfg(feature = "light-theme")]
|
// use orbtk::theme::DEFAULT_THEME_CSS;
|
||||||
static WIDGET_EXT: &'static str = include_str!("../../resources/stylesheets/policyholder_check.css");
|
// use orbtk::theme::LIGHT_THEME_EXTENSION_CSS;
|
||||||
|
|
||||||
fn get_theme() -> ThemeValue {
|
// //#[cfg(feature = "light-theme")]
|
||||||
//ThemeValue::create_from_css(LIGHT_THEME_EXTENSION_CSS)
|
// static WIDGET_EXT: &'static str = include_str!("../../resources/stylesheets/policyholder_check.css");
|
||||||
ThemeValue::create_from_css(DEFAULT_THEME_CSS)
|
|
||||||
.extension_css(WIDGET_EXT)
|
// fn get_theme() -> ThemeValue {
|
||||||
.build()
|
// //ThemeValue::create_from_css(LIGHT_THEME_EXTENSION_CSS)
|
||||||
}
|
// ThemeValue::create_from_css(DEFAULT_THEME_CSS)
|
||||||
|
// .extension_css(WIDGET_EXT)
|
||||||
|
// .build()
|
||||||
|
// }
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
enum Action {
|
enum Action {
|
||||||
@@ -84,8 +85,8 @@ impl State for MainViewState {
|
|||||||
fn create_header(ctx: &mut BuildContext, text: &str) -> Entity {
|
fn create_header(ctx: &mut BuildContext, text: &str) -> Entity {
|
||||||
TextBlock::new()
|
TextBlock::new()
|
||||||
.text(text)
|
.text(text)
|
||||||
.element("text-block")
|
//.element("text-block")
|
||||||
.class("h1")
|
.style("header")
|
||||||
.build(ctx)
|
.build(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,7 +125,7 @@ impl Template for MainView {
|
|||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
Grid::new()
|
Grid::new()
|
||||||
.element("policyholder_check")
|
//.element("policyholder_check")
|
||||||
.margin((4.0, 24.0, 24.0, 4.0))
|
.margin((4.0, 24.0, 24.0, 4.0))
|
||||||
.min_width(180.0)
|
.min_width(180.0)
|
||||||
.min_height(80.0)
|
.min_height(80.0)
|
||||||
@@ -165,7 +166,7 @@ impl Template for MainView {
|
|||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
TextBlock::new()
|
TextBlock::new()
|
||||||
.element("text-block")
|
//.element("text-block")
|
||||||
.id("result")
|
.id("result")
|
||||||
.min_width(80.0)
|
.min_width(80.0)
|
||||||
.max_width(180.0)
|
.max_width(180.0)
|
||||||
@@ -179,7 +180,7 @@ impl Template for MainView {
|
|||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
Grid::new()
|
Grid::new()
|
||||||
.element("logo_customer")
|
//.element("logo_customer")
|
||||||
.margin((9.0, 16.0, 16.0, 9.0))
|
.margin((9.0, 16.0, 16.0, 9.0))
|
||||||
.attach(Grid::column(0))
|
.attach(Grid::column(0))
|
||||||
.attach(Grid::row(1))
|
.attach(Grid::row(1))
|
||||||
@@ -193,7 +194,7 @@ impl Template for MainView {
|
|||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
Grid::new()
|
Grid::new()
|
||||||
.element("logo_vendor")
|
//.element("logo_vendor")
|
||||||
.margin((9.0, 16.0, 16.0, 9.0))
|
.margin((9.0, 16.0, 16.0, 9.0))
|
||||||
.attach(Grid::column(2))
|
.attach(Grid::column(2))
|
||||||
.attach(Grid::row(1))
|
.attach(Grid::row(1))
|
||||||
@@ -222,7 +223,7 @@ fn main() {
|
|||||||
.min_width(460.0)
|
.min_width(460.0)
|
||||||
.min_height(180.0)
|
.min_height(180.0)
|
||||||
.resizeable(true)
|
.resizeable(true)
|
||||||
.theme(get_theme())
|
//.theme(get_theme())
|
||||||
.child(MainView::new().build(ctx))
|
.child(MainView::new().build(ctx))
|
||||||
.build(ctx)
|
.build(ctx)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user