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| {
|
||||
ui.horizontal(|ui| {
|
||||
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())
|
||||
.unwrap_or("—");
|
||||
|
||||
ui.push_id(("batch_item", idx), |ui| {
|
||||
ui.group(|ui| {
|
||||
ui.horizontal(|ui| {
|
||||
let (icon, color) = match &item.state {
|
||||
@@ -193,18 +194,22 @@ impl BatchPanel {
|
||||
ExecutionState::Error(_) => ("✗", egui::Color32::RED),
|
||||
};
|
||||
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| {
|
||||
if !is_processing && matches!(item.state, ExecutionState::Idle) {
|
||||
if ui.small_button("✕ Remover").clicked() {
|
||||
ui.with_layout(
|
||||
egui::Layout::right_to_left(egui::Align::Center),
|
||||
|ui| {
|
||||
if !is_processing && matches!(item.state, ExecutionState::Idle)
|
||||
{
|
||||
if ui.small_button("🗑 Remover").clicked() {
|
||||
events.push(BatchPanelEvent::RemoveItem(idx));
|
||||
}
|
||||
if ui.small_button("✏ Editar").clicked() {
|
||||
open_edit_for = Some(idx);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
let track_count = item.project.tracks.len();
|
||||
@@ -228,12 +233,15 @@ impl BatchPanel {
|
||||
.max_height(120.0)
|
||||
.show(ui, |ui| {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -364,19 +372,21 @@ impl BatchPanel {
|
||||
.file_name()
|
||||
.and_then(|n| n.to_str())
|
||||
.unwrap_or("—");
|
||||
ui.push_id(("audio", i), |ui| {
|
||||
ui.horizontal(|ui| {
|
||||
ui.label(
|
||||
egui::RichText::new(format!(" 🎵 {} [{}]", name, audio.language))
|
||||
.small(),
|
||||
);
|
||||
if ui
|
||||
.small_button("✕")
|
||||
.small_button("🗑")
|
||||
.on_hover_text("Remover faixa")
|
||||
.clicked()
|
||||
{
|
||||
remove_audio = Some(i);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
if let Some(i) = remove_audio {
|
||||
self.form_pending_audio.remove(i);
|
||||
@@ -390,19 +400,21 @@ impl BatchPanel {
|
||||
.file_name()
|
||||
.and_then(|n| n.to_str())
|
||||
.unwrap_or("—");
|
||||
ui.push_id(("sub", i), |ui| {
|
||||
ui.horizontal(|ui| {
|
||||
ui.label(
|
||||
egui::RichText::new(format!(" 💬 {} [{}]", name, sub.language))
|
||||
.small(),
|
||||
);
|
||||
if ui
|
||||
.small_button("✕")
|
||||
.small_button("🗑")
|
||||
.on_hover_text("Remover faixa")
|
||||
.clicked()
|
||||
{
|
||||
remove_sub = Some(i);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
if let Some(i) = remove_sub {
|
||||
self.form_pending_subtitles.remove(i);
|
||||
|
||||
Reference in New Issue
Block a user