134 lines
5.5 KiB
Markdown
134 lines
5.5 KiB
Markdown
# Patch notes — 0.4.1-glyphfix + about-overlay
|
||
|
||
## Patch 1: Glyphfix
|
||
|
||
The GUI (`src/bin/gui.rs`) used 11 Unicode glyphs that are not present in
|
||
iced 0.13's default embedded font (a subset of DejaVu Sans). Every missing
|
||
glyph rendered as a tofu box (□) on screen.
|
||
|
||
Affected locations (visible in the original screenshot):
|
||
|
||
| Glyph | Code point | Where it appeared |
|
||
|-------|------------|-------------------|
|
||
| 🛡 | U+1F6E1 | Brand icon, before "CORBELPURGE" |
|
||
| ▴ ▾ | U+25B4 / U+25BE | Chevrons before PATHS / OPTIONS / CONSOLE |
|
||
| █ | U+2588 | CONSOLE section label + gauge filled cells |
|
||
| ░ | U+2591 | Gauge empty cells (the 16-box string) |
|
||
| ✨ | U+2728 | CLEANED stat |
|
||
| 📄 | U+1F4C4 | COPIED stat |
|
||
| ⚠ | U+26A0 | ERRORS stat |
|
||
| ⏻ | U+23FB | START PROCESSING button |
|
||
| 🧹 | U+1F9F9 | CLEAR LOG button |
|
||
| ℹ | U+2139 | ABOUT / LICENSE button |
|
||
| • | U+2022 | Findings bullet (only visible with findings) |
|
||
|
||
### Note on the `pdf-render` glyphs
|
||
|
||
An earlier version of this patch also documented three glyphs that only
|
||
appeared when the optional `pdf-render` feature was enabled (📁 on the
|
||
IN/OUT browse buttons, ◀ ▶ on PDF prev/next page buttons, 🖱 on the
|
||
"view original PDF" button). The `pdf-render` feature was removed in
|
||
v0.4.2 — CorbelPurge scans four formats (PDF/EPUB/MD/DOCX) but only
|
||
PDF had a visual renderer, which was an inconsistency that wasn't worth
|
||
the pdfium dynamic-library dependency. Those three rows are kept out of
|
||
the table above since the code paths no longer exist.
|
||
|
||
### Fix
|
||
|
||
Swapped every problematic glyph for an ASCII equivalent that is guaranteed
|
||
to render in iced's default font. No new dependencies, no embedded fonts,
|
||
no binary-size regression.
|
||
|
||
| Old | New | Rationale |
|
||
|---------------|------|-----------|
|
||
| 🛡 | `[+]` | "protected" badge feel |
|
||
| ▴ (open) | `-` | CLI-standard "expanded" marker |
|
||
| ▾ (closed) | `+` | CLI-standard "collapsed" marker |
|
||
| █ (filled) | `#` | block character everyone has |
|
||
| ░ (empty) | `-` | clean empty-track look |
|
||
| ✨ | `*` | clean/done marker |
|
||
| 📄 | `>` | "copied out" arrow |
|
||
| ⚠ | `!` | universal warning |
|
||
| ⏻ | `>` | "start" arrow |
|
||
| 🧹 | `x` | universal clear/delete |
|
||
| ℹ | `i` | universal info |
|
||
| • | `*` | bullet, safe everywhere |
|
||
| 📁 | `...` | standard "browse" indicator |
|
||
|
||
### Alternative (not applied)
|
||
|
||
If you want prettier icons later, embed the `iced_fonts` crate
|
||
(https://crates.io/crates/iced_fonts) which bundles Noto Sans Symbols 2
|
||
and Bootstrap/Material icon fonts. Then restore the original glyphs and
|
||
apply `.font(iced_fonts::REQUIRED_FONT)` to each `text()` call. This adds
|
||
~600 KB to the binary but gives you proper iconography.
|
||
|
||
---
|
||
|
||
## Patch 2: About / License overlay
|
||
|
||
### Problem
|
||
|
||
The ABOUT / LICENSE button in the footer was wired up to nothing — it had
|
||
no `.on_press(...)` handler, so clicking it did nothing.
|
||
|
||
### Fix
|
||
|
||
Added a floating info panel overlay, modelled on the ferret about-panel
|
||
screenshot. Visual style:
|
||
|
||
- Dark panel background (`colors::panel()`)
|
||
- Gold border (`colors::gold()`, 1.5px, 6px rounded corners)
|
||
- Drop shadow (offset 4px down, 12px blur, 60% opacity)
|
||
- Close (X) button in the top-right corner of the panel header
|
||
- Structured content:
|
||
- Title "CORBELPURGE" + version (from `CARGO_PKG_VERSION`)
|
||
- Two-line description (from `Cargo.toml` description)
|
||
- Metadata rows: Author / Website / License (last two from
|
||
`CARGO_PKG_REPOSITORY` and `CARGO_PKG_LICENSE`)
|
||
- Thin separator
|
||
- Footer: tech stack + copyright
|
||
|
||
### Behavior
|
||
|
||
- Clicking ABOUT / LICENSE toggles the overlay open/closed.
|
||
- Clicking the X button (or pressing ABOUT / LICENSE again) closes it.
|
||
- When open, the main UI is dimmed (55% opacity black backdrop).
|
||
- No click-outside-to-close — see Implementation notes below.
|
||
|
||
### Implementation notes
|
||
|
||
iced 0.13 has no `Stack` widget (true non-modal overlays landed in
|
||
0.14). To emulate the ferret "floating panel over content" look without
|
||
adding a dependency, we use a full-window dim backdrop with the panel
|
||
positioned in the top-right via a `row + Space::Fill` layout.
|
||
|
||
Click-outside-to-close was considered but dropped: wrapping the panel
|
||
in a no-op `Button` would make every label inside the panel close the
|
||
modal on click (since iced 0.13 buttons don't stop event propagation to
|
||
their parent). ESC-key handling requires a keyboard subscription, which
|
||
is a separate feature.
|
||
|
||
### Future enhancements
|
||
|
||
1. **Upgrade to iced 0.14+** to get the `Stack` widget, enabling true
|
||
non-modal floating panels with click-outside-to-close.
|
||
2. **Add a keyboard subscription** for the Escape key to close the
|
||
overlay without needing to click the X button.
|
||
3. **Embed `iced_fonts`** and restore the original emoji glyphs for a
|
||
richer visual style.
|
||
4. **Make the website URL clickable** — currently it's just colored
|
||
text. iced 0.13 doesn't have a native hyperlink widget, but you
|
||
could shell out to `xdg-open` via a button.
|
||
|
||
### Files changed
|
||
|
||
- `src/bin/gui.rs`:
|
||
- Added `about_open: bool` to `CorbelGui` state
|
||
- Added `ToggleAbout` and `CloseAbout` Message variants + update handlers
|
||
- Wired ABOUT / LICENSE button's `on_press`
|
||
- Added `build_about_panel()` and `build_about_overlay()` functions
|
||
- Added `about_dim_style()`, `about_panel_style()`, `about_close_btn_style()` style helpers
|
||
- Modified `view()` to render the overlay when `about_open` is true
|
||
- No changes to `Cargo.toml` — no new dependencies added
|