More styling

This commit is contained in:
2026-08-01 19:36:43 +03:00
parent 9a1d68aac1
commit 42d0488f23
13 changed files with 295 additions and 253 deletions
+7 -17
View File
@@ -11,7 +11,7 @@ use iced::widget::button::{danger, Status};
pub use iced::widget::button::{Catalog, Style};
use iced::widget::container::bordered_box;
use iced::widget::{button, column, container, radio, row, scrollable, space, text, text_input, Column};
use iced::{Background, Border, Center, Color, Element, Fill, Left, Length, Shadow, Task, Theme};
use iced::{Background, Border, Center, Color, Element, Fill, Length, Shadow, Task, Theme};
use rhai::{Engine, Scope};
use std::sync::{Arc, Mutex};
@@ -120,10 +120,7 @@ impl RepetitionsState {
}
pub fn view(&self) -> Element<'_, RepetitionsMessage> {
container(
iced::widget::column![
button("Назад").style(jl_button).on_press(RepetitionsMessage::Back),
row![
back_overlay(row![
column![
scrollable(self.sets_list()).height(Fill),
button("Добавить").style(jl_button)
@@ -135,17 +132,10 @@ impl RepetitionsState {
self.selected_set_view(),
self.launch_button()
]
.align_y(Center)
.spacing(DEFAULT_SPACING)
.width(Fill)
.height(Fill)
]
.align_x(Left)
.width(Fill),
)
.center_x(Fill)
.padding(10)
.into()
.align_y(Center)
.spacing(DEFAULT_SPACING)
.width(Fill)
.height(Fill).into(), RepetitionsMessage::Back)
}
fn launch_button(&self) -> Element<'_, RepetitionsMessage> {
@@ -223,7 +213,7 @@ impl RepetitionsState {
fn count_view(&self, set: &CardSetSettings) -> Element<'_, RepetitionsMessage> {
if let Some(count) = set.count {
return text!("Колличество слов: {}", count).into();
return text!("Количество слов: {}", count).into();
}
space().into()
}