introduce View and Previews traits
In this commit we refactor the preview mechanism, and switch to responsive views by default. To create a preview, your view now has to implement the Preview trait. This is very similar to SwiftUI's preview mechanism. Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use crate::app::is_mobile;
|
||||
use crate::app_style::{create_text_styles, dark_mode, desktop_font_size, mobile_font_size};
|
||||
use crate::fonts::setup_fonts;
|
||||
use crate::ui::is_mobile;
|
||||
use eframe::NativeOptions;
|
||||
|
||||
pub const UI_SCALE_FACTOR: f32 = 0.2;
|
||||
|
||||
Reference in New Issue
Block a user