Match display selector rectangles to monitor aspect ratios
Gitea/pdf-presenter/pipeline/head There was a failure building this commit
Details
Gitea/pdf-presenter/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
c2584e5bed
commit
21198afa11
|
|
@ -2212,7 +2212,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "pdf-presenter"
|
||||
version = "0.1.28"
|
||||
version = "0.1.29"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"chrono",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ default-members = ["crates/pdf-presenter"]
|
|||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.28"
|
||||
version = "0.1.29"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
repository = "https://proxy.dandaedre.com/gitea/idle-org/pdf-presenter"
|
||||
|
|
|
|||
|
|
@ -773,8 +773,14 @@ pub fn presenter(ui: &mut Ui, s: &mut Studio, native: &mut UiState) {
|
|||
.show(ui, |ui| {
|
||||
ui.set_min_width(540.);
|
||||
ui.horizontal(|ui| {
|
||||
let (rect, _) =
|
||||
ui.allocate_exact_size(Vec2::new(64., 40.), Sense::hover());
|
||||
let (slot, _) =
|
||||
ui.allocate_exact_size(Vec2::splat(64.), Sense::hover());
|
||||
let dimensions =
|
||||
Vec2::new(m.size.0.max(1) as f32, m.size.1.max(1) as f32);
|
||||
let scale =
|
||||
(slot.width() / dimensions.x).min(slot.height() / dimensions.y);
|
||||
let rect =
|
||||
Rect::from_center_size(slot.center(), dimensions * scale);
|
||||
ui.painter()
|
||||
.rect_filled(rect, 4., ui.visuals().extreme_bg_color);
|
||||
ui.painter().rect_stroke(
|
||||
|
|
@ -787,7 +793,9 @@ pub fn presenter(ui: &mut Ui, s: &mut Studio, native: &mut UiState) {
|
|||
rect.center(),
|
||||
egui::Align2::CENTER_CENTER,
|
||||
(index + 1).to_string(),
|
||||
FontId::proportional(22.),
|
||||
FontId::proportional(
|
||||
22_f32.min(rect.width() * 0.5).min(rect.height() * 0.65),
|
||||
),
|
||||
ui.visuals().text_color(),
|
||||
);
|
||||
ui.vertical(|ui| {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,14 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
### 0.1.29
|
||||
|
||||
- Draw numbered screen rectangles in Displays using each monitor's pixel aspect
|
||||
ratio, including portrait and ultrawide screens. Keep their slots aligned and
|
||||
scale the screen number to fit. Linux tests, native X11 smoke, formatting,
|
||||
Clippy/rustdoc and Python checks pass; whole-app coverage is 86.72%.
|
||||
Physical multi-monitor and Windows/macOS validation were not run.
|
||||
|
||||
### 0.1.28
|
||||
|
||||
- Add Shift+Space to move back one slide from the presenter; Space still advances.
|
||||
|
|
|
|||
|
|
@ -189,6 +189,10 @@ Menu opens a dropdown below its button; click outside or press Escape to dismiss
|
|||
Displays uses numbered screen cards with direct Unused / Presenter / Presentation
|
||||
choices. Repeat a role to mirror it, then Apply and remember.
|
||||
|
||||
The numbered screen rectangles in **Displays** reflect each monitor’s pixel aspect
|
||||
ratio, so portrait, standard and ultrawide displays are easier to distinguish.
|
||||
They represent proportions, not physical screen size.
|
||||
|
||||
Menu → Appearance → Theme offers the same 20 built-in palettes as Canvas Pilot, including light,
|
||||
dark and High Contrast. Menu → Appearance → Language offers System, English and Français. System
|
||||
uses the native OS locale and falls back to English for other languages. Choices are
|
||||
|
|
|
|||
Loading…
Reference in New Issue