main: update stylesheet reference, basic geometry

* new module 'policycheck_menu'
* reference the project stylesheet
* update a default geometry

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2020-06-22 14:24:21 +02:00
parent 2d5416ce4c
commit d9cfa4dcaf

View File

@@ -2,26 +2,30 @@ use orbtk::prelude::*;
use orbtk::theme::DEFAULT_THEME_CSS; use orbtk::theme::DEFAULT_THEME_CSS;
//use orbtk::theme::LIGHT_THEME_EXTENSION_CSS; //use orbtk::theme::LIGHT_THEME_EXTENSION_CSS;
// helper modules
pub mod base_state; pub mod base_state;
pub mod data; pub mod data;
pub mod keys; pub mod keys;
// the frontend
pub mod main_view; pub mod main_view;
// validation check of a policy data element given by its poliy code // validation check of a policy data element given by its poliy code
pub mod policycheck_view; pub mod policycheck_view;
pub mod policycheck_state; pub mod policycheck_state;
pub mod policycheck_menu;
// manage list of policy data structures // manage list of policy data structures
pub mod policylist_view; pub mod policylist_view;
pub mod policylist_state; pub mod policylist_state;
//#[cfg(feature = "light-theme")] //#[cfg(feature = "light-theme")]
static WIDGET_EXT: &'static str = include_str!("../resources/stylesheets/policyholder_check.css"); static STYLESHEET: &'static str = include_str!("../resources/stylesheets/advotracker.css");
fn get_theme() -> ThemeValue { fn get_theme() -> ThemeValue {
//ThemeValue::create_from_css(LIGHT_THEME_EXTENSION_CSS) //ThemeValue::create_from_css(LIGHT_THEME_EXTENSION_CSS)
ThemeValue::create_from_css(DEFAULT_THEME_CSS) ThemeValue::create_from_css(DEFAULT_THEME_CSS)
.extension_css(WIDGET_EXT) .extension_css(STYLESHEET)
.build() .build()
} }
@@ -31,8 +35,8 @@ fn main() {
Window::new() Window::new()
//.title("OrbTk - Policyholder checker example") //.title("OrbTk - Policyholder checker example")
.title("AdvoTracker - Versicherungsnummern") .title("AdvoTracker - Versicherungsnummern")
.position((-500.0, -100.0)) .position((500.0, 100.0))
.size(480.0, 260.0) .size(640.0, 480.0)
.min_width(460.0) .min_width(460.0)
.min_height(180.0) .min_height(180.0)
.resizeable(true) .resizeable(true)