Font update
This commit is contained in:
+6
-8
@@ -6,7 +6,7 @@ use crate::dictionary_test::DictionaryQuizState;
|
||||
use crate::lang::{WordData, WordGroup};
|
||||
use crate::word::WordState;
|
||||
use crate::Page::Word;
|
||||
use crate::{AppState, NavigatedPage, Page, RootMessage, DEFAULT_SPACING};
|
||||
use crate::{jl_text_input, AppState, NavigatedPage, Page, RootMessage, DEFAULT_SPACING};
|
||||
use chrono::{DateTime, TimeDelta, Utc};
|
||||
use iced::alignment::Vertical::Center;
|
||||
use iced::widget::button::Style;
|
||||
@@ -308,7 +308,6 @@ impl DictionaryState {
|
||||
}
|
||||
|
||||
fn words_list(&self) -> iced::Element<'_, DictionaryMessage> {
|
||||
let time = Instant::now();
|
||||
let mut col = Column::new().width(Length::Fill);
|
||||
|
||||
let mut range = (0..self.include_map.len()).collect::<Vec<_>>();
|
||||
@@ -346,21 +345,21 @@ impl DictionaryState {
|
||||
.push(space().width(10));
|
||||
|
||||
line = line.push(
|
||||
text_input("Слово", &word.key)
|
||||
jl_text_input("Слово", &word.key)
|
||||
.size(20)
|
||||
.width(Length::Fill)
|
||||
.on_input(move |string| DictionaryMessage::SetKey(i, string))
|
||||
.on_submit(DictionaryMessage::SubmitWord(i)),
|
||||
);
|
||||
line = line.push(
|
||||
text_input("Перевод", &word.value)
|
||||
jl_text_input("Перевод", &word.value)
|
||||
.size(20)
|
||||
.width(Length::Fill)
|
||||
.on_input(move |string| DictionaryMessage::SetValue(i, string))
|
||||
.on_submit(DictionaryMessage::SubmitWord(i)),
|
||||
);
|
||||
line = line.push(
|
||||
text_input("Тэги", &word.tags)
|
||||
jl_text_input("Тэги", &word.tags)
|
||||
.size(20)
|
||||
.width(Length::Fill)
|
||||
.on_input(move |string| DictionaryMessage::SetTags(i, string))
|
||||
@@ -390,7 +389,6 @@ impl DictionaryState {
|
||||
col = col.push(line);
|
||||
}
|
||||
|
||||
println!("Words rendering time: {:?}", time.elapsed());
|
||||
scrollable(col).height(Length::Fill).into()
|
||||
}
|
||||
|
||||
@@ -398,7 +396,7 @@ impl DictionaryState {
|
||||
let dict = &self.state.lock().unwrap().dictionary;
|
||||
|
||||
iced::widget::column![
|
||||
text_input("Поиск", &self.search)
|
||||
jl_text_input("Поиск", &self.search)
|
||||
.on_input(DictionaryMessage::Search)
|
||||
.width(Length::Fill),
|
||||
text!("Всего слов: {}", dict.len()),
|
||||
@@ -533,7 +531,7 @@ impl DictionaryState {
|
||||
scrollable(row).width(Length::Fill).horizontal(),
|
||||
row![
|
||||
button("⇳").on_press(ChangeDirection),
|
||||
text_input("Название группы слов", &group.name)
|
||||
jl_text_input("Название группы слов", &group.name)
|
||||
.on_input(EditGroup)
|
||||
.width(250)
|
||||
.on_submit(SaveGroup),
|
||||
|
||||
Reference in New Issue
Block a user