Gap 21: percentage guides and effect colour labels (#1095)
Guides can store a percent of the comp so they follow comp-size changes (View > Add Percentage Guide, Convert Guides to Percentage / Pixels); an effect instance has an optional colour label (effect.setLabel, Effect Controls header bar and Label menu). Both are serde-defaulted, so old projects load. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
470ea7a3af
commit
f11792827e
@@ -916,10 +916,10 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) {
|
||||
let style = app.session.prefs.grids.guide_style.clone();
|
||||
for g in &comp.guides {
|
||||
if g.vertical {
|
||||
let x = comp_rect.min.x + g.position as f32 * zoom;
|
||||
let x = comp_rect.min.x + g.px(comp.width, comp.height) as f32 * zoom;
|
||||
styled_line(&painter, [pos2(x, area.min.y), pos2(x, area.max.y)], stroke, &style);
|
||||
} else {
|
||||
let y = comp_rect.min.y + g.position as f32 * zoom;
|
||||
let y = comp_rect.min.y + g.px(comp.width, comp.height) as f32 * zoom;
|
||||
styled_line(&painter, [pos2(area.min.x, y), pos2(area.max.x, y)], stroke, &style);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user