forked from 1b-agent/opencadstudio-upstream
fix(blocks-palette): message placeholders, SVG arrows, tests follow the new palette
#1573's five formatted block messages carried {}/{name} in every locale, so the catalog never filled them and the UI printed the brace text; they use the __ocs_fmt_0__ marker now. The Options collapse arrow, the library up button and the folder picker are SVG icons instead of glyph text, and the Details header drops its sort glyph. The contrast test follows the cards to the weak surface pair and the palette test closes with BLOCKSPALETTECLOSE, since BLOCKSPALETTE now only opens. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
7a6908c7ca
commit
369dc93029
23 files changed
+128
-111
No files matched your search
@@ -4061,11 +4061,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = إنشاء
|
||||
.boolean = عمليات منطقية
|
||||
|
||||
@@ -4048,11 +4048,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Създаване
|
||||
.boolean = Булеви операции
|
||||
|
||||
@@ -4046,11 +4046,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Vytvořit
|
||||
.boolean = Booleovské operace
|
||||
|
||||
@@ -4047,11 +4047,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Erstellen
|
||||
.boolean = Boolesche Operationen
|
||||
|
||||
@@ -4049,11 +4049,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Δημιουργία
|
||||
.boolean = Δυαδική πράξη
|
||||
|
||||
@@ -4050,11 +4050,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Create
|
||||
.boolean = Boolean
|
||||
|
||||
@@ -4049,11 +4049,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Crear
|
||||
.boolean = Booleanas
|
||||
|
||||
@@ -4048,11 +4048,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Luo
|
||||
.boolean = Boolen operaatiot
|
||||
|
||||
@@ -4049,11 +4049,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Créer
|
||||
.boolean = Opérations booléennes
|
||||
|
||||
@@ -4037,11 +4037,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = बनाएँ
|
||||
.boolean = बूलियन संक्रियाएँ
|
||||
|
||||
@@ -4048,11 +4048,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Létrehozás
|
||||
.boolean = Logikai műveletek
|
||||
|
||||
@@ -4048,11 +4048,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Crea
|
||||
.boolean = Operazioni booleane
|
||||
|
||||
@@ -4037,11 +4037,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = 作成
|
||||
.boolean = ブール演算
|
||||
|
||||
@@ -4048,11 +4048,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = 생성
|
||||
.boolean = 불리언 연산
|
||||
|
||||
@@ -4047,11 +4047,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Maken
|
||||
.boolean = Booleaanse bewerkingen
|
||||
|
||||
@@ -4048,11 +4048,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Utwórz
|
||||
.boolean = Operacje boolowskie
|
||||
|
||||
@@ -4049,11 +4049,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Criar
|
||||
.boolean = Operações booleanas
|
||||
|
||||
@@ -4050,11 +4050,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = Создание
|
||||
.boolean = Булевы операции
|
||||
|
||||
@@ -4032,11 +4032,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = 创建
|
||||
.boolean = 布尔运算
|
||||
|
||||
@@ -4044,11 +4044,11 @@ insert =
|
||||
.bp-select-library = Select a Block Library Folder
|
||||
.bp-view-small = Small Icons
|
||||
.bp-on-screen = specified on screen
|
||||
.bp-block-not-found = Block "{}" not found.
|
||||
.bp-block-redefined = Block "{name}" redefined.
|
||||
.bp-block-no-reference = Block "{name}" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "{name}" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "{name}" removed.
|
||||
.bp-block-not-found = Block "__ocs_fmt_0__" not found.
|
||||
.bp-block-redefined = Block "__ocs_fmt_0__" redefined.
|
||||
.bp-block-no-reference = Block "__ocs_fmt_0__" has no reference in the drawing to edit.
|
||||
.bp-block-referenced = Block "__ocs_fmt_0__" is referenced in the drawing and cannot be removed.
|
||||
.bp-block-removed = Block "__ocs_fmt_0__" removed.
|
||||
model =
|
||||
.create = 建立
|
||||
.boolean = 布林運算
|
||||
|
||||
@@ -1770,7 +1770,10 @@ mod tests {
|
||||
app.dock_expanded == Some(crate::ui::dock::PanelId::BlockPalette),
|
||||
"palette must open expanded, not as the collapsed bar"
|
||||
);
|
||||
// BLOCKSPALETTE only opens; BLOCKSPALETTECLOSE closes.
|
||||
let _ = app.run_command_line("BLOCKSPALETTE");
|
||||
assert!(app.show_block_palette);
|
||||
let _ = app.run_command_line("BLOCKSPALETTECLOSE");
|
||||
assert!(!app.show_block_palette);
|
||||
}
|
||||
|
||||
|
||||
@@ -480,14 +480,16 @@ fn test_block_palette_contrast() {
|
||||
// a hardcoded foreground, these equality checks fail on every theme
|
||||
// whose surface text is not pure white.
|
||||
let (normal_bg, normal_fg) = block_card_colors(theme, false, BtnStatus::Active);
|
||||
// Cards sit on the dock's base surface, so they take the weak pair
|
||||
// to read as cards.
|
||||
assert_eq!(
|
||||
normal_bg, p.background.base.color,
|
||||
"Theme {:?} block card normal background drifted from base pair",
|
||||
normal_bg, p.background.weak.color,
|
||||
"Theme {:?} block card normal background drifted from weak pair",
|
||||
theme
|
||||
);
|
||||
assert_eq!(
|
||||
normal_fg, p.background.base.text,
|
||||
"Theme {:?} block card normal label must use base text (was hardcoded WHITE)",
|
||||
normal_fg, p.background.weak.text,
|
||||
"Theme {:?} block card normal label must use weak text (was hardcoded WHITE)",
|
||||
theme
|
||||
);
|
||||
|
||||
@@ -505,11 +507,11 @@ fn test_block_palette_contrast() {
|
||||
theme
|
||||
);
|
||||
|
||||
// Default-branch statuses (Active/Disabled/Focused/...) share the base pair.
|
||||
// Default-branch statuses (Active/Disabled/Focused/...) share the weak pair.
|
||||
let (_, disabled_fg) = block_card_colors(theme, false, BtnStatus::Disabled);
|
||||
assert_eq!(
|
||||
disabled_fg, p.background.base.text,
|
||||
"Theme {:?} block card default-state label must use base text",
|
||||
disabled_fg, p.background.weak.text,
|
||||
"Theme {:?} block card default-state label must use weak text",
|
||||
theme
|
||||
);
|
||||
|
||||
|
||||
@@ -587,7 +587,11 @@ fn options_card<'a>(palette: &'a BlockPalette) -> Element<'a, Message> {
|
||||
row![
|
||||
text(crate::t!("Options").to_uppercase()).size(10).style(accent_text),
|
||||
Space::new().width(Fill),
|
||||
text(if palette.options_collapsed { "▸" } else { "▾" }).size(22),
|
||||
if palette.options_collapsed {
|
||||
crate::ui::icons::themed_arrow_right(12.0)
|
||||
} else {
|
||||
crate::ui::icons::themed_arrow_down(12.0)
|
||||
},
|
||||
]
|
||||
.align_y(iced::Center),
|
||||
)
|
||||
@@ -705,7 +709,10 @@ pub fn view(palette: &BlockPalette, width: f32, auto_collapse: bool) -> Element<
|
||||
.text_size(11)
|
||||
.padding([3, 6])
|
||||
.width(Fill),
|
||||
button(text("…").size(12)).on_press(pm(BlockPaletteMsg::LibraryBrowse)).style(button_style(false)).padding([3, 8]),
|
||||
button(crate::ui::icons::themed(crate::ui::icons::FOLDER_OPEN, 14.0))
|
||||
.on_press(pm(BlockPaletteMsg::LibraryBrowse))
|
||||
.style(button_style(false))
|
||||
.padding([3, 8]),
|
||||
]
|
||||
.spacing(4)
|
||||
.align_y(iced::Center);
|
||||
@@ -713,7 +720,12 @@ pub fn view(palette: &BlockPalette, width: f32, auto_collapse: bool) -> Element<
|
||||
palette.libraries.first().is_some_and(|root| d != &PathBuf::from(root))
|
||||
});
|
||||
if in_sub {
|
||||
lib_row = lib_row.push(button(text("↑").size(12)).on_press(pm(BlockPaletteMsg::LibraryUp)).style(button_style(false)).padding([3, 8]));
|
||||
lib_row = lib_row.push(
|
||||
button(crate::ui::icons::themed_arrow_up(12.0))
|
||||
.on_press(pm(BlockPaletteMsg::LibraryUp))
|
||||
.style(button_style(false))
|
||||
.padding([3, 8]),
|
||||
);
|
||||
}
|
||||
top = top.push(lib_row);
|
||||
if let (Some(root), Some(dir)) = (palette.libraries.first(), palette.library_dir.as_ref()) {
|
||||
@@ -767,7 +779,7 @@ pub fn view(palette: &BlockPalette, width: f32, auto_collapse: bool) -> Element<
|
||||
col = col.push(
|
||||
row![
|
||||
text(crate::t!("Icon")).size(11).style(muted_style).width(Length::Fixed(40.0)),
|
||||
text(format!("{} ▲", crate::t!("Name"))).size(11).style(muted_style).width(Fill),
|
||||
text(crate::t!("Name")).size(11).style(muted_style).width(Fill),
|
||||
text(crate::t!("Annotative / Dynamic")).size(11).style(muted_style).width(Length::Fixed(140.0)),
|
||||
]
|
||||
.spacing(4),
|
||||
|
||||
Reference in new issue
Block a user