Fix icons and fonts
This commit is contained in:
+1
-1
@@ -750,7 +750,7 @@ impl App {
|
|||||||
};
|
};
|
||||||
items.push(elem);
|
items.push(elem);
|
||||||
if i < passos.len() - 1 {
|
if i < passos.len() - 1 {
|
||||||
items.push(text(" › ").size(13).color(t::TEXT_MUTED).into());
|
items.push(text(" > ").size(13).color(t::TEXT_MUTED).into());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ pub fn controles_paginacao(
|
|||||||
msg_anterior: Message,
|
msg_anterior: Message,
|
||||||
msg_proximo: Message,
|
msg_proximo: Message,
|
||||||
) -> Element<'static, Message> {
|
) -> Element<'static, Message> {
|
||||||
let btn_anterior = button("◀")
|
let btn_anterior = button("<")
|
||||||
.on_press_maybe((pagina_atual > 0).then_some(msg_anterior))
|
.on_press_maybe((pagina_atual > 0).then_some(msg_anterior))
|
||||||
.style(t::btn_ghost);
|
.style(t::btn_ghost);
|
||||||
|
|
||||||
let btn_proximo = button("▶")
|
let btn_proximo = button(">")
|
||||||
.on_press_maybe((pagina_atual + 1 < total_paginas).then_some(msg_proximo))
|
.on_press_maybe((pagina_atual + 1 < total_paginas).then_some(msg_proximo))
|
||||||
.style(t::btn_ghost);
|
.style(t::btn_ghost);
|
||||||
|
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ pub fn view(app: &App) -> Element<'_, Message> {
|
|||||||
Column::with_children(
|
Column::with_children(
|
||||||
erros
|
erros
|
||||||
.iter()
|
.iter()
|
||||||
.map(|e| text(format!("⚠ {}", e)).size(13).color(t::DANGER).into())
|
.map(|e| text(format!("(!) {}", e)).size(13).color(t::DANGER).into())
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
)
|
)
|
||||||
.spacing(4),
|
.spacing(4),
|
||||||
@@ -137,19 +137,19 @@ pub fn view(app: &App) -> Element<'_, Message> {
|
|||||||
|
|
||||||
let botoes = container(
|
let botoes = container(
|
||||||
row![
|
row![
|
||||||
button(text("◀ Voltar").size(13))
|
button(text("Voltar").size(13))
|
||||||
.on_press(Message::Voltar)
|
.on_press(Message::Voltar)
|
||||||
.style(t::btn_ghost)
|
.style(t::btn_ghost)
|
||||||
.padding([9, 14]),
|
.padding([9, 14]),
|
||||||
button(text("▶ Importar e Analisar").size(13))
|
button(text("Importar e Analisar").size(13))
|
||||||
.on_press_maybe((valido && tem_arquivo).then_some(Message::ExecutarImportacao))
|
.on_press_maybe((valido && tem_arquivo).then_some(Message::ExecutarImportacao))
|
||||||
.style(t::btn_primary)
|
.style(t::btn_primary)
|
||||||
.padding([9, 14]),
|
.padding([9, 14]),
|
||||||
button(text("🔄 Reanalisar").size(13))
|
button(text("Reanalisar").size(13))
|
||||||
.on_press_maybe((valido && tem_notas).then_some(Message::ReanalisarArquivo))
|
.on_press_maybe((valido && tem_notas).then_some(Message::ReanalisarArquivo))
|
||||||
.style(t::btn_secondary)
|
.style(t::btn_secondary)
|
||||||
.padding([9, 14]),
|
.padding([9, 14]),
|
||||||
button(text("💾 Salvar layout").size(13))
|
button(text("Salvar layout").size(13))
|
||||||
.on_press(Message::SalvarLayout)
|
.on_press(Message::SalvarLayout)
|
||||||
.style(t::btn_ghost)
|
.style(t::btn_ghost)
|
||||||
.padding([9, 14]),
|
.padding([9, 14]),
|
||||||
|
|||||||
@@ -13,14 +13,43 @@ pub fn view(app: &App) -> Element<'_, Message> {
|
|||||||
(app.nome_arquivo.clone(), true)
|
(app.nome_arquivo.clone(), true)
|
||||||
};
|
};
|
||||||
|
|
||||||
let icone_arquivo: Element<Message> = text(if tem_arquivo { "📄" } else { "📂" })
|
let icone_arquivo: Element<Message> = container(
|
||||||
.size(32)
|
text(if tem_arquivo { "CSV / XLSX" } else { "Arquivo" })
|
||||||
.color(if tem_arquivo {
|
.size(12)
|
||||||
t::PRIMARY
|
.color(if tem_arquivo {
|
||||||
} else {
|
t::PRIMARY
|
||||||
t::TEXT_MUTED
|
} else {
|
||||||
})
|
t::TEXT_MUTED
|
||||||
.into();
|
}),
|
||||||
|
)
|
||||||
|
.padding([6, 12])
|
||||||
|
.style(move |_theme| iced::widget::container::Style {
|
||||||
|
background: Some(
|
||||||
|
iced::Color {
|
||||||
|
a: 0.1,
|
||||||
|
..if tem_arquivo {
|
||||||
|
t::PRIMARY
|
||||||
|
} else {
|
||||||
|
t::TEXT_MUTED
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.into(),
|
||||||
|
),
|
||||||
|
border: iced::Border {
|
||||||
|
color: iced::Color {
|
||||||
|
a: 0.3,
|
||||||
|
..if tem_arquivo {
|
||||||
|
t::PRIMARY
|
||||||
|
} else {
|
||||||
|
t::TEXT_MUTED
|
||||||
|
}
|
||||||
|
},
|
||||||
|
width: 1.0,
|
||||||
|
radius: 6.0.into(),
|
||||||
|
},
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
.into();
|
||||||
|
|
||||||
let texto_arquivo: Element<Message> = if tem_arquivo {
|
let texto_arquivo: Element<Message> = if tem_arquivo {
|
||||||
let nome_str = nome_arquivo.clone();
|
let nome_str = nome_arquivo.clone();
|
||||||
@@ -137,7 +166,7 @@ pub fn view(app: &App) -> Element<'_, Message> {
|
|||||||
|
|
||||||
// ── Botão avançar ─────────────────────────────────────────────────────────
|
// ── Botão avançar ─────────────────────────────────────────────────────────
|
||||||
let botao_avancar: Element<Message> = if tem_arquivo {
|
let botao_avancar: Element<Message> = if tem_arquivo {
|
||||||
button(row![text("Configurar Colunas ▶").size(14)].align_y(Alignment::Center))
|
button(row![text("Configurar Colunas").size(14)].align_y(Alignment::Center))
|
||||||
.on_press(Message::IrParaConfiguracaoColunas)
|
.on_press(Message::IrParaConfiguracaoColunas)
|
||||||
.style(t::btn_primary)
|
.style(t::btn_primary)
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use iced::{Alignment, Element, Length};
|
|||||||
/// Tela de gerenciamento de layouts.
|
/// Tela de gerenciamento de layouts.
|
||||||
pub fn view(app: &App) -> Element<'_, Message> {
|
pub fn view(app: &App) -> Element<'_, Message> {
|
||||||
let cabecalho = row![
|
let cabecalho = row![
|
||||||
button("< Voltar")
|
button("Voltar")
|
||||||
.on_press(Message::IrParaImportacao)
|
.on_press(Message::IrParaImportacao)
|
||||||
.style(t::btn_secondary),
|
.style(t::btn_secondary),
|
||||||
horizontal_space(),
|
horizontal_space(),
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ pub fn view<'a>(app: &'a App, resultado: &'a ResultadoAnalise) -> Element<'a, Me
|
|||||||
|
|
||||||
// ── Botões de ação ────────────────────────────────────────────────────────
|
// ── Botões de ação ────────────────────────────────────────────────────────
|
||||||
let botoes_topo = row![
|
let botoes_topo = row![
|
||||||
button("< Nova Análise")
|
button("Nova Análise")
|
||||||
.on_press(Message::NovaAnalise)
|
.on_press(Message::NovaAnalise)
|
||||||
.style(t::btn_secondary)
|
.style(t::btn_secondary)
|
||||||
.width(Length::Shrink),
|
.width(Length::Shrink),
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ pub fn view<'a>(app: &'a App, abas: &'a [String], caminho: &'a PathBuf) -> Eleme
|
|||||||
.map(|aba| {
|
.map(|aba| {
|
||||||
let selecionada = aba == aba_atual;
|
let selecionada = aba == aba_atual;
|
||||||
let label = row![
|
let label = row![
|
||||||
text(if selecionada { "●" } else { "○" })
|
text(if selecionada { ">>" } else { " " })
|
||||||
.size(12)
|
.size(12)
|
||||||
.color(if selecionada {
|
.color(if selecionada {
|
||||||
t::PRIMARY
|
t::PRIMARY
|
||||||
@@ -117,7 +117,7 @@ pub fn view<'a>(app: &'a App, abas: &'a [String], caminho: &'a PathBuf) -> Eleme
|
|||||||
let tem_preset = !app.nome_layout_atual.is_empty();
|
let tem_preset = !app.nome_layout_atual.is_empty();
|
||||||
let aba_selecionada = !aba_atual.is_empty();
|
let aba_selecionada = !aba_atual.is_empty();
|
||||||
|
|
||||||
let mut botoes = row![button(text("◀ Voltar").size(13))
|
let mut botoes = row![button(text("Voltar").size(13))
|
||||||
.on_press(Message::Voltar)
|
.on_press(Message::Voltar)
|
||||||
.style(t::btn_ghost)
|
.style(t::btn_ghost)
|
||||||
.padding([9, 14]),]
|
.padding([9, 14]),]
|
||||||
@@ -126,7 +126,7 @@ pub fn view<'a>(app: &'a App, abas: &'a [String], caminho: &'a PathBuf) -> Eleme
|
|||||||
|
|
||||||
if aba_selecionada && tem_preset {
|
if aba_selecionada && tem_preset {
|
||||||
botoes = botoes.push(
|
botoes = botoes.push(
|
||||||
button(text("Processar ▶").size(13))
|
button(text("Processar").size(13))
|
||||||
.on_press(Message::ExecutarImportacao)
|
.on_press(Message::ExecutarImportacao)
|
||||||
.style(t::btn_primary)
|
.style(t::btn_primary)
|
||||||
.padding([9, 14]),
|
.padding([9, 14]),
|
||||||
@@ -135,7 +135,7 @@ pub fn view<'a>(app: &'a App, abas: &'a [String], caminho: &'a PathBuf) -> Eleme
|
|||||||
|
|
||||||
if aba_selecionada {
|
if aba_selecionada {
|
||||||
botoes = botoes.push(
|
botoes = botoes.push(
|
||||||
button(text("⚙ Configurar Colunas").size(13))
|
button(text("Configurar Colunas").size(13))
|
||||||
.on_press(Message::IrParaConfiguracaoColunas)
|
.on_press(Message::IrParaConfiguracaoColunas)
|
||||||
.style(t::btn_secondary)
|
.style(t::btn_secondary)
|
||||||
.padding([9, 14]),
|
.padding([9, 14]),
|
||||||
|
|||||||
Reference in New Issue
Block a user