feat: ajusta rótulo do botão de lote para remover ícone e melhorar legibilidade
This commit is contained in:
+1
-1
@@ -478,7 +478,7 @@ impl eframe::App for App {
|
|||||||
egui::TopBottomPanel::top("tab_bar").show(ctx, |ui| {
|
egui::TopBottomPanel::top("tab_bar").show(ctx, |ui| {
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
ui.selectable_value(&mut self.active_tab, ActiveTab::Single, "Projeto Único");
|
ui.selectable_value(&mut self.active_tab, ActiveTab::Single, "Projeto Único");
|
||||||
ui.selectable_value(&mut self.active_tab, ActiveTab::Batch, "🗂 Lote");
|
ui.selectable_value(&mut self.active_tab, ActiveTab::Batch, "Lote");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ impl BatchPanel {
|
|||||||
.and_then(|n| n.to_str())
|
.and_then(|n| n.to_str())
|
||||||
.unwrap_or("—");
|
.unwrap_or("—");
|
||||||
|
|
||||||
|
ui.push_id(("batch_item", idx), |ui| {
|
||||||
ui.group(|ui| {
|
ui.group(|ui| {
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
let (icon, color) = match &item.state {
|
let (icon, color) = match &item.state {
|
||||||
@@ -193,18 +194,22 @@ impl BatchPanel {
|
|||||||
ExecutionState::Error(_) => ("✗", egui::Color32::RED),
|
ExecutionState::Error(_) => ("✗", egui::Color32::RED),
|
||||||
};
|
};
|
||||||
ui.colored_label(color, icon);
|
ui.colored_label(color, icon);
|
||||||
ui.label(format!("#{} — {} → {}", idx + 1, source_name, output_name));
|
ui.label(format!("#{} — {} >> {}", idx + 1, source_name, output_name));
|
||||||
|
|
||||||
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
|
ui.with_layout(
|
||||||
if !is_processing && matches!(item.state, ExecutionState::Idle) {
|
egui::Layout::right_to_left(egui::Align::Center),
|
||||||
if ui.small_button("✕ Remover").clicked() {
|
|ui| {
|
||||||
|
if !is_processing && matches!(item.state, ExecutionState::Idle)
|
||||||
|
{
|
||||||
|
if ui.small_button("🗑 Remover").clicked() {
|
||||||
events.push(BatchPanelEvent::RemoveItem(idx));
|
events.push(BatchPanelEvent::RemoveItem(idx));
|
||||||
}
|
}
|
||||||
if ui.small_button("✏ Editar").clicked() {
|
if ui.small_button("✏ Editar").clicked() {
|
||||||
open_edit_for = Some(idx);
|
open_edit_for = Some(idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
let track_count = item.project.tracks.len();
|
let track_count = item.project.tracks.len();
|
||||||
@@ -228,12 +233,15 @@ impl BatchPanel {
|
|||||||
.max_height(120.0)
|
.max_height(120.0)
|
||||||
.show(ui, |ui| {
|
.show(ui, |ui| {
|
||||||
for line in &item.log_lines {
|
for line in &item.log_lines {
|
||||||
ui.label(egui::RichText::new(line).monospace().size(10.0));
|
ui.label(
|
||||||
|
egui::RichText::new(line).monospace().size(10.0),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}); // push_id
|
||||||
ui.add_space(4.0);
|
ui.add_space(4.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,19 +372,21 @@ impl BatchPanel {
|
|||||||
.file_name()
|
.file_name()
|
||||||
.and_then(|n| n.to_str())
|
.and_then(|n| n.to_str())
|
||||||
.unwrap_or("—");
|
.unwrap_or("—");
|
||||||
|
ui.push_id(("audio", i), |ui| {
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
ui.label(
|
ui.label(
|
||||||
egui::RichText::new(format!(" 🎵 {} [{}]", name, audio.language))
|
egui::RichText::new(format!(" 🎵 {} [{}]", name, audio.language))
|
||||||
.small(),
|
.small(),
|
||||||
);
|
);
|
||||||
if ui
|
if ui
|
||||||
.small_button("✕")
|
.small_button("🗑")
|
||||||
.on_hover_text("Remover faixa")
|
.on_hover_text("Remover faixa")
|
||||||
.clicked()
|
.clicked()
|
||||||
{
|
{
|
||||||
remove_audio = Some(i);
|
remove_audio = Some(i);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if let Some(i) = remove_audio {
|
if let Some(i) = remove_audio {
|
||||||
self.form_pending_audio.remove(i);
|
self.form_pending_audio.remove(i);
|
||||||
@@ -390,19 +400,21 @@ impl BatchPanel {
|
|||||||
.file_name()
|
.file_name()
|
||||||
.and_then(|n| n.to_str())
|
.and_then(|n| n.to_str())
|
||||||
.unwrap_or("—");
|
.unwrap_or("—");
|
||||||
|
ui.push_id(("sub", i), |ui| {
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
ui.label(
|
ui.label(
|
||||||
egui::RichText::new(format!(" 💬 {} [{}]", name, sub.language))
|
egui::RichText::new(format!(" 💬 {} [{}]", name, sub.language))
|
||||||
.small(),
|
.small(),
|
||||||
);
|
);
|
||||||
if ui
|
if ui
|
||||||
.small_button("✕")
|
.small_button("🗑")
|
||||||
.on_hover_text("Remover faixa")
|
.on_hover_text("Remover faixa")
|
||||||
.clicked()
|
.clicked()
|
||||||
{
|
{
|
||||||
remove_sub = Some(i);
|
remove_sub = Some(i);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if let Some(i) = remove_sub {
|
if let Some(i) = remove_sub {
|
||||||
self.form_pending_subtitles.remove(i);
|
self.form_pending_subtitles.remove(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user