mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-14 21:44:57 +00:00
Toolbars: toolbars made with New Toolbar dock along the window's edges
A toolbar made with New Toolbar now docks in a lane along the window's
left or right edge (on the left, right of the Tools panel docked there).
Dropping its title bar on an edge docks it, with the target lit while
the title bar is dragged over it; dragging it out of its lane floats it
under the pointer, and Escape or losing the window's focus during the
drag puts it back. The title bar's context menu has Dock to Left, Dock
to Right and Float Toolbar.
- Toolbars docked at one edge stack from the top, each with an equal
share of the lane's height, and the lane is as wide as its widest
toolbar. A lane too short for its stack wraps it into more columns,
up to half the width beside it; past that the toolbars show only
their title bars, a lone toolbar included, and a column too short
for those scrolls with the mouse wheel.
- With Keep Tools Beside the Canvas on and Tools docked on the left,
the left lane is laid out inside the canvas panel right of Tools, and
the canvas keeps room for one column of it and its 200 points.
- A release in the frame the pointer leaves the lane floats the toolbar
with its corner where the drag put it.
- window.toolbar.dock {name, side?, order?} and window.toolbar.float
{name, x?, y?} do the same from the control protocol; bad params are
errors and change nothing. window.toolbar.list reports floating, side
and order.
- CustomToolbar keeps dock (place in the edge's stack) and dock_right;
both default, so toolbars saved before load floating. Workspaces and
preferences keep the placement; New Toolbar still starts floating, a
copy floats, and deleting a docked toolbar closes up its stack.
- Dock to Left, Dock to Right, Dock Toolbar and Float Toolbar have rows
in every catalog.
Part of #1759
This commit is contained in:
@@ -563,7 +563,24 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
|
||||
"",
|
||||
"{name: string} delete the toolbar made with New Toolbar called `name`, and the groups torn off it, from the current workspace, as Manage Toolbars' trash can does",
|
||||
),
|
||||
("window.toolbar.list", "List Toolbars", "", "{} the toolbars made with New Toolbar in the current workspace: [{name, shown, double, slots}]"),
|
||||
(
|
||||
"window.toolbar.dock",
|
||||
"Dock Toolbar",
|
||||
"",
|
||||
"{name: string, side?: left|right, order?: int} dock the toolbar made with New Toolbar called `name` in the lane along the window's left or right edge (omitted: the edge it docked at last, the left at first), as Dock to Left and Dock to Right in its title bar's context menu and dropping its title bar on that edge do; `order` is its place in that edge's stack, 0 at the top (omitted: the end, or where it is when it is docked at that edge already); a bad `side` or `order` is an error and changes nothing; returns {toolbar, floating, side, order, pos}",
|
||||
),
|
||||
(
|
||||
"window.toolbar.float",
|
||||
"Float Toolbar",
|
||||
"",
|
||||
"{name: string, x?: number, y?: number} float the toolbar made with New Toolbar called `name` with its top-left corner at x, y in screen points (both or neither; omitted: where it floated last), as Float Toolbar in its title bar's context menu and dragging its title bar out of its lane do; returns {toolbar, floating, side, order, pos}",
|
||||
),
|
||||
(
|
||||
"window.toolbar.list",
|
||||
"List Toolbars",
|
||||
"",
|
||||
"{} the toolbars made with New Toolbar in the current workspace: [{name, shown, double, slots, floating, side, order}], `side` the edge it docks at (while floating, the edge it docked at last) and `order` its place in that edge's stack while docked (else null)",
|
||||
),
|
||||
("window.taskBar", "Contextual Task Bar", "", "{}"),
|
||||
(
|
||||
"window.pathfinder.compoundShapes",
|
||||
|
||||
@@ -599,6 +599,8 @@ impl VectorcraftApp {
|
||||
// Toolbar too.
|
||||
toolbar::show_custom(self, ui.ctx());
|
||||
}
|
||||
// The lanes along the window's edges where toolbars made with New Toolbar dock.
|
||||
crate::custom_toolbars::lanes(self, ui);
|
||||
panels::library_panel::tidy(self);
|
||||
// The canvas and the panels: one docking layout. Tab hides the panels but not the canvas.
|
||||
egui::CentralPanel::default().frame(egui::Frame::NONE.fill(t.pasteboard)).show(ui, |ui| panel_docking::show(self, ui));
|
||||
|
||||
@@ -16,6 +16,7 @@ impl VectorcraftApp {
|
||||
native_menu::run(self, ctx);
|
||||
if self.fonts_ready {
|
||||
tools_float::cancel_move_on_escape(self, ctx);
|
||||
crate::custom_toolbars::cancel_move_on_escape(self, ctx);
|
||||
shortcuts::handle(self, ctx);
|
||||
}
|
||||
// A Copy taken in this UI phase (an egui copy event, or a command it runs) is published in
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -508,7 +508,10 @@ fn the_add_tool_menu_fills_a_new_toolbar_without_a_drag() {
|
||||
assert_eq!(slots(&app), shipped, "the Tools panel's toolbar is untouched");
|
||||
assert!(!app.ui.tools_drawer, "no drawer opened");
|
||||
let list = app.run("window.toolbar.list", json!({})).unwrap();
|
||||
assert_eq!(list, json!([{"name": "Mine", "shown": true, "double": false, "slots": [["lasso"]]}]));
|
||||
assert_eq!(
|
||||
list,
|
||||
json!([{"name": "Mine", "shown": true, "double": false, "slots": [["lasso"]], "floating": true, "side": "left", "order": null}])
|
||||
);
|
||||
// A second tool goes after the first.
|
||||
let shown = open(&mut app, 19.0);
|
||||
click(&mut app, &ctx, 20.0, items(&shown, "Magic Wand Tool")[0].0);
|
||||
|
||||
@@ -4052,6 +4052,10 @@ axis Both И двете
|
||||
Dock Panel Закотвен панел
|
||||
Dock to Top Закотвяне горе
|
||||
Dock to Bottom Закотвяне долу
|
||||
Dock to Left Закотвяне вляво
|
||||
Dock to Right Закотвяне вдясно
|
||||
Dock Toolbar Закотвяне на лентата с инструменти
|
||||
Float Toolbar Плаваща лента с инструменти
|
||||
Control Bar Options Опции на контролната лента
|
||||
Tool Options Опции за инструмент
|
||||
Object Options Опции за обект
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -908,6 +908,10 @@
|
||||
Dock Panel Usidri panel
|
||||
Dock to Top Usidri na vrh
|
||||
Dock to Bottom Usidri na dno
|
||||
Dock to Left Usidri lijevo
|
||||
Dock to Right Usidri desno
|
||||
Dock Toolbar Usidri traku s alatima
|
||||
Float Toolbar Odvoji traku s alatima
|
||||
Control Bar Options Opcije kontrolne trake
|
||||
Tool Options Opcije alata
|
||||
Object Options Opcije objekta
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1247,6 +1247,10 @@ antiAlias Sharp Nítid
|
||||
Dock Panel Acobla el panell
|
||||
Dock to Top Acobla a dalt
|
||||
Dock to Bottom Acobla a baix
|
||||
Dock to Left Acobla a l’esquerra
|
||||
Dock to Right Acobla a la dreta
|
||||
Dock Toolbar Acobla la barra d’eines
|
||||
Float Toolbar Flota la barra d’eines
|
||||
Control Bar Options Opcions de la barra de control
|
||||
Tool Options Opcions de l’eina
|
||||
Object Options Opcions de l’objecte
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -923,6 +923,10 @@
|
||||
Dock Panel Ukotvit panel
|
||||
Dock to Top Ukotvit nahoru
|
||||
Dock to Bottom Ukotvit dolů
|
||||
Dock to Left Ukotvit vlevo
|
||||
Dock to Right Ukotvit vpravo
|
||||
Dock Toolbar Ukotvit panel nástrojů
|
||||
Float Toolbar Plovoucí panel nástrojů
|
||||
Control Bar Options Možnosti ovládacího panelu
|
||||
Tool Options Možnosti nástroje
|
||||
Object Options Možnosti objektu
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -853,6 +853,10 @@
|
||||
Dock Panel Dok panel
|
||||
Dock to Top Dok øverst
|
||||
Dock to Bottom Dok nederst
|
||||
Dock to Left Dok til venstre
|
||||
Dock to Right Dok til højre
|
||||
Dock Toolbar Dok værktøjslinjen
|
||||
Float Toolbar Flydende værktøjslinje
|
||||
Control Bar Options Indstillinger for kontrollinjen
|
||||
Tool Options Værktøjsindstillinger
|
||||
Object Options Objektindstillinger
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4074,6 +4074,10 @@ theme Appearance Erscheinungsbild
|
||||
Dock Panel Bedienfeld andocken
|
||||
Dock to Top Oben andocken
|
||||
Dock to Bottom Unten andocken
|
||||
Dock to Left Links andocken
|
||||
Dock to Right Rechts andocken
|
||||
Dock Toolbar Werkzeugleiste andocken
|
||||
Float Toolbar Werkzeugleiste ablösen
|
||||
Control Bar Options Optionen der Steuerungsleiste
|
||||
Tool Options Werkzeugoptionen
|
||||
Object Options Objektoptionen
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2257,6 +2257,10 @@ axis Both Και τα δύο
|
||||
Dock Panel Αγκύρωση πάνελ
|
||||
Dock to Top Αγκύρωση επάνω
|
||||
Dock to Bottom Αγκύρωση κάτω
|
||||
Dock to Left Αγκύρωση αριστερά
|
||||
Dock to Right Αγκύρωση δεξιά
|
||||
Dock Toolbar Αγκύρωση γραμμής εργαλείων
|
||||
Float Toolbar Αιωρούμενη γραμμή εργαλείων
|
||||
Control Bar Options Επιλογές γραμμής ελέγχου
|
||||
Tool Options Επιλογές εργαλείου
|
||||
Object Options Επιλογές αντικειμένου
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4150,6 +4150,10 @@ axis Both Ambos
|
||||
Dock Panel Anclar panel
|
||||
Dock to Top Anclar arriba
|
||||
Dock to Bottom Anclar abajo
|
||||
Dock to Left Anclar a la izquierda
|
||||
Dock to Right Anclar a la derecha
|
||||
Dock Toolbar Anclar barra de herramientas
|
||||
Float Toolbar Hacer flotar la barra de herramientas
|
||||
Control Bar Options Opciones de la barra de control
|
||||
Tool Options Opciones de herramienta
|
||||
Object Options Opciones de objeto
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -911,6 +911,10 @@
|
||||
Dock Panel Telakoi paneeli
|
||||
Dock to Top Telakoi ylös
|
||||
Dock to Bottom Telakoi alas
|
||||
Dock to Left Telakoi vasemmalle
|
||||
Dock to Right Telakoi oikealle
|
||||
Dock Toolbar Telakoi työkalurivi
|
||||
Float Toolbar Kelluta työkalurivi
|
||||
Control Bar Options Ohjauspalkin asetukset
|
||||
Tool Options Työkalun asetukset
|
||||
Object Options Objektin asetukset
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4139,6 +4139,10 @@ axis Both Les deux
|
||||
Dock Panel Ancrer le panneau
|
||||
Dock to Top Ancrer en haut
|
||||
Dock to Bottom Ancrer en bas
|
||||
Dock to Left Ancrer à gauche
|
||||
Dock to Right Ancrer à droite
|
||||
Dock Toolbar Ancrer la barre d’outils
|
||||
Float Toolbar Rendre la barre d’outils flottante
|
||||
Control Bar Options Options de la barre de contrôle
|
||||
Tool Options Options de l’outil
|
||||
Object Options Options de l’objet
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1386,6 +1386,10 @@ antiAlias Sharp शार्प
|
||||
Dock Panel पैनल डॉक करें
|
||||
Dock to Top ऊपर डॉक करें
|
||||
Dock to Bottom नीचे डॉक करें
|
||||
Dock to Left बाईं ओर डॉक करें
|
||||
Dock to Right दाईं ओर डॉक करें
|
||||
Dock Toolbar टूलबार डॉक करें
|
||||
Float Toolbar टूलबार फ़्लोट करें
|
||||
Control Bar Options नियंत्रण बार ऑप्शन्स
|
||||
Tool Options टूल ऑप्शन्स
|
||||
Object Options ऑब्जेक्ट ऑप्शन्स
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1114,6 +1114,10 @@ font-technology Variable Változó
|
||||
Dock Panel Panel dokkolása
|
||||
Dock to Top Dokkolás felülre
|
||||
Dock to Bottom Dokkolás alulra
|
||||
Dock to Left Dokkolás balra
|
||||
Dock to Right Dokkolás jobbra
|
||||
Dock Toolbar Eszköztár dokkolása
|
||||
Float Toolbar Eszköztár lebegtetése
|
||||
Control Bar Options Vezérlősáv beállításai
|
||||
Tool Options Eszközbeállítások
|
||||
Object Options Objektumbeállítások
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -853,6 +853,10 @@
|
||||
Dock Panel Tambatkan panel
|
||||
Dock to Top Tambatkan ke atas
|
||||
Dock to Bottom Tambatkan ke bawah
|
||||
Dock to Left Tambatkan ke kiri
|
||||
Dock to Right Tambatkan ke kanan
|
||||
Dock Toolbar Tambatkan bilah alat
|
||||
Float Toolbar Mengambangkan bilah alat
|
||||
Control Bar Options Opsi bilah kontrol
|
||||
Tool Options Opsi alat
|
||||
Object Options Opsi objek
|
||||
|
||||
|
@@ -4201,6 +4201,10 @@ axis Both Entrambi
|
||||
Dock Panel Ancora pannello
|
||||
Dock to Top Ancora in alto
|
||||
Dock to Bottom Ancora in basso
|
||||
Dock to Left Ancora a sinistra
|
||||
Dock to Right Ancora a destra
|
||||
Dock Toolbar Ancora barra degli strumenti
|
||||
Float Toolbar Rendi mobile barra degli strumenti
|
||||
Control Bar Options Opzioni barra di controllo
|
||||
Tool Options Opzioni strumento
|
||||
Object Options Opzioni oggetto
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4143,6 +4143,10 @@ axis Both 両方
|
||||
Dock Panel パネルをドッキング
|
||||
Dock to Top 上部にドッキング
|
||||
Dock to Bottom 下部にドッキング
|
||||
Dock to Left 左側にドッキング
|
||||
Dock to Right 右側にドッキング
|
||||
Dock Toolbar ツールバーをドッキング
|
||||
Float Toolbar ツールバーをフローティング
|
||||
Control Bar Options コントロールバーオプション
|
||||
Tool Options ツールオプション
|
||||
Object Options オブジェクトオプション
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -816,6 +816,10 @@
|
||||
Dock Panel პანელის მიმაგრება
|
||||
Dock to Top ზემოთ მიმაგრება
|
||||
Dock to Bottom ქვემოთ მიმაგრება
|
||||
Dock to Left მარცხნივ მიმაგრება
|
||||
Dock to Right მარჯვნივ მიმაგრება
|
||||
Dock Toolbar ხელსაწყოთა ზოლის მიმაგრება
|
||||
Float Toolbar მცურავი ხელსაწყოთა ზოლი
|
||||
Control Bar Options მართვის ზოლის პარამეტრები
|
||||
Tool Options ხელსაწყოს პარამეტრები
|
||||
Object Options ობიექტის პარამეტრები
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4127,6 +4127,10 @@ axis Both 양쪽
|
||||
Dock Panel 패널 고정
|
||||
Dock to Top 위쪽에 고정
|
||||
Dock to Bottom 아래쪽에 고정
|
||||
Dock to Left 왼쪽에 고정
|
||||
Dock to Right 오른쪽에 고정
|
||||
Dock Toolbar 도구 막대 고정
|
||||
Float Toolbar 도구 막대 분리
|
||||
Control Bar Options 컨트롤 막대 옵션
|
||||
Tool Options 도구 옵션
|
||||
Object Options 개체 옵션
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -867,6 +867,10 @@
|
||||
Dock Panel Paneel dokken
|
||||
Dock to Top Bovenaan dokken
|
||||
Dock to Bottom Onderaan dokken
|
||||
Dock to Left Links dokken
|
||||
Dock to Right Rechts dokken
|
||||
Dock Toolbar Werkbalk dokken
|
||||
Float Toolbar Werkbalk laten zweven
|
||||
Control Bar Options Opties voor bedieningsbalk
|
||||
Tool Options Gereedschapsopties
|
||||
Object Options Objectopties
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -868,6 +868,10 @@
|
||||
Dock Panel Zadokuj panel
|
||||
Dock to Top Zadokuj u góry
|
||||
Dock to Bottom Zadokuj u dołu
|
||||
Dock to Left Zadokuj po lewej
|
||||
Dock to Right Zadokuj po prawej
|
||||
Dock Toolbar Zadokuj pasek narzędzi
|
||||
Float Toolbar Odepnij pasek narzędzi
|
||||
Control Bar Options Opcje paska sterowania
|
||||
Tool Options Opcje narzędzia
|
||||
Object Options Opcje obiektu
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3379,6 +3379,10 @@ imageTrace Outline Contorno
|
||||
Dock Panel Encaixar Painel
|
||||
Dock to Top Encaixar na Parte Superior
|
||||
Dock to Bottom Encaixar na Parte Inferior
|
||||
Dock to Left Encaixar à Esquerda
|
||||
Dock to Right Encaixar à Direita
|
||||
Dock Toolbar Encaixar Barra de Ferramentas
|
||||
Float Toolbar Flutuar Barra de Ferramentas
|
||||
Control Bar Options Opções da Barra de Controle
|
||||
Tool Options Opções de Ferramenta
|
||||
Object Options Opções de Objeto
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -4187,6 +4187,10 @@ axis Both Оба
|
||||
Dock Panel Прикрепить панель
|
||||
Dock to Top Прикрепить сверху
|
||||
Dock to Bottom Прикрепить снизу
|
||||
Dock to Left Прикрепить слева
|
||||
Dock to Right Прикрепить справа
|
||||
Dock Toolbar Прикрепить панель инструментов
|
||||
Float Toolbar Сделать панель инструментов плавающей
|
||||
Control Bar Options Параметры панели управления
|
||||
Tool Options Параметры инструмента
|
||||
Object Options Параметры объекта
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4066,6 +4066,10 @@ axis Both Båda
|
||||
Dock Panel Docka panel
|
||||
Dock to Top Docka överst
|
||||
Dock to Bottom Docka nederst
|
||||
Dock to Left Docka till vänster
|
||||
Dock to Right Docka till höger
|
||||
Dock Toolbar Docka verktygsfältet
|
||||
Float Toolbar Gör verktygsfältet flytande
|
||||
Control Bar Options Alternativ för kontrollfältet
|
||||
Tool Options Verktygsalternativ
|
||||
Object Options Objektalternativ
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3950,6 +3950,10 @@ axis Both Her İkisi
|
||||
Dock Panel Bağlantı İstasyonu Paneli
|
||||
Dock to Top Üste yerleştir
|
||||
Dock to Bottom Alta yerleştir
|
||||
Dock to Left Sola yerleştir
|
||||
Dock to Right Sağa yerleştir
|
||||
Dock Toolbar Araç çubuğunu yerleştir
|
||||
Float Toolbar Araç Çubuğunu Yüzer Yap
|
||||
Control Bar Options Kontrol Çubuğu Seçenekleri
|
||||
Tool Options Araç Seçenekleri
|
||||
Object Options Nesne Seçenekleri
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 5 and column 25.
|
@@ -4190,6 +4190,10 @@ axis Both Обидві
|
||||
Dock Panel Прикріпити панель
|
||||
Dock to Top Прикріпити вгорі
|
||||
Dock to Bottom Прикріпити внизу
|
||||
Dock to Left Прикріпити ліворуч
|
||||
Dock to Right Прикріпити праворуч
|
||||
Dock Toolbar Прикріпити панель інструментів
|
||||
Float Toolbar Від’єднати панель інструментів
|
||||
Control Bar Options Параметри панелі керування
|
||||
Tool Options Параметри інструменту
|
||||
Object Options Параметри об’єкта
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1012,6 +1012,10 @@ font-technology Variable Biến thiên
|
||||
Dock Panel Neo bảng
|
||||
Dock to Top Neo lên trên
|
||||
Dock to Bottom Neo xuống dưới
|
||||
Dock to Left Neo sang trái
|
||||
Dock to Right Neo sang phải
|
||||
Dock Toolbar Neo thanh công cụ
|
||||
Float Toolbar Thả nổi thanh công cụ
|
||||
Control Bar Options Tùy chọn thanh điều khiển
|
||||
Tool Options Tùy chọn công cụ
|
||||
Object Options Tùy chọn đối tượng
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 204 and column 5.
|
@@ -5437,6 +5437,10 @@ axis Both 两者
|
||||
Dock Panel 停放面板
|
||||
Dock to Top 停放到顶部
|
||||
Dock to Bottom 停放到底部
|
||||
Dock to Left 停放到左侧
|
||||
Dock to Right 停放到右侧
|
||||
Dock Toolbar 停放工具栏
|
||||
Float Toolbar 浮动工具栏
|
||||
Control Bar Options 控制栏选项
|
||||
Tool Options 工具选项
|
||||
Object Options 对象选项
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5266,6 +5266,10 @@ axis Both 兩者
|
||||
Dock Panel 停駐面板
|
||||
Dock to Top 停駐到頂部
|
||||
Dock to Bottom 停駐到底部
|
||||
Dock to Left 停駐到左側
|
||||
Dock to Right 停駐到右側
|
||||
Dock Toolbar 停駐工具列
|
||||
Float Toolbar 浮動工具列
|
||||
Control Bar Options 控制列選項
|
||||
Tool Options 工具選項
|
||||
Object Options 物件選項
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -564,7 +564,24 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
|
||||
"",
|
||||
"{name: string} delete the toolbar made with New Toolbar called `name`, and the groups torn off it, from the current workspace, as Manage Toolbars' trash can does",
|
||||
),
|
||||
("window.toolbar.list", "List Toolbars", "", "{} the toolbars made with New Toolbar in the current workspace: [{name, shown, double, slots}]"),
|
||||
(
|
||||
"window.toolbar.dock",
|
||||
"Dock Toolbar",
|
||||
"",
|
||||
"{name: string, side?: left|right, order?: int} dock the toolbar made with New Toolbar called `name` in the lane along the window's left or right edge (omitted: the edge it docked at last, the left at first), as Dock to Left and Dock to Right in its title bar's context menu and dropping its title bar on that edge do; `order` is its place in that edge's stack, 0 at the top (omitted: the end, or where it is when it is docked at that edge already); a bad `side` or `order` is an error and changes nothing; returns {toolbar, floating, side, order, pos}",
|
||||
),
|
||||
(
|
||||
"window.toolbar.float",
|
||||
"Float Toolbar",
|
||||
"",
|
||||
"{name: string, x?: number, y?: number} float the toolbar made with New Toolbar called `name` with its top-left corner at x, y in screen points (both or neither; omitted: where it floated last), as Float Toolbar in its title bar's context menu and dragging its title bar out of its lane do; returns {toolbar, floating, side, order, pos}",
|
||||
),
|
||||
(
|
||||
"window.toolbar.list",
|
||||
"List Toolbars",
|
||||
"",
|
||||
"{} the toolbars made with New Toolbar in the current workspace: [{name, shown, double, slots, floating, side, order}], `side` the edge it docks at (while floating, the edge it docked at last) and `order` its place in that edge's stack while docked (else null)",
|
||||
),
|
||||
("window.taskBar", "Contextual Task Bar", "", "{}"),
|
||||
(
|
||||
"window.pathfinder.compoundShapes",
|
||||
|
||||
@@ -1435,8 +1435,9 @@ impl craft_ui::docking::DockContent<String> for PanelContent<'_> {
|
||||
}
|
||||
|
||||
fn limits(&self, id: &String) -> craft_ui::docking::PanelLimits {
|
||||
let min =
|
||||
if id == CANVAS { egui::vec2(200.0 + crate::toolbar::docked_width(&self.app.ui), 120.0) } else { egui::vec2(PANEL_MIN_WIDTH, 80.0) };
|
||||
// The canvas keeps room for Tools and the lane of toolbars docked beside it.
|
||||
let beside = crate::toolbar::docked_width(&self.app.ui) + crate::custom_toolbars::beside_canvas_reserve(&self.app.ui);
|
||||
let min = if id == CANVAS { egui::vec2(200.0 + beside, 120.0) } else { egui::vec2(PANEL_MIN_WIDTH, 80.0) };
|
||||
craft_ui::docking::PanelLimits { min, ..Default::default() }
|
||||
}
|
||||
|
||||
|
||||
@@ -864,7 +864,8 @@ impl FloatingFlyout {
|
||||
}
|
||||
|
||||
/// A toolbar made with Window › Toolbars › New Toolbar (`window.toolbar.new`): it floats on its
|
||||
/// own, filled with tools from the All Tools drawer, and is kept with the workspace it was made in.
|
||||
/// own or docks along the window's left or right edge, filled with tools from the All Tools drawer,
|
||||
/// and is kept with the workspace it was made in.
|
||||
/// The groups torn off it are kept with it (`floating`), so the Tools panel's strips
|
||||
/// (`UiState::floating_flyouts`) hold none of them.
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
@@ -877,8 +878,16 @@ pub struct CustomToolbar {
|
||||
/// It shows (Window › Toolbars › its name toggles it).
|
||||
#[serde(default = "yes")]
|
||||
pub shown: bool,
|
||||
/// Top-left corner in screen points.
|
||||
/// Top-left corner in screen points while it floats; while it is docked, where it floated last.
|
||||
pub pos: [f32; 2],
|
||||
/// Its place in the stack of toolbars docked along one of the window's edges (0 at the top),
|
||||
/// while it is docked there; none while it floats at `pos`.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub dock: Option<u32>,
|
||||
/// It docks along the window's right edge, not the left: the edge it is docked at, or while it
|
||||
/// floats the edge it docked at last.
|
||||
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
||||
pub dock_right: bool,
|
||||
/// The tool each slot of several tools shows, chosen last (keyed by the slot's first tool).
|
||||
#[serde(default, skip_serializing_if = "std::collections::BTreeMap::is_empty")]
|
||||
pub slot_tool: std::collections::BTreeMap<String, String>,
|
||||
|
||||
@@ -145,6 +145,8 @@ pub(crate) fn show_beside_canvas(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
if app.ui.toolbar_pos.is_none() && (app.ui.tools_beside_canvas || app.ui.toolbar_right) {
|
||||
show(app, ui);
|
||||
}
|
||||
// The lane where toolbars made with New Toolbar dock on the left, right of Tools.
|
||||
crate::custom_toolbars::lane_beside_canvas(app, ui);
|
||||
}
|
||||
|
||||
/// Is the Tools panel docked on the right, between the canvas and the panels?
|
||||
|
||||
@@ -46,6 +46,13 @@ pub(crate) fn escape_cancelled_move(ctx: &egui::Context) -> bool {
|
||||
ctx.data(|d| d.get_temp::<u64>(escape_cancel_id())) == Some(ctx.cumulative_frame_nr_for(ctx.viewport_id()))
|
||||
}
|
||||
|
||||
/// This frame's Escape put a moved bar back ([`escape_cancelled_move`]): a toolbar made with New
|
||||
/// Toolbar ([`crate::custom_toolbars::cancel_move_on_escape`]) as well as the Tools panel.
|
||||
pub(crate) fn mark_escape_cancelled(ctx: &egui::Context) {
|
||||
let frame = ctx.cumulative_frame_nr_for(ctx.viewport_id());
|
||||
ctx.data_mut(|d| d.insert_temp(escape_cancel_id(), frame));
|
||||
}
|
||||
|
||||
/// The strip along the canvas's left edge where the Tools panel docks while Keep Tools Beside the
|
||||
/// Canvas is on, as last laid out.
|
||||
pub(crate) fn tools_zone_id() -> Id {
|
||||
@@ -194,7 +201,7 @@ pub fn track(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
}
|
||||
|
||||
/// The `x`, `y` params: a top-left corner in screen points, if given.
|
||||
fn position(p: &Value) -> Result<Option<Pos2>, String> {
|
||||
pub(crate) fn position(p: &Value) -> Result<Option<Pos2>, String> {
|
||||
let coord = |k: &str| match p.get(k) {
|
||||
None | Some(Value::Null) => Some(None),
|
||||
Some(v) => v.as_f64().filter(|f| f.abs() < 1e6).map(|f| Some(f as f32)),
|
||||
|
||||
@@ -417,7 +417,10 @@ button (Add Tool…) opens a menu of every tool under the drawer's headings: a c
|
||||
{tool, toolbar}`; the tools already in the toolbar are dimmed under their headings. The drawer has no Show section
|
||||
there. `window.floatTools {tool, toolbar}` floats one of its groups, and a group torn off it shows and hides with
|
||||
it. `window.toolbar.list` returns the toolbars (`ui.custom_toolbars` in `ui.inspect`: name, slots, shown flag,
|
||||
two-column flag, top-left corner, the groups torn off it). They are kept with the workspace they were made in:
|
||||
two-column flag, top-left corner, the groups torn off it, and `dock` and `dock_right` while docked or once docked).
|
||||
`window.toolbar.dock {name, side?, order?}` docks a toolbar in the lane along the window's left or right edge, and
|
||||
`window.toolbar.float {name, x?, y?}` floats it again; dropping its title bar on an edge or dragging it out of its
|
||||
lane does the same (see the docking section in `docs/mcp.md`). They are kept with the workspace they were made in:
|
||||
switching workspaces shows that workspace's toolbars, Reset Workspace keeps them, and New Workspace starts the new
|
||||
workspace with a copy of them.
|
||||
|
||||
|
||||
+3
-2
@@ -684,8 +684,9 @@ macOS cursor delivery (#2292) is narrowed to a native host adapter using the exi
|
||||
- **Done:** custom document ruler origin (#1212): corner drag with preview, double-click reset to the active artboard, relative X/Y inputs and native save/reopen.
|
||||
- **Done:** View › Rulers › Change to Global / Artboard Rulers (`view.globalRulers`, Cmd+Alt+R): artboard rulers, a new document's, count from the active artboard, each artboard with its own zero point; rulers, X/Y fields and guide readouts follow the mode, which is saved with the document. Estimate unchanged.
|
||||
- **Done (#2849):** View › Rulers › Show Video Rulers (`view.videoRulers`): the rulers show and count the active artboard in video pixels from its top-left corner, a pixel as many points wide as the artboard's Video Ruler Pixel Aspect Ratio and one point tall ([public source](https://helpx.adobe.com/illustrator/desktop/create-manage-artboards/organize-manage-artboards/set-video-display-options-for-artboards.html)); Hide Video Rulers returns them to the General unit and the ruler origin. Shift-snapping a new guide to ruler ticks still uses the General unit's ticks. Estimate unchanged.
|
||||
- **Partial:** custom toolbars (#1759): Window › Toolbars › New Toolbar makes them, kept with the workspace they
|
||||
were made in, and Window › Toolbars › Manage Toolbars renames, copies and deletes them; docking them is missing.
|
||||
- **Done:** custom toolbars (#1759): Window › Toolbars › New Toolbar makes them, kept with the workspace they
|
||||
were made in, and Window › Toolbars › Manage Toolbars renames, copies and deletes them; they dock in lanes along
|
||||
the window's left and right edges (`window.toolbar.dock`, `window.toolbar.float`).
|
||||
Inside the estimate below.
|
||||
- **Done (#1753):** a saved workspace keeps the width of the dock column.
|
||||
- **Done (#4135):** floating panels open in OS windows of their own on the desktop, so they can sit on another monitor; on the web and on Wayland they float inside the window.
|
||||
|
||||
+37
@@ -2672,6 +2672,43 @@ kept with the workspace, and built-in workspaces and workspaces saved without it
|
||||
{"name":"invoke_menu","arguments":{"command":"window.toolsBesideCanvas","params":{"on":true}}}
|
||||
```
|
||||
|
||||
## Docking toolbars made with New Toolbar
|
||||
|
||||
A toolbar made with New Toolbar floats when it is made. `window.toolbar.dock {name, side?, order?}` (Dock to Left and
|
||||
Dock to Right in the context menu of the toolbar's title bar, remote mode, `invoke_menu`) docks it in a lane along the
|
||||
window's left or right edge. On the left, the lane is right of the Tools panel when the Tools panel is docked at the
|
||||
window's edge. With Keep Tools Beside the Canvas on and the Tools panel docked on the left, the lane is right of the
|
||||
Tools panel beside the canvas, and dropping a title bar on the Tools panel or on the lane docks the toolbar there. `side` is `left` or `right` (`start` and `end` also work); without it, the toolbar docks at the edge it
|
||||
docked at last, or at the left the first time. Toolbars docked at one edge stack from the top. `order` is the
|
||||
toolbar's place in that stack, 0 at the top, from 0 to the number of other toolbars docked there; without it, the
|
||||
toolbar goes at the end, or stays where it is when it is already docked at that edge. Each toolbar takes an equal
|
||||
share of the lane's height and its tools scroll in it, and the lane is as wide as its widest toolbar. When the lane
|
||||
is too short to give each toolbar 88 points of height, the stack wraps into more columns, left to right, and the lane
|
||||
widens, so no toolbar covers another. A lane takes at most half the width the canvas and panels would have (beside
|
||||
the canvas, it also leaves the canvas at least 200 points, and the canvas keeps room for one column); when that
|
||||
many columns still give a toolbar less than 88 points, the toolbars in those columns show only their title bars, which
|
||||
still float, dock and show the context menu. A column too short for all of its title bars shows as many as fit, and
|
||||
the mouse wheel over the column scrolls through the others, one toolbar per notch.
|
||||
`window.toolbar.float {name, x?, y?}` (Float Toolbar in the same menu) floats it with its top-left corner at `x`, `y`
|
||||
in screen points, or where it floated last when both are omitted. Both commands answer
|
||||
`{toolbar, floating, side, order, pos}`: `side` is the edge the toolbar docks at (while it floats, the edge it docked
|
||||
at last), `order` its place in that edge's stack (null while it floats) and `pos` where it floats (while it is docked,
|
||||
where it floated last). A missing or unknown name, a `side` other than left or right, an `order` that is not a whole
|
||||
number in range, or only one of `x` and `y` is an error and changes nothing. `window.toolbar.list` reports `floating`,
|
||||
`side` and `order` for each toolbar.
|
||||
|
||||
With the pointer, dropping a floating toolbar's title bar on the window's left or right edge, or on that edge's lane,
|
||||
docks it at the end of that edge's stack; the target lights up while the title bar is dragged over it. Dragging a
|
||||
docked toolbar's title bar out of its lane floats it under the pointer. Escape, or the window losing focus, during
|
||||
the drag puts the toolbar back where it was. Hiding a docked toolbar keeps its place, renaming it keeps its place, a
|
||||
copy made with Manage Toolbars' + floats, and deleting one closes up the stack. Placement is kept with the workspace.
|
||||
Toolbars saved before docking existed load floating. The lanes, the edge targets and the stacking are VectorCraft's
|
||||
own layout rules.
|
||||
|
||||
```json
|
||||
{"name":"invoke_menu","arguments":{"command":"window.toolbar.dock","params":{"name":"Toolbar 1","side":"left","order":0}}}
|
||||
```
|
||||
|
||||
## Learn panel
|
||||
|
||||
Window › Learn and the Explore tutorials button beside the search icon at the right end of the app bar show and hide
|
||||
|
||||
@@ -840,6 +840,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- Window › Toolbars › New Toolbar… and New Toolbar… in the All Tools drawer's menu ask for a name and make a blank toolbar that floats on its own, moved by its title bar and listed under Window › Toolbars, whose item shows or hides it. The title bar's × hides it, and its double arrow shows its tools in one column or two. Its ••• button opens the All Tools drawer beside it, and tools dragged from the drawer fill it. The toolbars are kept with the workspace they were made in: switching workspaces shows that workspace's toolbars, Reset Workspace keeps them, and New Workspace starts the new workspace with a copy of them (<https://helpx.adobe.com/illustrator/using/tools.html>; `window.toolbar.new`, `window.toolbar.custom`, the `toolbar` param of `window.editToolbar` and `toolbar.addTool`/`removeTool`/`reset`; `tools_added_to_a_new_toolbar_survive_a_workspace_reload`).
|
||||
- A toolbar made with New Toolbar has a + button (Add Tool…) above its ••• button. A click on it, or Enter while it has the keyboard focus, opens a menu of every tool under the All Tools drawer's headings, without the drawer: a tool picked there goes at the end of that toolbar, and the tools already in it are dimmed. Under Remove Tool, the menu lists the toolbar's tools, and a click takes one out. This menu is VectorCraft's own way to fill a toolbar without a drag (`toolbar.addTool` and `toolbar.removeTool` with `toolbar`; `the_add_tool_menu_fills_a_new_toolbar_without_a_drag`).
|
||||
- Window › Toolbars › Manage Toolbars… and Manage Toolbars… in the All Tools drawer's menu open a dialog that lists the toolbars made with New Toolbar: a new name typed for the selected toolbar renames it, + copies it with its tools (with none selected, + makes a blank toolbar), and the trash can deletes it. Each change shows under Window › Toolbars and stays in the workspace (<https://helpx.adobe.com/illustrator/using/tools.html>; `window.toolbar.manage`, `window.toolbar.rename`, `window.toolbar.duplicate`, `window.toolbar.delete`; `manage_toolbars_renames_duplicates_and_deletes`).
|
||||
- A toolbar made with New Toolbar docks in a lane along the window's left or right edge when its title bar is dropped on that edge, or with Dock to Left and Dock to Right in the title bar's context menu. Toolbars docked at one edge stack from the top, each with its share of the lane's height, and the lane is as wide as its widest toolbar; a lane too short for its stack wraps it into more columns, up to half the window's width, and past that the toolbars show only their title bars, which the mouse wheel scrolls through when even they do not fit. Dragging the title bar out of the lane, or Float Toolbar, floats it again, and Escape during the drag puts it back. Hiding and renaming keep its place, and the workspace keeps it. New toolbars still start floating. The lanes and the stacking are VectorCraft's own rules (#1759; `window.toolbar.dock`, `window.toolbar.float`; `toolbars_dock_and_float_by_their_commands`, `docked_toolbars_stack_in_lanes_along_the_window_edges`, `a_title_bar_dropped_on_an_edge_docks_the_toolbar`).
|
||||
- Window › Toolbars › Keep Tools Beside the Canvas, a VectorCraft layout option that is off by default, docks the Tools panel between left-side panels and the canvas instead of at the window's left edge; the canvas's left edge then also docks a floating Tools panel, and workspaces keep the setting. Scores are unchanged (`window.toolsBesideCanvas`; `docked_tools_keep_the_window_edge_unless_kept_beside_the_canvas`, `tools_redock_at_the_targets_of_the_chosen_placement`).
|
||||
- Hindi (2026-11-06): Hindi (`hi`): 7,877-row machine-assisted catalog, zero/one singular plurals, desktop font fallback and optional Devanagari craft-fonts fallback; all 55 translation tests pass; native review and a web font remain; scores and estimates unchanged. [Terminology and limitations](localization-hi.md).
|
||||
- Window › Help Bar shows or hides the tool-help strip at the bottom of the window apart from the status bar (`window.helpBar`). Each setting is kept with the UI preferences and in saved workspaces, and Presentation Mode hides both bars. Layouts saved before the setting existed show the Help Bar where they show the status bar (`help_bar_toggle_is_independent_and_saved_in_workspaces`, `help_bar_and_status_bar_render_independently`, `legacy_help_bar_visibility_follows_each_layouts_status_bar`, `a_help_bar_setting_the_file_lacks_is_saved`).
|
||||
|
||||
Reference in New Issue
Block a user