Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ updates:
cooldown:
default-days: 7
groups:
# eframe and egui move together: egui is a direct dependency only for a feature, and a lone eframe
# bump would build two eguis and silently lose it. Before the other groups, so it wins.
egui:
patterns: ["eframe", "egui"]
patches:
update-types: [patch]
commit-message:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ refuses a tag without one.
- *Copy* puts encoded files on the clipboard, ready to paste into a conversation; *Show* opens their
folder.
- `install-sendto.ps1` adds the application to Explorer's *Send to* menu.

### Fixed

- The buttons' symbols are monochrome again, drawn with the window's own fonts instead of the
system's colour emoji.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ anyhow = "1.0.104"
cpal = "0.18.2"
crossbeam-channel = "0.5.17"
eframe = { version = "0.37.0", features = ["persistence"] }
# Only to turn on egui's monochrome symbol fonts (egui 0.37 no longer embeds them by default): the
# buttons' symbols stay monochrome instead of falling back to the system's colour emoji. Same version as
# eframe; Dependabot bumps both together.
egui = { version = "0.37.0", features = ["monochrome_emoji_fonts"] }
env_logger = "0.11.11"
log = "0.4.34"
rfd = "0.17.2"
Expand Down
26 changes: 26 additions & 0 deletions src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,3 +1046,29 @@ impl eframe::App for TranscoderApp {
eframe::set_value(storage, PREFERENCES_KEY, &self.prefs);
}
}

#[cfg(test)]
mod tests {
use eframe::egui::epaint::text::{FontDefinitions, FontId, Fonts, TextOptions};

/// Every symbol the window draws outside plain ASCII. Add one here when a label gains one.
const SYMBOLS: &str = "➕✔✖▶⏹⏶⏮◀⏸⏭🔇🔊➡≈·—…";

/// The symbols come from egui's own fonts (the `monochrome_emoji_fonts` feature), not from the
/// system's colour emoji: without a font provider, `has_glyphs` only sees the embedded fonts.
#[test]
fn symbols_are_in_the_embedded_fonts() {
let mut fonts = Fonts::new(TextOptions::default(), FontDefinitions::default());
let mut fonts = fonts.with_pixels_per_point(1.0);
let missing: Vec<String> = SYMBOLS
.chars()
.filter(|symbol| !fonts.has_glyphs(&FontId::proportional(14.0), &symbol.to_string()))
.map(|symbol| format!("{symbol} (U+{:04X})", symbol as u32))
.collect();
assert!(
missing.is_empty(),
"missing from egui's fonts: {}",
missing.join(", ")
);
}
}
6 changes: 3 additions & 3 deletions src/app/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ impl TranscoderApp {
ui.label("Codec");
egui::ComboBox::from_id_salt("codec")
.selected_text(format!(
"{} → {}",
"{} ➡ {}",
list_label(&after.codecs),
resolved(&after.codecs)
))
.width(220.0)
.show_ui(ui, |ui| {
for list in &lists {
let text = format!("{} → {}", list_label(list), resolved(list));
let text = format!("{} ➡ {}", list_label(list), resolved(list));
ui.selectable_value(&mut after.codecs, list.clone(), text);
}
})
Expand Down Expand Up @@ -735,7 +735,7 @@ impl TranscoderApp {
))
.weak(),
);
if ui.add_enabled(index > 0, egui::Button::new("▲")).on_hover_text("Move up").clicked() {
if ui.add_enabled(index > 0, egui::Button::new("⏶")).on_hover_text("Move up").clicked() {
raise = Some(index);
}
if ui.add_enabled(count > 1, egui::Button::new("✖")).on_hover_text("Delete").clicked() {
Expand Down