Before font remake
This commit is contained in:
+13
-3
@@ -31,7 +31,7 @@ use crate::Page::{Dictionary, DictionaryQuiz, History, Quiz, Randomizer, Repetit
|
||||
use crate::RootMessage::Keyboard;
|
||||
use iced::keyboard::Event;
|
||||
use iced::widget::text;
|
||||
use iced::{keyboard, Element, Program, Subscription};
|
||||
use iced::{keyboard, Element, Program, Subscription, Theme};
|
||||
use iced::{Font, Task};
|
||||
use rusqlite::Connection;
|
||||
use std::sync::{Arc, Mutex};
|
||||
@@ -40,12 +40,22 @@ use crate::history::{HistoryMessage, HistoryState};
|
||||
|
||||
const DEFAULT_SPACING: f32 = 10.0;
|
||||
|
||||
const USER_FONT: Font = Font::with_name("Noto Sans JP");
|
||||
|
||||
fn main() -> iced::Result {
|
||||
iced::application(ScreenState::boot, ScreenState::update, ScreenState::view)
|
||||
.subscription(subscription)
|
||||
.title("Kana learn app")
|
||||
.settings(iced::Settings{
|
||||
default_text_size: iced::Pixels(16.0),
|
||||
..iced::Settings::default()
|
||||
})
|
||||
.font(include_bytes!("../ibmplex.ttf"))
|
||||
.font(include_bytes!("../noto.ttf"))
|
||||
.default_font(Font::with_name("Noto Sans JP"))
|
||||
.default_font(USER_FONT)
|
||||
.scale_factor(|x| 1.5)
|
||||
|
||||
.theme(Theme::GruvboxDark)
|
||||
.run()
|
||||
}
|
||||
|
||||
@@ -124,7 +134,7 @@ impl Default for ScreenState {
|
||||
}
|
||||
}
|
||||
|
||||
fn fill_state(mut state: &mut AppState) {
|
||||
fn fill_state(state: &mut AppState) {
|
||||
let list = load_words(&state.connection);
|
||||
let sets = load_sets(&state.connection);
|
||||
let groups = load_word_groups(&state.connection);
|
||||
|
||||
Reference in New Issue
Block a user