More styling

This commit is contained in:
micialware committed 2026-08-01 19:36:43 +03:00
1 parent 9a1d68aac1
commit 42d0488f23
13 files changed
+295 -253

No files matched your search

+13 -15
View File
@@ -1,11 +1,11 @@
use crate::repetitions::Style;
use iced::border::Radius;
use iced::Element;
use iced::widget::button::{primary, Status};
use iced::widget::{button, container};
use crate::repetitions::Style;
use iced_core::{Border, Theme};
use iced::Element;
use iced_core::alignment::Horizontal::Left;
use iced_core::Length::Fill;
use iced_core::{Border, Theme};
pub const DEFAULT_SPACING: f32 = 16.0;
pub const ACCENT_FONT_SIZE: f32 = 22.0;
@@ -13,8 +13,7 @@ const BUTTON_RADIUS: f32 = 8.0;
pub fn jl_button(theme: &Theme, status: Status) -> Style {
let mut style = primary(theme, status);
style.border = Border
{
style.border = Border {
color: Default::default(),
width: 0.0,
radius: Radius::new(BUTTON_RADIUS),
@@ -25,15 +24,14 @@ pub fn jl_button(theme: &Theme, status: Status) -> Style {
pub fn back_overlay<'a, T: Clone + 'a>(content: Element<'a, T>, back_message: T) -> Element<'a, T> {
container(
iced::widget::column![
button("Назад")
.style(jl_button)
.on_press(back_message),
button("Назад").style(jl_button).on_press(back_message),
content
]
.align_x(Left)
.width(Fill),
]
.spacing(5)
.align_x(Left)
.width(Fill),
)
.center_x(Fill)
.padding(10)
.into()
}
.center_x(Fill)
.padding(10)
.into()
}