Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

feat(actions): add Button Mode on the current Actions model (#5213)

Zer0C00L01caad010b6179
diff --git a/crates/engine/src/actions_cmds.rs b/crates/engine/src/actions_cmds.rs
index 7ae557c48..d881a6112 100644
--- a/crates/engine/src/actions_cmds.rs
+++ b/crates/engine/src/actions_cmds.rs
@@ -45,11 +45,17 @@ pub struct Action {
/// filled by Load Actions (`actions.load`) and written by Save Actions (`actions.save`).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub set: Option<String>,
+ /// Button Mode colour. Empty is none; otherwise one of [`BUTTON_COLORS`].
+ #[serde(default, skip_serializing_if = "String::is_empty")]
+ pub color: String,
}
+/// Button Mode colours, in Photoshop's order. Empty is no colour.
+pub const BUTTON_COLORS: [&str; 8] = ["", "red", "orange", "yellow", "green", "blue", "violet", "gray"];
+
impl Action {
pub fn new(name: impl Into<String>, steps: Vec<(String, Value)>) -> Self {
- Self { name: name.into(), steps, disabled: BTreeSet::new(), dialogs: BTreeSet::new(), set: None }
+ Self { name: name.into(), steps, disabled: BTreeSet::new(), dialogs: BTreeSet::new(), set: None, color: String::new() }
}
/// Apply `f` to every per-step index set (`disabled`, `dialogs`) after steps moved.
@@ -235,7 +241,7 @@ fn get(s: &mut Session, p: &Value) -> Result<Value> {
let idx = resolve(&s.actions.list, p, "actions.get")?;
let action = &s.actions.list[idx];
let steps: Vec<Value> = action.steps.iter().map(|(id, params)| json!([id, params])).collect();
- Ok(json!({"name": action.name, "steps": steps, "disabled": action.disabled, "dialogs": action.dialogs, "set": action.set}))
+ Ok(json!({"name": action.name, "steps": steps, "disabled": action.disabled, "dialogs": action.dialogs, "set": action.set, "color": action.color}))
}
fn record(s: &mut Session, p: &Value) -> Result<Value> {
@@ -553,6 +559,25 @@ fn rename(s: &mut Session, p: &Value) -> Result<Value> {
Ok(json!({"action": name, "index": idx}))
}
+fn set_color(s: &mut Session, p: &Value) -> Result<Value> {
+ let cmd = "actions.setColor";
+ not_playing(s, cmd)?;
+ let idx = resolve(&s.actions.list, p, cmd)?;
+ let Some(color) = p.get("color").and_then(Value::as_str) else {
+ return Err(bad(cmd, "needs \"color\""));
+ };
+ if !BUTTON_COLORS.contains(&color) {
+ return Err(bad(cmd, "color must be empty, red, orange, yellow, green, blue, violet, or gray"));
+ }
+ let Some(action) = s.actions.list.get_mut(idx) else {
+ return Err(bad(cmd, "no such action"));
+ };
+ action.color = color.to_string();
+ let name = action.name.clone();
+ s.actions.touch();
+ Ok(json!({"action": name, "color": color}))
+}
+
pub fn specs() -> Vec<CommandSpec> {
vec![
CommandSpec {
@@ -580,7 +605,7 @@ pub fn specs() -> Vec<CommandSpec> {
label: "Get Action",
menu: &[],
shortcut: None,
- params: r##"{"action":name|index} → {name, steps:[[id, params]…], disabled:[step…], dialogs:[step…], set:name|null} (steps is the shape file.automate.batch and droplets take; disabled lists the 0-based steps playback skips; dialogs the steps whose dialog Photoshop would show; set the action set from Load Actions)"##,
+ params: r##"{"action":name|index} → {name, steps:[[id, params]…], disabled:[step…], dialogs:[step…], set:name|null, color:str} (steps is the shape file.automate.batch and droplets take; disabled lists the 0-based steps playback skips; dialogs the steps whose dialog Photoshop would show; set the action set from Load Actions; color is the Button Mode swatch, or empty)"##,
enabled: always,
run: get,
journal: false,
@@ -645,6 +670,16 @@ pub fn specs() -> Vec<CommandSpec> {
run: rename,
journal: false,
},
+ CommandSpec {
+ id: "actions.setColor",
+ label: "Set Action Color",
+ menu: &[],
+ shortcut: None,
+ params: r##"{"action":name|index, "color":""|"red"|"orange"|"yellow"|"green"|"blue"|"violet"|"gray"} → {action, color}. The Button Mode colour. Empty clears it."##,
+ enabled: always,
+ run: set_color,
+ journal: false,
+ },
]
}
@@ -1411,4 +1446,24 @@ mod tests {
let first = &s.documents()[0].doc;
assert_eq!((first.size.width, first.size.height), (48, 48), "the recording document keeps its own crop");
}
+
+ #[test]
+ fn button_color_is_one_of_the_photoshop_swatches() {
+ let mut s = Session::new();
+ s.execute("actions.record", json!({"name": "Print"})).unwrap();
+ s.execute("actions.stop", json!({})).unwrap();
+ let set = s.execute("actions.setColor", json!({"action": "Print", "color": "blue"})).unwrap();
+ assert_eq!(set["color"], "blue");
+ assert_eq!(s.actions.list[0].color, "blue");
+ assert_eq!(s.execute("actions.get", json!({"action": 0})).unwrap()["color"], "blue");
+ let saved = serde_json::to_string(&s.actions.list).unwrap();
+ assert!(saved.contains("blue"));
+ s.execute("actions.setColor", json!({"action": 0, "color": ""})).unwrap();
+ assert!(s.actions.list[0].color.is_empty());
+ assert!(!serde_json::to_string(&s.actions.list).unwrap().contains("color"), "an empty colour is omitted");
+ for bad in [json!({"action": 0, "color": "pink"}), json!({"action": 0}), json!({"action": 4, "color": "red"}), json!({"color": "red"})] {
+ assert!(s.execute("actions.setColor", bad).is_err());
+ }
+ assert!(s.actions.list[0].color.is_empty(), "rejected colours change nothing");
+ }
}
diff --git a/crates/ui-egui/src/actions.rs b/crates/ui-egui/src/actions.rs
index 930a7ba10..a5c2f15e9 100644
--- a/crates/ui-egui/src/actions.rs
+++ b/crates/ui-egui/src/actions.rs
@@ -23,6 +23,9 @@ pub struct ActionsUi {
pub expanded: Vec<bool>,
/// Set folders shown collapsed (Photoshop's set disclosure triangles).
pub collapsed_sets: Vec<String>,
+ /// Photoshop's Button Mode: each action is a coloured button, and a click plays it.
+ #[serde(default)]
+ pub button_mode: bool,
#[serde(skip)]
reveal_recording: Option<(usize, usize)>,
/// The action whose name is being edited in place (double-click on its name).
@@ -237,6 +240,24 @@ fn step_count(steps: usize, disabled: usize) -> String {
}
}
+fn button_fill(color: &str, t: &Tokens) -> Color32 {
+ // Photoshop's Actions button colours. Empty uses the panel card so an uncoloured action stays readable.
+ match color {
+ "red" => Color32::from_rgb(196, 64, 64),
+ "orange" => Color32::from_rgb(204, 120, 40),
+ "yellow" => Color32::from_rgb(196, 176, 48),
+ "green" => Color32::from_rgb(56, 140, 72),
+ "blue" => Color32::from_rgb(48, 104, 176),
+ "violet" => Color32::from_rgb(120, 72, 168),
+ "gray" => t.text_dim,
+ _ => t.card,
+ }
+}
+
+fn button_label_color(color: &str, t: &Tokens) -> Color32 {
+ if color.is_empty() { t.text } else { Color32::from_rgb(20, 20, 20) }
+}
+
fn paint_check(ui: &egui::Ui, rect: Rect, on: bool, t: &Tokens) {
let b = Rect::from_center_size(rect.center(), vec2(11.0, 11.0));
ui.painter().rect_stroke(b, 2.0, Stroke::new(1.0, t.text_faint), egui::StrokeKind::Inside);
@@ -585,6 +606,7 @@ struct Row {
disabled: std::collections::BTreeSet<usize>,
dialogs: std::collections::BTreeSet<usize>,
set: Option<String>,
+ color: String,
}
/// The panel's order: actions outside any set first, then each set folder (in order of first
@@ -614,7 +636,14 @@ pub fn panel(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
.list
.iter()
.enumerate()
- .map(|(i, a)| Row { name: a.name.clone(), steps: visible_steps(app, i), disabled: a.disabled.clone(), dialogs: a.dialogs.clone(), set: a.set.clone() })
+ .map(|(i, a)| Row {
+ name: a.name.clone(),
+ steps: visible_steps(app, i),
+ disabled: a.disabled.clone(),
+ dialogs: a.dialogs.clone(),
+ set: a.set.clone(),
+ color: a.color.clone(),
+ })
.collect();
if app
.ui
@@ -670,7 +699,7 @@ pub fn panel(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
}
let mut shown_set: Option<&str> = None;
for i in display_order(&rows) {
- let Row { name, steps, disabled, dialogs, set } = &rows[i];
+ let Row { name, steps, disabled, dialogs, set, color: swatch } = &rows[i];
// A set folder row before the first of its actions; collapsed folders hide them.
if let Some(set) = set.as_deref()
&& shown_set != Some(set)
@@ -719,9 +748,12 @@ pub fn panel(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
if reveal == Some((i, 0)) {
ui.scroll_to_rect(rect, Some(egui::Align::BOTTOM));
}
+ let button_mode = app.ui.actions.button_mode;
let sel = app.ui.actions.selected == Some(i) && app.ui.actions.selected_step.is_none();
resp.widget_info(|| egui::WidgetInfo::selected(egui::WidgetType::SelectableLabel, true, sel, name));
- if sel {
+ if button_mode {
+ ui.painter().rect_filled(rect, 3.0, button_fill(swatch, &t));
+ } else if sel {
ui.painter().rect_filled(rect, 0.0, t.row_selected);
} else if resp.hovered() {
ui.painter().rect_filled(rect, 0.0, t.hover.gamma_multiply(0.5));
@@ -729,14 +761,21 @@ pub fn panel(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
if let Some(change) = drag_row(ui, &resp, DragRow { action: i, step: None }, &t) {
moved = Some(change);
}
- let expanded = app.ui.actions.expanded.get(i).copied().unwrap_or(false);
- let tri = Rect::from_center_size(pos2(x0 + 12.0, rect.center().y), vec2(8.0, 8.0));
- let pts =
- if expanded { vec![tri.left_top(), tri.right_top(), tri.center_bottom()] } else { vec![tri.left_top(), tri.right_center(), tri.left_bottom()] };
- ui.painter().add(egui::Shape::convex_polygon(pts, t.text_dim, Stroke::NONE));
- crate::icons::paint(ui, Rect::from_center_size(pos2(x0 + 30.0, rect.center().y), vec2(16.0, 16.0)), "play", 11.0, t.icon);
+ let expanded = app.ui.actions.expanded.get(i).copied().unwrap_or(false) && !button_mode;
+ if !button_mode {
+ let tri = Rect::from_center_size(pos2(x0 + 12.0, rect.center().y), vec2(8.0, 8.0));
+ let pts = if expanded {
+ vec![tri.left_top(), tri.right_top(), tri.center_bottom()]
+ } else {
+ vec![tri.left_top(), tri.right_center(), tri.left_bottom()]
+ };
+ ui.painter().add(egui::Shape::convex_polygon(pts, t.text_dim, Stroke::NONE));
+ crate::icons::paint(ui, Rect::from_center_size(pos2(x0 + 30.0, rect.center().y), vec2(16.0, 16.0)), "play", 11.0, t.icon);
+ }
let recording_this = recording.is_some_and(|(_, r)| r == i);
let nsteps = steps.len();
+ let name_x = if button_mode { x0 + 8.0 } else { x0 + 44.0 };
+ let name_color = if button_mode { button_label_color(swatch, &t) } else { t.text };
let name_rect = if app.ui.actions.renaming.as_ref().is_some_and(|r| r.index == i) {
let field = Rect::from_min_max(pos2(x0 + 40.0, rect.top() + 3.0), pos2((rect.right() - 80.0).max(x0 + 120.0), rect.bottom() - 3.0));
if let Some(text) = rename_field(app, ui, i, field) {
@@ -744,27 +783,33 @@ pub fn panel(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
}
field
} else {
- ui.painter().text(pos2(x0 + 44.0, rect.center().y), Align2::LEFT_CENTER, name, egui::FontId::proportional(12.0), t.text)
+ ui.painter().text(pos2(name_x, rect.center().y), Align2::LEFT_CENTER, name, egui::FontId::proportional(12.0), name_color)
};
- ui.painter().text(
- pos2(rect.right() - 8.0, rect.center().y),
- Align2::RIGHT_CENTER,
- app.session
- .prefs()
- .shortcuts
- .get(&shortcut_id(name))
- .filter(|s| !s.is_empty())
- .map_or_else(|| step_count(nsteps, disabled.len()), |key| format!("{key} · {}", step_count(nsteps, disabled.len()))),
- egui::FontId::proportional(11.0),
- t.text_faint,
- );
+ if !button_mode {
+ ui.painter().text(
+ pos2(rect.right() - 8.0, rect.center().y),
+ Align2::RIGHT_CENTER,
+ app.session
+ .prefs()
+ .shortcuts
+ .get(&shortcut_id(name))
+ .filter(|s| !s.is_empty())
+ .map_or_else(|| step_count(nsteps, disabled.len()), |key| format!("{key} · {}", step_count(nsteps, disabled.len()))),
+ egui::FontId::proportional(11.0),
+ t.text_faint,
+ );
+ }
if recording_this {
ui.painter().circle_filled(pos2(rect.right() - 64.0, rect.center().y), 4.0, Color32::from_rgb(230, 60, 60));
}
if resp.clicked() {
app.ui.actions.selected = Some(i);
app.ui.actions.selected_step = None;
- if resp.interact_pointer_pos().is_some_and(|p| p.x < x0 + 20.0) {
+ if button_mode {
+ if !resp.double_clicked() {
+ play_idx = Some(i);
+ }
+ } else if resp.interact_pointer_pos().is_some_and(|p| p.x < x0 + 20.0) {
if app.ui.actions.expanded.len() <= i {
app.ui.actions.expanded.resize(i + 1, false);
}
@@ -781,8 +826,26 @@ pub fn panel(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
ui.close();
}
}
+ ui.separator();
+ ui.menu_button(tl!("Color"), |ui| {
+ for (id, label) in [
+ ("", tl!("None")),
+ ("red", tl!("Red")),
+ ("orange", tl!("Orange")),
+ ("yellow", tl!("Yellow")),
+ ("green", tl!("Green")),
+ ("blue", tl!("Blue")),
+ ("violet", tl!("Violet")),
+ ("gray", tl!("Gray")),
+ ] {
+ if ui.selectable_label(swatch == id, label).clicked() {
+ let _ = app.run("actions.setColor", json!({"action": i, "color": id}));
+ ui.close();
+ }
+ }
+ });
});
- if resp.double_clicked() {
+ if resp.double_clicked() && !button_mode {
// Photoshop renames in place when the name itself is double-clicked.
if resp.interact_pointer_pos().is_some_and(|p| name_rect.expand2(vec2(4.0, 13.0)).contains(p)) {
app.ui.actions.renaming = Some(RenameAction { index: i, text: name.clone(), focused: false });
@@ -902,6 +965,12 @@ pub fn panel(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
delete_selection(app);
}
});
+ let mode_label = if app.ui.actions.button_mode { tl!("Button Mode On") } else { tl!("Button Mode") };
+ let mode_button = ui.add_enabled(!recording_now, egui::Button::new(mode_label).small()).on_hover_text(tl!("Button Mode"));
+ mode_button.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, !recording_now, mode_label));
+ if mode_button.clicked() {
+ app.ui.actions.button_mode = !app.ui.actions.button_mode;
+ }
});
if let Some(i) = play_idx {
match app.run("actions.play", json!({"action": i})) {
@@ -1522,4 +1591,27 @@ mod tests {
assert_eq!(v["ran"], 3, "{v}");
assert!(v.get("paused").is_none());
}
+
+ #[test]
+ fn button_mode_plays_the_clicked_action_and_hides_its_steps() {
+ use egui_kittest::{Harness, kittest::Queryable};
+ let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default());
+ app.run("file.new", json!({"width": 16, "height": 16})).unwrap();
+ app.session.actions.list.push(Action::new("Print", vec![("layer.new.layer".into(), json!({}))]));
+ app.session.actions.list[0].color = "blue".into();
+ app.ui.actions.expanded = vec![true];
+ app.ui.actions.button_mode = true;
+ let mut h = Harness::builder().with_size(vec2(420.0, 280.0)).build_ui_state(|ui, app| panel(app, ui), app);
+ h.run_steps(3);
+ assert_eq!(h.query_all_by_role(egui::accesskit::Role::CheckBox).count(), 0, "button mode hides the step list");
+ let before = h.state().session.active().unwrap().doc.layers.len();
+ h.get_by_label("Print").click();
+ h.run_steps(3);
+ assert_eq!(h.state().session.active().unwrap().doc.layers.len(), before + 1, "a click plays the action");
+ h.get_by_label("Button Mode On").click();
+ h.run_steps(2);
+ assert!(!h.state().ui.actions.button_mode);
+ assert!(h.query_by_label("Button Mode").is_some());
+ assert_eq!(h.query_all_by_role(egui::accesskit::Role::CheckBox).count(), 1, "the step list returns when Button Mode is turned off");
+ }
}
diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv
index 9b63b9633..0649e19ec 100644
--- a/crates/ui-egui/src/i18n/cs.tsv
+++ b/crates/ui-egui/src/i18n/cs.tsv
@@ -3753,6 +3753,8 @@ navigator Zoom Zvětšení
Sent to {printer} Odesláno do {printer}
set in Print Settings… nastavuje se v nastavení tisku…
ICO is limited to 256 × 256 pixels ICO je omezen na 256 × 256 pixelů
+ Button Mode Režim tlačítka
+ Button Mode On Režim tlačítka zapnutý
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Ztmavit rozhraní
diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv
index 42bbbc993..994a060e1 100644
--- a/crates/ui-egui/src/i18n/de.tsv
+++ b/crates/ui-egui/src/i18n/de.tsv
@@ -3143,6 +3143,8 @@ curves Smooth Glätten
Sent to {printer} An {printer} gesendet
set in Print Settings… in den Druckeinstellungen festlegen…
ICO is limited to 256 × 256 pixels ICO ist auf 256 × 256 Pixel begrenzt
+ Button Mode Schaltflächenmodus
+ Button Mode On Schaltflächenmodus an
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Benutzeroberfläche abdunkeln
diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv
index a7d6b6f87..ed32798c5 100644
--- a/crates/ui-egui/src/i18n/el.tsv
+++ b/crates/ui-egui/src/i18n/el.tsv
@@ -3843,6 +3843,8 @@ curves Smooth Εξομάλυνση
Sent to {printer} Στάλθηκε στον {printer}
set in Print Settings… ορίζεται στις ρυθμίσεις εκτύπωσης…
ICO is limited to 256 × 256 pixels Το ICO περιορίζεται σε 256 × 256 εικονοστοιχεία
+ Button Mode Λειτουργία κουμπιών
+ Button Mode On Λειτουργία κουμπιών ενεργή
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Σκουρότερο περιβάλλον
diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv
index 3fa765518..cf812df12 100644
--- a/crates/ui-egui/src/i18n/es.tsv
+++ b/crates/ui-egui/src/i18n/es.tsv
@@ -2830,6 +2830,8 @@ curves Smooth Suavizar
Sent to {printer} Enviado a {printer}
set in Print Settings… se establece en Ajustes de impresión…
ICO is limited to 256 × 256 pixels ICO está limitado a 256 × 256 píxeles
+ Button Mode Modo de botón
+ Button Mode On Modo de botón activado
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Oscurecer interfaz
diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv
index f1d11f19a..2181c1551 100644
--- a/crates/ui-egui/src/i18n/fr.tsv
+++ b/crates/ui-egui/src/i18n/fr.tsv
@@ -3147,6 +3147,8 @@ curves Smooth Lisser
Sent to {printer} Envoyé à {printer}
set in Print Settings… défini dans les paramètres d’impression…
ICO is limited to 256 × 256 pixels Le format ICO est limité à 256 × 256 pixels
+ Button Mode Mode bouton
+ Button Mode On Mode bouton activé
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Assombrir l'interface
diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv
index e3f427921..640c18b61 100644
--- a/crates/ui-egui/src/i18n/hu.tsv
+++ b/crates/ui-egui/src/i18n/hu.tsv
@@ -4066,6 +4066,8 @@ cameraRaw Yellow Sárga
Ink Characteristics Festék jellemzői
Solidity: Fedőképesség:
Redrawing Újrarajzolás
+ Button Mode Gomb mód
+ Button Mode On Gomb mód be
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Felület sötétítése
diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv
index 6b7aca6ff..8ccf77838 100644
--- a/crates/ui-egui/src/i18n/id.tsv
+++ b/crates/ui-egui/src/i18n/id.tsv
@@ -3134,6 +3134,8 @@ curves Smooth Haluskan
Sent to {printer} Dikirim ke {printer}
set in Print Settings… diatur di Pengaturan Cetak…
ICO is limited to 256 × 256 pixels ICO dibatasi hingga 256 × 256 piksel
+ Button Mode Mode tombol
+ Button Mode On Mode tombol aktif
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Gelapkan Antarmuka
diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv
index 06efc8d9f..52eb1aec1 100644
--- a/crates/ui-egui/src/i18n/it.tsv
+++ b/crates/ui-egui/src/i18n/it.tsv
@@ -4108,6 +4108,8 @@ navigator Zoom Zoom
Sent to {printer} Inviato a {printer}
set in Print Settings… impostato nelle impostazioni di stampa…
ICO is limited to 256 × 256 pixels ICO è limitato a 256 × 256 pixel
+ Button Mode Modalità pulsante
+ Button Mode On Modalità pulsante attiva
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Scurisci interfaccia
Lighten Interface Schiarisci interfaccia
diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv
index 7890c916f..230672b1e 100644
--- a/crates/ui-egui/src/i18n/ja.tsv
+++ b/crates/ui-egui/src/i18n/ja.tsv
@@ -3822,6 +3822,8 @@ curves Smooth スムーズ
Reset All Locked Settings ロックされた設定をすべて初期化
Copy Texture to Other Tools テクスチャを他のツールにコピー
ICO is limited to 256 × 256 pixels ICO は 256 × 256 ピクセルまでです
+ Button Mode ボタンモード
+ Button Mode On ボタンモード オン
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface インターフェイスを暗くする
Lighten Interface インターフェイスを明るくする
diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv
index 0ed7c3c67..42e6c83e5 100644
--- a/crates/ui-egui/src/i18n/ko.tsv
+++ b/crates/ui-egui/src/i18n/ko.tsv
@@ -3320,6 +3320,8 @@ curves Smooth 매끄럽게
Sent to {printer} {printer}(으)로 전송됨
set in Print Settings… 인쇄 설정에서 지정…
ICO is limited to 256 × 256 pixels ICO는 256 × 256픽셀로 제한됩니다
+ Button Mode 단추 모드
+ Button Mode On 단추 모드 켜짐
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface 인터페이스 어둡게
diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv
index 0ea0ce047..d894960b2 100644
--- a/crates/ui-egui/src/i18n/nl.tsv
+++ b/crates/ui-egui/src/i18n/nl.tsv
@@ -3905,6 +3905,8 @@ curves Smooth Vloeiend maken
Sent to {printer} Verzonden naar {printer}
set in Print Settings… instellen in de afdrukinstellingen…
ICO is limited to 256 × 256 pixels ICO is beperkt tot 256 × 256 pixels
+ Button Mode Knopmodus
+ Button Mode On Knopmodus aan
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Interface donkerder maken
diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv
index 7d22a6ae7..47c3ae676 100644
--- a/crates/ui-egui/src/i18n/pl.tsv
+++ b/crates/ui-egui/src/i18n/pl.tsv
@@ -3743,6 +3743,8 @@ curves Smooth Wygładź
Sent to {printer} Wysłano do {printer}
set in Print Settings… ustawiane w ustawieniach druku…
ICO is limited to 256 × 256 pixels ICO jest ograniczony do 256 × 256 pikseli
+ Button Mode Tryb przycisku
+ Button Mode On Tryb przycisku włączony
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Przyciemnij interfejs
diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv
index a36fb9561..cdb191abe 100644
--- a/crates/ui-egui/src/i18n/pt-br.tsv
+++ b/crates/ui-egui/src/i18n/pt-br.tsv
@@ -3935,6 +3935,8 @@ layerLabel No Color Sem cor
Sent to {printer} Enviado para {printer}
set in Print Settings… definido nas configurações de impressão…
ICO is limited to 256 × 256 pixels ICO é limitado a 256 × 256 pixels
+ Button Mode Modo de botão
+ Button Mode On Modo de botão ativado
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Escurecer interface
diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv
index 3f7bd7524..eb8270e7f 100644
--- a/crates/ui-egui/src/i18n/ru.tsv
+++ b/crates/ui-egui/src/i18n/ru.tsv
@@ -3111,6 +3111,8 @@ curves Smooth Сгладить
Gray Value (Median) Уровень серого (медиана)
Integrated Density Интегральная плотность
Length Длина
+ Button Mode Режим кнопок
+ Button Mode On Режим кнопок включён
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Сделать интерфейс темнее
diff --git a/crates/ui-egui/src/i18n/sr.tsv b/crates/ui-egui/src/i18n/sr.tsv
index bdca95361..9a93376eb 100644
--- a/crates/ui-egui/src/i18n/sr.tsv
+++ b/crates/ui-egui/src/i18n/sr.tsv
@@ -4219,6 +4219,8 @@ shape Appearance Izgled
Ink Characteristics Karakteristike mastila
Solidity: Punoća:
Redrawing Ponovno iscrtavanje
+ Button Mode Režim dugmadi
+ Button Mode On Režim dugmadi uključen
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Zatamni interfejs
diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv
index 4fcf00c6b..237206011 100644
--- a/crates/ui-egui/src/i18n/tr.tsv
+++ b/crates/ui-egui/src/i18n/tr.tsv
@@ -3877,6 +3877,8 @@ cameraData Lens Lens
Ink Characteristics Mürekkep Özellikleri
Solidity: Doluluk:
Redrawing Yeniden çiziliyor
+ Button Mode Düğme modu
+ Button Mode On Düğme modu açık
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Arayüzü koyulaştır
diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv
index 353e97c3b..13e0fd953 100644
--- a/crates/ui-egui/src/i18n/uk.tsv
+++ b/crates/ui-egui/src/i18n/uk.tsv
@@ -3844,6 +3844,8 @@ curves Smooth Згладити
Sent to {printer} Надіслано на {printer}
set in Print Settings… задається в параметрах друку…
ICO is limited to 256 × 256 pixels ICO обмежено розміром 256 × 256 пікселів
+ Button Mode Режим кнопок
+ Button Mode On Режим кнопок увімкнено
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Зробити інтерфейс темнішим
diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv
index 41c7b7c0b..380b50b6a 100644
--- a/crates/ui-egui/src/i18n/vi.tsv
+++ b/crates/ui-egui/src/i18n/vi.tsv
@@ -3632,6 +3632,8 @@ curves Smooth Làm mượt
Sent to {printer} Đã gửi tới {printer}
set in Print Settings… đặt trong thiết lập in…
ICO is limited to 256 × 256 pixels ICO giới hạn ở 256 × 256 pixel
+ Button Mode Chế độ nút
+ Button Mode On Chế độ nút bật
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface Làm tối giao diện
diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv
index c420d748c..93a6b168f 100644
--- a/crates/ui-egui/src/i18n/zh-hans.tsv
+++ b/crates/ui-egui/src/i18n/zh-hans.tsv
@@ -2755,6 +2755,8 @@ curves Smooth 平滑
Sent to {printer} 已发送到 {printer}
set in Print Settings… 在打印设置中设置…
ICO is limited to 256 × 256 pixels ICO 最大为 256 × 256 像素
+ Button Mode 按钮模式
+ Button Mode On 按钮模式 开
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface 界面变暗
diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv
index c4f9f4098..5638145f2 100644
--- a/crates/ui-egui/src/i18n/zh-hant.tsv
+++ b/crates/ui-egui/src/i18n/zh-hant.tsv
@@ -2740,6 +2740,8 @@ curves Smooth 平滑
Sent to {printer} 已傳送至 {printer}
set in Print Settings… 在列印設定中設定…
ICO is limited to 256 × 256 pixels ICO 最大為 256 × 256 像素
+ Button Mode 按鈕模式
+ Button Mode On 按鈕模式 開
# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
Darken Interface 介面變暗