- Introduced a new theme for the application based on dark navy aesthetics. - Created design tokens for colors, spacings, and border radii. - Developed a theme module in Rust to manage styles for various UI components. - Updated multiple screens and components to align with the new design, including cards, buttons, badges, and progress bars. - Enhanced user experience with improved layouts and visual elements across the application.
32 lines
894 B
Rust
32 lines
894 B
Rust
use crate::ui::message::Message;
|
|
use crate::ui::theme as t;
|
|
use iced::widget::{button, row, text};
|
|
use iced::{Alignment, Element};
|
|
|
|
/// Renderiza controles de paginação reutilizáveis.
|
|
pub fn controles_paginacao(
|
|
pagina_atual: usize,
|
|
total_paginas: usize,
|
|
msg_anterior: Message,
|
|
msg_proximo: Message,
|
|
) -> Element<'static, Message> {
|
|
let btn_anterior = button("◀")
|
|
.on_press_maybe((pagina_atual > 0).then_some(msg_anterior))
|
|
.style(t::btn_ghost);
|
|
|
|
let btn_proximo = button("▶")
|
|
.on_press_maybe((pagina_atual + 1 < total_paginas).then_some(msg_proximo))
|
|
.style(t::btn_ghost);
|
|
|
|
row![
|
|
btn_anterior,
|
|
text(format!("Página {} / {}", pagina_atual + 1, total_paginas))
|
|
.size(13)
|
|
.color(t::TEXT_SECONDARY),
|
|
btn_proximo,
|
|
]
|
|
.spacing(8)
|
|
.align_y(Alignment::Center)
|
|
.into()
|
|
}
|