Merge pull request #1017 from marcoarnulfo/feat/layer-context-add-marker
# Conflicts: # crates/ui-egui/tests/ui_blank_context_menus.rs
This commit is contained in:
@@ -305,6 +305,7 @@ const JAPANESE: &[(&str, &str)] = &[
|
||||
("MIT OR Apache-2.0 • Fonts: Inter, JetBrains Mono (OFL)", "MIT OR Apache-2.0 • フォント:Inter、JetBrains Mono (OFL)"),
|
||||
("Magnification ratio popup", "拡大率のポップアップ"),
|
||||
("Make Comp Size", "コンポジションサイズにする"),
|
||||
("Markers", "マーカー"),
|
||||
("Masks", "マスク"),
|
||||
("Maximize Panel", "パネルを最大化"),
|
||||
("Media Replacement", "メディアの置き換え"),
|
||||
@@ -841,6 +842,7 @@ const SIMPLIFIED_CHINESE: &[(&str, &str)] = &[
|
||||
("MIT OR Apache-2.0 • Fonts: Inter, JetBrains Mono (OFL)", "MIT 或 Apache-2.0 • 字体:Inter、JetBrains Mono(OFL)"),
|
||||
("Magnification ratio popup", "放大倍率弹出菜单"),
|
||||
("Make Comp Size", "设为合成长宽"),
|
||||
("Markers", "标记"),
|
||||
("Masks", "蒙版"),
|
||||
("Maximize Panel", "最大化面板"),
|
||||
("Media Replacement", "媒体替换"),
|
||||
@@ -1565,6 +1567,7 @@ const TRADITIONAL_CHINESE: &[(&str, &str)] = &[
|
||||
("MIT OR Apache-2.0 • Fonts: Inter, JetBrains Mono (OFL)", "MIT 或 Apache-2.0 • 字型:Inter、JetBrains Mono(OFL)"),
|
||||
("Magnification ratio popup", "放大倍率快顯選單"),
|
||||
("Make Comp Size", "設為合成長寬"),
|
||||
("Markers", "標記"),
|
||||
("Masks", "遮色片"),
|
||||
("Maximize Panel", "最大化面板"),
|
||||
("Media Replacement", "媒體替換"),
|
||||
@@ -2292,6 +2295,7 @@ const UKRAINIAN: &[(&str, &str)] = &[
|
||||
("MIT OR Apache-2.0 • Fonts: Inter, JetBrains Mono (OFL)", "MIT OR Apache-2.0 • Шрифти: Inter, JetBrains Mono (OFL)"),
|
||||
("Magnification ratio popup", "Меню коефіцієнта збільшення"),
|
||||
("Make Comp Size", "За розміром композиції"),
|
||||
("Markers", "Маркери"),
|
||||
("Masks", "Маски"),
|
||||
("Maximize Panel", "Розгорнути панель"),
|
||||
("Media Replacement", "Заміна матеріалу"),
|
||||
@@ -2831,6 +2835,7 @@ const PORTUGUESE: &[(&str, &str)] = &[
|
||||
("MIT OR Apache-2.0 • Fonts: Inter, JetBrains Mono (OFL)", "MIT OU Apache-2.0 • Fontes: Inter, JetBrains Mono (OFL)"),
|
||||
("Magnification ratio popup", "Menu de proporção de ampliação"),
|
||||
("Make Comp Size", "Ajustar ao tamanho da composição"),
|
||||
("Markers", "Marcadores"),
|
||||
("Masks", "Máscaras"),
|
||||
("Maximize Panel", "Maximizar painel"),
|
||||
("Media Replacement", "Substituição de mídia"),
|
||||
@@ -3277,6 +3282,7 @@ const CZECH: &[(&str, &str)] = &[
|
||||
("MIT OR Apache-2.0 • Fonts: Inter, JetBrains Mono (OFL)", "MIT OR Apache-2.0 • Písma: Inter, JetBrains Mono (OFL)"),
|
||||
("Magnification ratio popup", "Nabídka míry přiblížení"),
|
||||
("Make Comp Size", "Nastavit velikost kompozice"),
|
||||
("Markers", "Značky"),
|
||||
("Masks", "Masky"),
|
||||
("Maximize Panel", "Maximalizovat panel"),
|
||||
("Media Replacement", "Nahrazení médií"),
|
||||
|
||||
@@ -1836,6 +1836,11 @@ fn handle_shortcuts_impl(app: &mut EffectcraftApp, ctx: &egui::Context, tab_only
|
||||
// comes as text.
|
||||
if !tab_only && clipboard && app.dialog.is_none() && ctx.input(|i| i.events.iter().any(|e| matches!(e, egui::Event::Text(t) if t == "*"))) {
|
||||
let bound = app.session.shortcuts().bindings().into_iter().find(|(k, _)| *k == "Num*").map(|(_, b)| (b.command.clone(), b.params.clone()));
|
||||
// As in After Effects, it marks the selected layers; only with none selected does it add
|
||||
// a composition marker (#976).
|
||||
let bound = bound.map(|(id, params)| {
|
||||
if id == "comp.addMarker" && !app.session.state.selected_layers.is_empty() { ("layer.addMarker".to_owned(), params) } else { (id, params) }
|
||||
});
|
||||
if let Some((id, params)) = bound
|
||||
&& let Err(e) = invoke(app, ctx, &id, if params.is_null() { json!({}) } else { params })
|
||||
{
|
||||
|
||||
@@ -3798,6 +3798,9 @@ pub(crate) fn layer_menu(ui: &mut egui::Ui, layers: &[u64], vector: bool, action
|
||||
item(ui, "Freeze Frame", "layer.freezeFrame", json!({"layers": layers}));
|
||||
item(ui, "Freeze on Last Frame", "layer.freezeOnLastFrame", json!({"layers": layers}));
|
||||
});
|
||||
ui.menu_button(crate::i18n::tr("Markers"), |ui| {
|
||||
item(ui, "Add Marker", "layer.addMarker", json!({"layers": layers}));
|
||||
});
|
||||
ui.menu_button(crate::i18n::tr("Blending Mode"), |ui| {
|
||||
widgets::menu_scroll(ui, |ui| {
|
||||
for m in BlendMode::ALL {
|
||||
|
||||
Reference in New Issue
Block a user