Add constants for Diopser's editor
This commit is contained in:
parent
5b05107f5b
commit
dfd5aa9a11
|
@ -29,6 +29,9 @@ mod button;
|
||||||
/// VIZIA uses points instead of pixels for text
|
/// VIZIA uses points instead of pixels for text
|
||||||
const POINT_SCALE: f32 = 0.75;
|
const POINT_SCALE: f32 = 0.75;
|
||||||
|
|
||||||
|
const EDITOR_WIDTH: u32 = 600;
|
||||||
|
const EDITOR_HEIGHT: u32 = 490;
|
||||||
|
|
||||||
#[derive(Lens)]
|
#[derive(Lens)]
|
||||||
struct Data {
|
struct Data {
|
||||||
params: Arc<DiopserParams>,
|
params: Arc<DiopserParams>,
|
||||||
|
@ -42,7 +45,7 @@ impl Model for Data {}
|
||||||
|
|
||||||
// Makes sense to also define this here, makes it a bit easier to keep track of
|
// Makes sense to also define this here, makes it a bit easier to keep track of
|
||||||
pub(crate) fn default_state() -> Arc<ViziaState> {
|
pub(crate) fn default_state() -> Arc<ViziaState> {
|
||||||
ViziaState::from_size(600, 490)
|
ViziaState::from_size(EDITOR_WIDTH, EDITOR_HEIGHT)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn create(
|
pub(crate) fn create(
|
||||||
|
|
Loading…
Reference in a new issue