Panels: the double triangle on a panel's tab strip cycles its display sizes

A double triangle at the right end of the tab strip of Align, Attributes,
Character, Color, Flattener Preview, Gradient, Info, Paragraph, Stroke,
Transform and Transparency steps the active panel through its display
sizes. The sizes are the states the panel menu's Show/Hide Options items
set (Transparency: thumbnails and options, thumbnails alone, neither),
largest first, and the smallest goes back to the largest.

window.panel.cycleOptions {panel} does the same and returns
{panel, size, sizes}. An unknown panel or a panel without sizes is an
error and changes nothing.

Docs: docs/mcp.md, docs/control-protocol.md, docs/ui-parity.md.
This commit is contained in:
dotCooCoo
2026-11-15 08:39:43 -08:00
parent bd67a010f6
commit f1f4d629e8
36 changed files with 353 additions and 4 deletions
+6
View File
@@ -650,6 +650,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
"",
"{panel, collapsed?: bool} minimize the group holding a panel to its tabs (in a floating window, the window to its title bar), or restore it, as a double-click on a tab or the drag bar does; the same as window.panel.minimize {panel, minimized}. Without `collapsed` it toggles. Returns {panel, collapsed, layout}",
),
(
"window.panel.cycleOptions",
"Cycle Display Sizes",
"",
"{panel} show a panel at its next display size, as the double triangle at the right end of its tab strip does: the sizes are the states of its panel menu's Show/Hide Options (Transparency: options and thumbnails, thumbnails alone, neither), largest first, and the smallest goes back to the largest; Align, Attributes, Character, Color, Flattener Preview, Gradient, Info, Paragraph, Stroke, Transform and Transparency have them. An unknown panel or one without display sizes is an error and changes nothing. Returns {panel, size: 0 for the largest, sizes: how many it has}",
),
(
"window.panel.float",
"Float Panel",
+1
View File
@@ -5150,6 +5150,7 @@ effect Soft Меко
Change Panel Layout Промяна на оформлението на панела
Close Panel Затваряне на панела
Collapse Panel Group Свиване на групата панели
Cycle Display Sizes Превключване на размерите на показване
Move Panel Преместване на панела
Group with Групиране с
Resize panels Преоразмеряване на панели
Can't render this file because it is too large.
+1
View File
@@ -1015,6 +1015,7 @@
Change Panel Layout Promijeni raspored panela
Close Panel Zatvori panel
Collapse Panel Group Skupi grupu panela
Cycle Display Sizes Mijenjaj veličine prikaza
Move Panel Pomakni panel
Group with Grupiši sa
Resize panels Promijeni veličinu panela
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -772,6 +772,7 @@ antiAlias Sharp Nítid
Preserve Numbers Conserva els números
Coarse Dots Punts gruixuts
Collapse Panel Group Replega el grup de panells
Cycle Display Sizes Alterna les mides de visualització
Collapse Panels to Icons Replega els panells a icones
Collapse to Icons Replega a icones
Collate Intercala
@@ -6542,6 +6543,8 @@ digits Malayalam Malaiàlam
@msg unknown option `{path}.{k}` opció desconeguda `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) sobreimpressions desconegudes `{o}` (preserve, simulate o discard)
@msg unknown panel `{raw}` panell desconegut `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` no té mides de visualització per alternar
@msg the panels are not shown els panells no es mostren
@msg panels can't be shown in Presentation Mode els panells no es poden mostrar en el mode de presentació
@msg unknown parameter `{key}`; did you mean `{near}`? paràmetre desconegut `{key}`; volies dir `{near}`?
@msg unknown parameter `{key}`; the command takes no parameters paràmetre desconegut `{key}`; l’ordre no admet cap paràmetre
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -1035,6 +1035,7 @@
Change Panel Layout Změnit rozložení panelů
Close Panel Zavřít panel
Collapse Panel Group Sbalit skupinu panelů
Cycle Display Sizes Přepínat velikosti zobrazení
Move Panel Přesunout panel
Group with Seskupit s
Resize panels Změnit velikost panelů
@@ -5434,6 +5435,8 @@ imageTrace Outline Obrys
@msg unknown option `{path}.{k}` neznámá možnost `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) neznámé přetisky `{o}` (preserve, simulate nebo discard)
@msg unknown panel `{raw}` neznámý panel `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` nemá velikosti zobrazení k přepínání
@msg the panels are not shown panely nejsou zobrazeny
@msg panels can't be shown in Presentation Mode v režimu prezentace nelze panely zobrazit
@msg unknown preference `{key}` neznámá předvolba `{key}`
@msg Preferences imported. Předvolby byly importovány.
Can't render this file because it is too large.
+3
View File
@@ -1581,6 +1581,7 @@
Change Panel Layout Skift panelets layout
Close Panel Luk panel
Collapse Panel Group Skjul panelgruppe
Cycle Display Sizes Skift mellem visningsstørrelser
Move Panel Flyt panel
Group with Gruppér med
Resize panels Tilpas størrelse på paneler
@@ -5549,6 +5550,8 @@ imageTrace Outline Kontur
@msg unknown option `{path}.{k}` ukendt indstilling `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) ukendt overprint `{o}` (preserve, simulate eller discard)
@msg unknown panel `{raw}` ukendt panel `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` har ingen visningsstørrelser at skifte mellem
@msg the panels are not shown panelerne vises ikke
@msg unknown preference `{key}` ukendt præference `{key}`
@msg Preferences imported. Præferencerne er importeret.
@msg not a preferences file: {e} ikke en præferencefil: {e}
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -5042,6 +5042,8 @@ theme Appearance Erscheinungsbild
@msg unknown option `{path}.{k}` unbekannte Option `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) unbekannter Wert für overprints `{o}` (preserve, simulate oder discard)
@msg unknown panel `{raw}` unbekanntes Bedienfeld `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` hat keine Anzeigegrößen zum Durchlaufen
@msg the panels are not shown die Bedienfelder werden nicht angezeigt
@msg panels can't be shown in Presentation Mode im Präsentationsmodus können keine Bedienfelder angezeigt werden
@msg unknown preference `{key}` unbekannte Voreinstellung `{key}`
@msg Preferences imported. Voreinstellungen importiert.
@@ -5501,6 +5503,7 @@ theme Appearance Erscheinungsbild
Change Panel Layout Bedienfeldanordnung ändern
Close Panel Bedienfeld schließen
Collapse Panel Group Bedienfeldgruppe minimieren
Cycle Display Sizes Anzeigegrößen durchlaufen
Move Panel Bedienfeld verschieben
Group with Gruppieren mit
Resize panel window Bedienfeldfenster skalieren
Can't render this file because it is too large.
+3
View File
@@ -2726,6 +2726,7 @@ effect Soft Απαλό
Change Panel Layout Αλλαγή διάταξης πάνελ
Close Panel Κλείσιμο πάνελ
Collapse Panel Group Σύμπτυξη ομάδας πάνελ
Cycle Display Sizes Εναλλαγή μεγεθών εμφάνισης
Move Panel Μετακίνηση πάνελ
Group with Ομαδοποίηση με
Resize panels Αλλαγή μεγέθους πάνελ
@@ -5082,6 +5083,8 @@ digits Malayalam Μαλαγιάλαμ
@msg unknown option `{path}.{k}` άγνωστη επιλογή `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) άγνωστη επιλογή υπερεκτύπωσης `{o}` (preserve, simulate ή discard)
@msg unknown panel `{raw}` άγνωστος πίνακας `{raw}`
@msg `{panel}` has no display sizes to cycle ο πίνακας `{panel}` δεν έχει μεγέθη εμφάνισης για εναλλαγή
@msg the panels are not shown οι πίνακες δεν εμφανίζονται
@msg panels can't be shown in Presentation Mode τα πλαίσια δεν μπορούν να εμφανιστούν στη λειτουργία παρουσίασης
@msg unknown preference `{key}` άγνωστη προτίμηση `{key}`
@msg Preferences imported. Οι προτιμήσεις εισήχθησαν.
Can't render this file because it is too large.
+3
View File
@@ -5132,6 +5132,8 @@ axis Both Ambos
@msg unknown option `{path}.{k}` opción desconocida `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) sobreimpresiones desconocidas `{o}` (preserve, simulate o discard)
@msg unknown panel `{raw}` panel desconocido `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` no tiene tamaños de visualización que alternar
@msg the panels are not shown los paneles no se muestran
@msg panels can't be shown in Presentation Mode los paneles no se pueden mostrar en el modo de presentación
@msg unknown preference `{key}` preferencia desconocida `{key}`
@msg Preferences imported. Preferencias importadas.
@@ -5507,6 +5509,7 @@ axis Both Ambos
Change Panel Layout Cambiar distribución de paneles
Close Panel Cerrar panel
Collapse Panel Group Contraer grupo de paneles
Cycle Display Sizes Alternar tamaños de visualización
Move Panel Mover panel
Group with Agrupar con
Resize panels Cambiar tamaño de los paneles
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -1018,6 +1018,7 @@
Change Panel Layout Muuta paneelien asettelua
Close Panel Sulje paneeli
Collapse Panel Group Kutista paneeliryhmä
Cycle Display Sizes Vaihda näyttökokoa
Move Panel Siirrä paneelia
Group with Ryhmitä kohteen kanssa
Resize panels Muuta paneelien kokoa
@@ -5345,6 +5346,8 @@ imageTrace Outline Ääriviiva
@msg unknown option `{path}.{k}` tuntematon asetus `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) tuntematon päällepainatusten käsittely `{o}` (preserve, simulate tai discard)
@msg unknown panel `{raw}` tuntematon paneeli `{raw}`
@msg `{panel}` has no display sizes to cycle paneelissa `{panel}` ei ole vaihdettavia näyttökokoja
@msg the panels are not shown paneelit eivät ole näkyvissä
@msg panels can't be shown in Presentation Mode paneeleja ei voi näyttää esitystilassa
@msg unknown preference `{key}` tuntematon asetus `{key}`
@msg Preferences imported. Asetukset tuotiin.
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -5109,6 +5109,8 @@ axis Both Les deux
@msg unknown option `{path}.{k}` option inconnue `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) surimpressions inconnues `{o}` (preserve, simulate ou discard)
@msg unknown panel `{raw}` panneau inconnu `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` n’a pas de tailles d’affichage à parcourir
@msg the panels are not shown les panneaux ne sont pas affichés
@msg panels can't be shown in Presentation Mode les panneaux ne peuvent pas être affichés en mode Présentation
@msg unknown preference `{key}` préférence inconnue `{key}`
@msg Preferences imported. Préférences importées.
@@ -5503,6 +5505,7 @@ effect Soft Doux
Change Panel Layout Modifier la disposition des panneaux
Close Panel Fermer le panneau
Collapse Panel Group Réduire le groupe de panneaux
Cycle Display Sizes Parcourir les tailles d’affichage
Move Panel Déplacer le panneau
Group with Regrouper avec
Resize panels Redimensionner les panneaux
Can't render this file because it is too large.
+1
View File
@@ -611,6 +611,7 @@
Closing bracket with no opening one ખુલતા કૌંસ વગરનો બંધ થતો કૌંસ
Coincidence: સંયોગ:
Collapse Panel Group પેનલ ગ્રૂપ સંકોચો
Cycle Display Sizes પ્રદર્શન કદ બદલો
Collapse Panels to Icons પેનલ્સને આઇકનમાં સંકોચો
Collapse to Icons આઇકનમાં સંકોચો
Collate ક્રમમાં ગોઠવો
Can't render this file because it contains an unexpected character in line 72 and column 5.
+3
View File
@@ -900,6 +900,7 @@ antiAlias Sharp शार्प
Coarse Dots मोटे बिंदु
Coincidence: संयोग:
Collapse Panel Group पैनल समूह संक्षिप्त करें
Cycle Display Sizes प्रदर्शन आकार बदलें
Collapse Panels to Icons सिकोड़ें करने के लिए पैनल
Collapse to Icons प्रतीक के लिए पतन
Collate कोलेट
@@ -8620,6 +8621,8 @@ antiAlias Sharp शार्प
@msg unknown overprints `{v}` (preserve, simulate or discard) अज्ञात ओवरप्रिंट `{v}` (preserve, simulate या discard)
@msg unknown panel अज्ञात पैनल
@msg unknown panel `{raw}` अज्ञात पैनल `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` के पास बदलने के लिए कोई प्रदर्शन आकार नहीं है
@msg the panels are not shown पैनल नहीं दिखाए गए हैं
@msg panels can't be shown in Presentation Mode प्रस्तुति मोड में पैनल्स नहीं दिखाए जा सकते
@msg unknown parameter `{key}`; did you mean `{near}`? अज्ञात पैरामीटर `{key}`; क्या आपको `{near}` का मतलब है?
@msg unknown parameter `{key}`; the command takes no parameters अज्ञात पैरामीटर `{key}`; कमांड कोई पैरामीटर नहीं लेता है
Can't render this file because it is too large.
+3
View File
@@ -686,6 +686,7 @@ font-technology Variable Változó
Close Library Könyvtár bezárása
Close Panel Panel bezárása
Collapse Panel Group Panelcsoport összecsukása
Cycle Display Sizes Megjelenítési méretek váltása
Close Path Útvonal lezárása
Close paths when ends are within: Útvonalak lezárása, ha a végek távolsága legfeljebb:
Clumped Csomós
@@ -5949,6 +5950,8 @@ imageTrace Outline Körvonal
@msg unknown option `{path}.{k}` ismeretlen beállítás: `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) ismeretlen felülnyomás-kezelés: `{o}` (preserve, simulate vagy discard)
@msg unknown panel `{raw}` ismeretlen panel: `{raw}`
@msg `{panel}` has no display sizes to cycle a(z) `{panel}` panelnek nincsenek váltható megjelenítési méretei
@msg the panels are not shown a panelek nem láthatók
@msg panels can't be shown in Presentation Mode bemutató módban a panelek nem jeleníthetők meg
@msg unknown preference `{key}` ismeretlen beállítás: `{key}`
@msg Preferences imported. A beállítások importálva.
Can't render this file because it is too large.
+1
View File
@@ -957,6 +957,7 @@
Change Panel Layout Ubah tata letak panel
Close Panel Tutup panel
Collapse Panel Group Ciutkan grup panel
Cycle Display Sizes Ganti ukuran tampilan
Move Panel Pindahkan panel
Group with Grupkan dengan
Resize panels Ubah ukuran panel
1 # Indonesian (id) catalog. Same format as zh-hant.tsv: context <TAB> source <TAB> translation
957
958
959
960
961
962
963
+3
View File
@@ -5171,6 +5171,8 @@ axis Both Entrambi
@msg unknown option `{path}.{k}` opzione sconosciuta `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) valore di sovrastampa sconosciuto `{o}` (preserve, simulate o discard)
@msg unknown panel `{raw}` pannello sconosciuto `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` non ha dimensioni di visualizzazione da scorrere
@msg the panels are not shown i pannelli non sono visualizzati
@msg panels can't be shown in Presentation Mode i pannelli non possono essere mostrati in modalità presentazione
@msg unknown preference `{key}` preferenza sconosciuta `{key}`
@msg Preferences imported. Preferenze importate.
@@ -5548,6 +5550,7 @@ effect Regular Normale
Change Panel Layout Modifica disposizione dei pannelli
Close Panel Chiudi pannello
Collapse Panel Group Comprimi gruppo di pannelli
Cycle Display Sizes Scorri le dimensioni di visualizzazione
Move Panel Sposta pannello
Group with Raggruppa con
Resize panels Ridimensiona pannelli
Can't render this file because it is too large.
+3
View File
@@ -5108,6 +5108,8 @@ swatch Bright Violet ビビッドバイオレット
@msg give only one of onto, below and above onto、below、above のうち 1 つだけを指定してください
@msg column must be true or a number from 1 column には true または 1 以上の数値を指定してください
@msg unknown panel `{raw}` `{raw}` は不明なパネルです
@msg `{panel}` has no display sizes to cycle `{panel}` には切り替える表示サイズがありません
@msg the panels are not shown パネルが表示されていません
@msg panels can't be shown in Presentation Mode プレゼンテーションモードではパネルを表示できません
@msg x and y must both be numbers x と y はどちらも数値で指定してください
@msg Downloaded {what} {what} をダウンロードしました
@@ -5591,6 +5593,7 @@ effect Vertical 垂直
Change Panel Layout パネルの配置を変更
Close Panel パネルを閉じる
Collapse Panel Group パネルグループを折りたたむ
Cycle Display Sizes 表示サイズを切り替え
Move Panel パネルを移動
Group with グループ化先
Resize panels パネルのサイズを変更
Can't render this file because it is too large.
+3
View File
@@ -3008,6 +3008,7 @@
Change Panel Layout პანელების განლაგების შეცვლა
Close Panel პანელის დახურვა
Collapse Panel Group პანელების ჯგუფის აკეცვა
Cycle Display Sizes ჩვენების ზომების გადართვა
Move Panel პანელის გადაადგილება
Group with ერთად დაჯგუფება
Resize panels პანელების ზომის შეცვლა
@@ -6858,6 +6859,8 @@ font-technology Variable ცვლადი
@msg unknown option `{path}.{k}` უცნობი პარამეტრი `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) უცნობი ზედდაბეჭდვა `{o}` (preserve, simulate ან discard)
@msg unknown panel `{raw}` უცნობი პანელი `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` პანელს არ აქვს გადასართავი ჩვენების ზომები
@msg the panels are not shown პანელები არ ჩანს
@msg panels can't be shown in Presentation Mode პრეზენტაციის რეჟიმში პანელების ჩვენება შეუძლებელია
@msg unknown preference `{key}` უცნობი პარამეტრი `{key}`
@msg Preferences imported. პარამეტრები იმპორტირებულია.
Can't render this file because it is too large.
+3
View File
@@ -5035,6 +5035,8 @@ theme Appearance 외관
@msg give only one of onto, below and above onto, below, above 중 하나만 지정하세요
@msg column must be true or a number from 1 column은 true이거나 1 이상의 숫자여야 합니다
@msg unknown panel `{raw}` 알 수 없는 패널 `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}`에는 전환할 표시 크기가 없습니다
@msg the panels are not shown 패널이 표시되지 않습니다
@msg panels can't be shown in Presentation Mode 프레젠테이션 모드에서는 패널을 표시할 수 없습니다
@msg x and y must both be numbers x와 y는 모두 숫자여야 합니다
@msg Downloaded {what} {what}을(를) 다운로드했습니다
@@ -5516,6 +5518,7 @@ effect Vertical 세로
Change Panel Layout 패널 레이아웃 변경
Close Panel 패널 닫기
Collapse Panel Group 패널 그룹 접기
Cycle Display Sizes 표시 크기 전환
Move Panel 패널 이동
Group with 함께 그룹화
Resize panels 패널 크기 조절
Can't render this file because it is too large.
+3
View File
@@ -1477,6 +1477,7 @@
Change Panel Layout Paneelindeling wijzigen
Close Panel Paneel sluiten
Collapse Panel Group Paneelgroep samenvouwen
Cycle Display Sizes Weergavegrootten doorlopen
Move Panel Paneel verplaatsen
Group with Groeperen met
Resize panels Panelen van formaat wijzigen
@@ -5445,6 +5446,8 @@ imageTrace Outline Contour
@msg unknown option `{path}.{k}` onbekende optie `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) onbekende overdruk `{o}` (preserve, simulate of discard)
@msg unknown panel `{raw}` onbekend paneel `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` heeft geen weergavegrootten om te doorlopen
@msg the panels are not shown de panelen worden niet getoond
@msg unknown preference `{key}` onbekende voorkeur `{key}`
@msg Preferences imported. Voorkeuren geïmporteerd.
@msg not a preferences file: {e} geen voorkeurenbestand: {e}
Can't render this file because it is too large.
+3
View File
@@ -975,6 +975,7 @@
Change Panel Layout Zmień układ paneli
Close Panel Zamknij panel
Collapse Panel Group Zwiń grupę paneli
Cycle Display Sizes Przełącz rozmiary wyświetlania
Move Panel Przesuń panel
Group with Grupuj z
Resize panels Zmień rozmiar paneli
@@ -5260,6 +5261,8 @@ imageTrace Outline Kontur
@msg unknown option `{path}.{k}` nieznana opcja `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) nieznana wartość nadruków `{o}` (preserve, simulate lub discard)
@msg unknown panel `{raw}` nieznany panel `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` nie ma rozmiarów wyświetlania do przełączania
@msg the panels are not shown panele nie są wyświetlane
@msg panels can't be shown in Presentation Mode w trybie prezentacji nie można wyświetlić paneli
@msg unknown preference `{key}` nieznana preferencja `{key}`
@msg Preferences imported. Zaimportowano preferencje.
Can't render this file because it is too large.
+3
View File
@@ -3544,6 +3544,7 @@ imageTrace Outline Contorno
Change Panel Layout Alterar Layout dos Painéis
Close Panel Fechar Painel
Collapse Panel Group Recolher Grupo de Painéis
Cycle Display Sizes Alternar Tamanhos de Exibição
Move Panel Mover Painel
Group with Agrupar com
Resize panels Redimensionar painéis
@@ -4490,6 +4491,8 @@ axis Both Ambos
@msg unknown option `{path}.{k}` opção desconhecida `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) sobreimpressões desconhecidas `{o}` (preserve, simulate ou discard)
@msg unknown panel `{raw}` painel desconhecido `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` não tem tamanhos de exibição para alternar
@msg the panels are not shown os painéis não estão sendo exibidos
@msg panels can't be shown in Presentation Mode os painéis não podem ser mostrados no Modo de Apresentação
@msg unknown preference `{key}` preferência desconhecida `{key}`
@msg Preferences imported. Preferências importadas.
Can't render this file because it is too large.
+3
View File
@@ -5169,6 +5169,8 @@ axis Both Оба
@msg unknown option `{path}.{k}` неизвестный параметр `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) неизвестные наложения `{o}` (preserve, simulate или discard)
@msg unknown panel `{raw}` неизвестная панель `{raw}`
@msg `{panel}` has no display sizes to cycle у панели `{panel}` нет размеров отображения для переключения
@msg the panels are not shown панели не показаны
@msg panels can't be shown in Presentation Mode в режиме презентации панели показать нельзя
@msg unknown preference `{key}` неизвестная настройка `{key}`
@msg Preferences imported. Настройки импортированы.
@@ -5546,6 +5548,7 @@ axis Both Оба
Change Panel Layout Изменить расположение панелей
Close Panel Закрыть панель
Collapse Panel Group Свернуть группу панелей
Cycle Display Sizes Переключить размеры отображения
Move Panel Переместить панель
Group with Сгруппировать с
Resize panels Изменить размер панелей
Can't render this file because it is too large.
+3
View File
@@ -5024,6 +5024,8 @@ axis Both Båda
@msg unknown option `{path}.{k}` okänt alternativ `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) okänt värde för övertryck `{o}` (preserve, simulate eller discard)
@msg unknown panel `{raw}` okänd panel `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` har inga visningsstorlekar att växla mellan
@msg the panels are not shown panelerna visas inte
@msg panels can't be shown in Presentation Mode paneler kan inte visas i presentationsläge
@msg unknown preference `{key}` okänd inställning `{key}`
@msg Preferences imported. Inställningarna har importerats.
@@ -5415,6 +5417,7 @@ effect Soft Mjuk
Change Panel Layout Ändra panellayout
Close Panel Stäng panel
Collapse Panel Group Komprimera panelgrupp
Cycle Display Sizes Växla visningsstorlekar
Move Panel Flytta panel
Group with Gruppera med
Resize panels Ändra storlek på paneler
Can't render this file because it is too large.
+3
View File
@@ -4876,6 +4876,8 @@ axis Both Her İkisi
@msg unknown option `{path}.{k}` bilinmeyen seçenek `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) bilinmeyen üst baskılar `{o}` (preserve, simulate veya discard)
@msg unknown panel `{raw}` bilinmeyen panel `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` panelinde geçiş yapılacak görüntü boyutu yok
@msg the panels are not shown paneller gösterilmiyor
@msg panels can't be shown in Presentation Mode Sunum Modunda paneller gösterilemez
@msg unknown preference `{key}` bilinmeyen tercih `{key}`
@msg Preferences imported. Tercihler içe aktarıldı.
@@ -6487,6 +6489,7 @@ theme Appearance Görünüm
@msg a new document refuses this file because of these variables: {names} yeni bir belge bu değişkenler nedeniyle bu dosyayı reddeder: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them `{name}` için `{header}` başlığı `{other}` değişkeni olarak okunur: birini yeniden adlandırın
Collapse Panel Group Panel Grubunu Daralt
Cycle Display Sizes Görüntü Boyutları Arasında Geçiş Yap
@msg panel is not in a dock group panel bir yuva grubunda değil
@msg only a dock group above or below others collapses, not one beside another yalnızca diğerlerinin üstünde veya altındaki bir yuva grubu daraltılabilir, yanındaki değil
@msg icon must be true or false icon true veya false olmalı
Can't render this file because it is too large.
+3
View File
@@ -5155,6 +5155,8 @@ axis Both Обидві
@msg unknown option `{path}.{k}` невідомий параметр `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) невідомі накладення `{o}` (preserve, simulate або discard)
@msg unknown panel `{raw}` невідома панель `{raw}`
@msg `{panel}` has no display sizes to cycle панель `{panel}` не має розмірів відображення для перемикання
@msg the panels are not shown панелі не показано
@msg panels can't be shown in Presentation Mode у режимі презентації панелі показати не можна
@msg unknown preference `{key}` невідоме налаштування `{key}`
@msg Preferences imported. Налаштування імпортовано.
@@ -5530,6 +5532,7 @@ axis Both Обидві
Change Panel Layout Змінити розташування панелей
Close Panel Закрити панель
Collapse Panel Group Згорнути групу панелей
Cycle Display Sizes Перемкнути розміри відображення
Move Panel Перемістити панель
Group with Згрупувати з
Resize panels Змінити розмір панелей
Can't render this file because it is too large.
+3
View File
@@ -598,6 +598,7 @@ font-technology Variable Biến thiên
Close Library Đóng thư viện
Close Panel Đóng bảng
Collapse Panel Group Thu gọn nhóm bảng
Cycle Display Sizes Chuyển kích thước hiển thị
Close Path Đóng đường dẫn
Close paths when ends are within: Đóng đường dẫn khi hai đầu cách nhau trong:
Clumped Dạng cụm
@@ -5691,6 +5692,8 @@ theme Appearance Giao diện
@msg unknown option `{path}.{k}` tùy chọn không xác định `{path}.{k}`
@msg unknown overprints `{o}` (preserve, simulate or discard) chế độ in đè không xác định `{o}` (preserve, simulate hoặc discard)
@msg unknown panel `{raw}` bảng không xác định `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` không có kích thước hiển thị để chuyển
@msg the panels are not shown các bảng không được hiển thị
@msg panels can't be shown in Presentation Mode không thể hiển thị bảng trong chế độ trình bày
@msg unknown parameter `{key}`; did you mean `{near}`? tham số không xác định `{key}`; ý bạn là `{near}`?
@msg unknown parameter `{key}`; the command takes no parameters tham số không xác định `{key}`; lệnh này không nhận tham số
Can't render this file because it contains an unexpected character in line 205 and column 5.
+3
View File
@@ -4789,6 +4789,8 @@ imageTrace Outline 轮廓
@msg give only one of onto, below and above onto、below 和 above 只能给出一个
@msg column must be true or a number from 1 column 必须是 true 或从 1 开始的数字
@msg unknown panel `{raw}` 未知面板 `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` 没有可切换的显示大小
@msg the panels are not shown 面板未显示
@msg panels can't be shown in Presentation Mode 演示模式下无法显示面板
@msg x and y must both be numbers x 和 y 都必须是数字
@msg Downloaded {what} 已下载 {what}
@@ -5830,6 +5832,7 @@ effect Vertical 垂直
Change Panel Layout 更改面板布局
Close Panel 关闭面板
Collapse Panel Group 折叠面板组
Cycle Display Sizes 切换显示大小
Move Panel 移动面板
Group with 组合到
Resize panels 调整面板大小
Can't render this file because it is too large.
+3
View File
@@ -2437,6 +2437,8 @@ file-filter Templates 範本
@msg give only one of onto, below and above onto、below 和 above 只能提供其中一個
@msg column must be true or a number from 1 column 必須是 true 或從 1 起算的數字
@msg unknown panel `{raw}` 未知的面板 `{raw}`
@msg `{panel}` has no display sizes to cycle `{panel}` 沒有可切換的顯示大小
@msg the panels are not shown 面板未顯示
@msg panels can't be shown in Presentation Mode 簡報模式下無法顯示面板
@msg x and y must both be numbers x 和 y 都必須是數字
@msg Downloaded {what} 已下載 {what}
@@ -5666,6 +5668,7 @@ effect Soft 柔和
Change Panel Layout 變更面板配置
Close Panel 關閉面板
Collapse Panel Group 摺疊面板群組
Cycle Display Sizes 切換顯示大小
Move Panel 移動面板
Group with 群組至
Resize panels 調整面板大小
Can't render this file because it is too large.
+6
View File
@@ -651,6 +651,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
"",
"{panel, collapsed?: bool} minimize the group holding a panel to its tabs (in a floating window, the window to its title bar), or restore it, as a double-click on a tab or the drag bar does; the same as window.panel.minimize {panel, minimized}. Without `collapsed` it toggles. Returns {panel, collapsed, layout}",
),
(
"window.panel.cycleOptions",
"Cycle Display Sizes",
"",
"{panel} show a panel at its next display size, as the double triangle at the right end of its tab strip does: the sizes are the states of its panel menu's Show/Hide Options (Transparency: options and thumbnails, thumbnails alone, neither), largest first, and the smallest goes back to the largest; Align, Attributes, Character, Color, Flattener Preview, Gradient, Info, Paragraph, Stroke, Transform and Transparency have them. An unknown panel or one without display sizes is an error and changes nothing. Returns {panel, size: 0 for the largest, sizes: how many it has}",
),
(
"window.panel.float",
"Float Panel",
+14 -4
View File
@@ -316,7 +316,7 @@ fn apply(layout: &mut Layout<String>, action: Action<String>) -> Result<Vec<Stri
}
/// The docking commands VectorCraft handles here: `window.panel` (the Window menu), its own
/// `window.panel.collapse` and `window.collapseDock`, the Tools panel's float and dock
/// `window.panel.collapse`, `window.panel.cycleOptions` and `window.collapseDock`, the Tools panel's float and dock
/// ([`crate::tools_float`]) and craft-ui's shared ids. Workspaces stay [`crate::workspaces`]'.
pub(crate) fn command(app: &mut VectorcraftApp, id: &str, params: &Value) -> Option<Result<Value, String>> {
if let Some(result) = crate::tools_float::command(app, id, params) {
@@ -326,6 +326,7 @@ pub(crate) fn command(app: &mut VectorcraftApp, id: &str, params: &Value) -> Opt
"window.panel" => return Some(show_panel(app, params)),
"window.collapseDock" => return Some(crate::menus::opt_bool(params, "collapsed").and_then(|c| collapse_dock(app, c))),
"window.panels.peek" => return Some(peek::command(app, params)),
"window.panel.cycleOptions" => return Some(sizes::command(app, params)),
"window.panel.collapse" => {
let minimized = match crate::menus::opt_bool(params, "collapsed") {
Ok(c) => c,
@@ -1472,13 +1473,21 @@ impl craft_ui::docking::DockContent<String> for PanelContent<'_> {
crate::panels::panel_menu_items(self.app, ui, id);
}
fn group_header_width(&self, panels: &[String], _active: &String, floating: bool, _strip_width: f32) -> f32 {
fn group_header_width(&self, panels: &[String], active: &String, floating: bool, _strip_width: f32) -> f32 {
let flyout = self.app.ui.open_panel.as_ref().is_some_and(|panel| panels.contains(panel));
if floating || flyout { 52.0 } else { 28.0 }
let cycle = if sizes::has_sizes(active) { sizes::CELL } else { 0.0 };
cycle + if floating || flyout { 52.0 } else { 28.0 }
}
fn group_header(&mut self, ui: &mut egui::Ui, panels: &[String], active: &String, floating: bool) {
let header = ui.max_rect();
let mut header = ui.max_rect();
// The double triangle comes first, for a panel with display sizes.
if sizes::has_sizes(active) {
let split = (header.left() + sizes::CELL).min(header.right());
let cell = egui::Rect::from_min_max(header.min, egui::pos2(split, header.bottom()));
sizes::button(self.app, ui, cell, active);
header.min.x = split;
}
let flyout = self.app.ui.open_panel.clone().filter(|panel| panels.contains(panel));
let menu_cell = if floating || flyout.is_some() {
let split = (header.right() - 28.0).max(header.left());
@@ -1523,6 +1532,7 @@ impl craft_ui::docking::DockContent<String> for PanelContent<'_> {
}
mod peek;
mod sizes;
#[cfg(test)]
mod tests;
+128
View File
@@ -0,0 +1,128 @@
//! A panel's display sizes: the double triangle at the end of its tab strip steps through them
//! (`window.panel.cycleOptions`). A size is a set of the panel's Hide Options, Hide Thumbnails
//! and Show Options states, the ones its panel menu already sets, so the menu and the control
//! always agree. The sizes go from the largest to the smallest, and the smallest is followed by
//! the largest again. A panel whose parts are in no size's states goes to its largest size.
use serde_json::{Value, json};
use crate::VectorcraftApp;
use crate::panels::{pstate, set_pstate};
/// A part of a panel that can be hidden.
#[derive(Clone, Copy, Debug)]
enum Part {
/// A Hide flag the panel keeps with its panel state ([`pstate`]), true while hidden.
Hide(&'static str),
/// The Color panel's Hide Options, kept with the preferences.
ColorOptions,
/// The Flattener Preview panel's Show Options.
FlattenerOptions,
}
/// A panel that has display sizes: its parts, and the parts each size hides, largest first.
struct Sizes {
panel: &'static str,
parts: &'static [Part],
sizes: &'static [&'static [bool]],
}
/// Options shown, then hidden.
const OPTIONS: &[&[bool]] = &[&[false], &[true]];
/// The panels with display sizes.
const PANELS: &[Sizes] = &[
Sizes { panel: "align", parts: &[Part::Hide("align-hide-options")], sizes: OPTIONS },
Sizes { panel: "attributes", parts: &[Part::Hide("attr-hide-options")], sizes: OPTIONS },
Sizes { panel: "character", parts: &[Part::Hide("ch-hide-options")], sizes: OPTIONS },
Sizes { panel: "color", parts: &[Part::ColorOptions], sizes: OPTIONS },
Sizes { panel: crate::panels::flattener_preview::ID, parts: &[Part::FlattenerOptions], sizes: OPTIONS },
Sizes { panel: "gradient", parts: &[Part::Hide("gradient-hide-options")], sizes: OPTIONS },
Sizes { panel: "info", parts: &[Part::Hide("info-hide-options")], sizes: OPTIONS },
Sizes { panel: "paragraph", parts: &[Part::Hide("pa-hide-options")], sizes: OPTIONS },
Sizes { panel: "stroke", parts: &[Part::Hide("stroke-hide-options")], sizes: OPTIONS },
Sizes { panel: "transform", parts: &[Part::Hide("xf-hide-options")], sizes: OPTIONS },
// Thumbnails and options, then thumbnails alone, then neither.
Sizes {
panel: "transparency",
parts: &[Part::Hide("tr-hide-thumbs"), Part::Hide("tr-hide-options")],
sizes: &[&[false, false], &[false, true], &[true, true]],
},
];
fn sizes_of(panel: &str) -> Option<&'static Sizes> {
PANELS.iter().find(|s| s.panel == panel)
}
/// Does `panel` have display sizes to step through?
pub(crate) fn has_sizes(panel: &str) -> bool {
sizes_of(panel).is_some()
}
fn hidden(app: &VectorcraftApp, ctx: &egui::Context, part: Part) -> bool {
match part {
Part::Hide(key) => pstate(ctx, key),
Part::ColorOptions => app.ui.color_hide_options,
Part::FlattenerOptions => !app.ui.flattener_preview.show_options,
}
}
fn set_hidden(app: &mut VectorcraftApp, ctx: &egui::Context, part: Part, hide: bool) {
match part {
Part::Hide(key) => set_pstate(ctx, key, hide),
Part::ColorOptions => app.ui.color_hide_options = hide,
Part::FlattenerOptions => app.ui.flattener_preview.show_options = !hide,
}
}
/// The size `panel` shows now (0 is the largest), or `None` when its parts match no size.
fn current(app: &VectorcraftApp, ctx: &egui::Context, sizes: &Sizes) -> Option<usize> {
let now: Vec<bool> = sizes.parts.iter().map(|&part| hidden(app, ctx, part)).collect();
sizes.sizes.iter().position(|size| *size == now.as_slice())
}
/// `window.panel.cycleOptions {panel}`: show `panel` at its next display size, as the double
/// triangle on its tab strip does. An unknown panel, a panel without display sizes, or no panels
/// drawn yet is an error, and then nothing changes. → {panel, size, sizes}: the size shown now
/// (0 is the largest) and how many sizes the panel has.
pub(crate) fn command(app: &mut VectorcraftApp, params: &Value) -> Result<Value, String> {
let raw = params.get("panel").and_then(Value::as_str).unwrap_or_default();
let panel = super::normalize(raw).ok_or_else(|| format!("unknown panel `{raw}`"))?;
let sizes = sizes_of(panel).ok_or_else(|| format!("`{panel}` has no display sizes to cycle"))?;
let ctx = app.ui_ctx.clone().ok_or("the panels are not shown")?;
let next = current(app, &ctx, sizes).map_or(0, |i| (i + 1) % sizes.sizes.len());
for (&part, &hide) in sizes.parts.iter().zip(sizes.sizes[next]) {
set_hidden(app, &ctx, part, hide);
}
ctx.request_repaint();
Ok(json!({"panel": panel, "size": next, "sizes": sizes.sizes.len()}))
}
/// Width of the double triangle's cell at the start of a group header.
pub(crate) const CELL: f32 = 20.0;
/// Draw the double triangle for `panel` centered in `cell`; a click shows its next size.
pub(crate) fn button(app: &mut VectorcraftApp, ui: &mut egui::Ui, cell: egui::Rect, panel: &str) {
let rect = egui::Rect::from_center_size(cell.center(), egui::vec2(16.0_f32.min(cell.width()), 22.0_f32.min(cell.height())));
if !rect.is_positive() {
return;
}
let label = tl!("Cycle Display Sizes");
let response = ui.interact(rect, ui.scope_id().with(("cycle-display-sizes", panel)), egui::Sense::click());
response.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, ui.is_enabled(), label));
let tokens = crate::theme::Tokens::get(ui.ctx());
let color = if response.hovered() || response.has_focus() { tokens.text_strong } else { tokens.text_dim };
let c = rect.center();
let (w, h, gap) = (3.5, 3.5, 1.5);
let painter = ui.painter().with_clip_rect(rect.intersect(ui.clip_rect()));
let up = vec![egui::pos2(c.x - w, c.y - gap), egui::pos2(c.x + w, c.y - gap), egui::pos2(c.x, c.y - gap - h)];
let down = vec![egui::pos2(c.x - w, c.y + gap), egui::pos2(c.x, c.y + gap + h), egui::pos2(c.x + w, c.y + gap)];
for points in [up, down] {
painter.add(egui::Shape::convex_polygon(points, color, egui::Stroke::NONE));
}
if response.on_hover_text(label).clicked()
&& let Err(error) = app.run("window.panel.cycleOptions", json!({"panel": panel}))
{
app.ui.status = error;
}
}
+113
View File
@@ -1702,3 +1702,116 @@ fn rail_flyout_collapse_arrow_closes_the_opening_icon_after_switching_tabs() {
assert!(craft_ui::docking::flyout::<String>(&h.ctx, area_id()).is_none());
assert_eq!(h.layout(), before, "all tabs and their active state stay in the rail");
}
/// The texts `panel`'s menu draws, in the harness's context.
fn panel_menu_texts(h: &mut Harness, panel: &str) -> Vec<String> {
fn texts(s: &egui::Shape, out: &mut Vec<String>) {
match s {
egui::Shape::Text(t) => out.push(t.galley.text().trim().to_string()),
egui::Shape::Vec(v) => v.iter().for_each(|s| texts(s, out)),
_ => {}
}
}
let app = &mut h.app;
let mut out = h.ctx.run_ui(egui::RawInput { screen_rect: Some(SCREEN), ..Default::default() }, |ui| {
crate::panels::panel_menu_items(app, ui, panel);
});
out.textures_delta.clear();
let mut v = vec![];
out.shapes.iter().for_each(|c| texts(&c.shape, &mut v));
v
}
fn cycle_button(h: &Harness, panel: &str) -> Option<Rect> {
let panel = panel.to_string();
h.ctx.read_response(area_id().with(("header", &panel)).with(("cycle-display-sizes", &panel))).map(|r| r.rect)
}
/// Each panel with display sizes steps between the states its panel menu's Show/Hide Options
/// item sets, and the smallest size goes back to the largest.
#[test]
fn cycle_options_steps_through_the_states_the_panel_menu_sets() {
let mut h = Harness::new();
for panel in ["align", "attributes", "character", "color", "gradient", "info", "paragraph", "stroke", "transform"] {
assert!(panel_menu_texts(&mut h, panel).iter().any(|t| t == "Hide Options"), "{panel} starts with its options");
let r = h.app.run("window.panel.cycleOptions", json!({"panel": panel})).unwrap();
assert_eq!(r, json!({"panel": panel, "size": 1, "sizes": 2}), "{panel}");
assert!(panel_menu_texts(&mut h, panel).iter().any(|t| t == "Show Options"), "{panel} hides its options");
let r = h.app.run("window.panel.cycleOptions", json!({"panel": panel})).unwrap();
assert_eq!(r["size"], 0, "{panel}");
assert!(panel_menu_texts(&mut h, panel).iter().any(|t| t == "Hide Options"), "{panel} shows them again");
}
// The Flattener Preview's options start hidden: its first step shows them, as Show Options does.
assert!(!h.app.ui.flattener_preview.show_options);
let r = h.app.run("window.panel.cycleOptions", json!({"panel": "Flattener Preview"})).unwrap();
assert_eq!(r, json!({"panel": crate::panels::flattener_preview::ID, "size": 0, "sizes": 2}));
assert!(h.app.ui.flattener_preview.show_options);
h.app.run("window.panel.cycleOptions", json!({"panel": crate::panels::flattener_preview::ID})).unwrap();
assert!(!h.app.ui.flattener_preview.show_options);
// Transparency: thumbnails and options, thumbnails alone, neither, and back.
let shown = |h: &mut Harness| {
let t = panel_menu_texts(h, "transparency");
(t.iter().any(|t| t == "Hide Thumbnails"), t.iter().any(|t| t == "Hide Options"))
};
assert_eq!(shown(&mut h), (true, true));
for (size, want) in [(1, (true, false)), (2, (false, false)), (0, (true, true))] {
let r = h.app.run("window.panel.cycleOptions", json!({"panel": "transparency"})).unwrap();
assert_eq!((r["size"].clone(), r["sizes"].clone()), (json!(size), json!(3)));
assert_eq!(shown(&mut h), want, "size {size}");
}
// Options hidden with the thumbnails shown matches no size, so the next step is the largest.
crate::panels::set_pstate(&h.ctx, "tr-hide-thumbs", true);
assert_eq!(h.app.run("window.panel.cycleOptions", json!({"panel": "transparency"})).unwrap()["size"], 0);
assert_eq!(shown(&mut h), (true, true));
}
/// An unknown panel, a panel without display sizes or a missing `panel` is an error, and the
/// panels keep their sizes.
#[test]
fn cycle_options_rejects_panels_without_sizes() {
let mut h = Harness::new();
for (params, error) in [
(json!({"panel": "nope"}), "unknown panel `nope`"),
(json!({}), "unknown panel ``"),
(json!({"panel": 3}), "unknown panel ``"),
(json!({"panel": "layers"}), "`layers` has no display sizes to cycle"),
(json!({"panel": "swatches"}), "`swatches` has no display sizes to cycle"),
] {
assert_eq!(h.app.run("window.panel.cycleOptions", params.clone()).unwrap_err(), error, "{params}");
}
assert!(panel_menu_texts(&mut h, "stroke").iter().any(|t| t == "Hide Options"));
assert!(!h.app.ui.color_hide_options);
}
/// The double triangle shows on the tab strip of a panel with display sizes, docked or floating,
/// and a click on it shows the panel's next size; other panels have none.
#[test]
fn the_double_triangle_on_the_tab_strip_cycles_the_display_sizes() {
let mut h = Harness::new();
h.ctx.enable_accesskit();
h.frame(vec![]);
assert!(cycle_button(&h, "properties").is_none() && cycle_button(&h, "layers").is_none(), "the main column's panels have no sizes");
h.app.run("window.panel.float", json!({"panel": "stroke"})).unwrap();
for _ in 0..3 {
h.frame(vec![]);
}
let control = cycle_button(&h, "stroke").expect("a floating Stroke panel has the double triangle");
assert!(h.nodes.iter().any(|(_, node)| node.label() == Some("Cycle Display Sizes")), "screen readers name it");
let menu = h.ctx.read_response(area_id().with(("header", &"stroke".to_string())).with(("panel-menu", &"stroke".to_string()))).unwrap().rect;
assert!(!menu.intersects(control), "the double triangle and the menu have separate hit targets");
h.click(control.center());
assert!(crate::panels::pstate::<bool>(&h.ctx, "stroke-hide-options"), "a click hides the options");
assert!(floating_window(&h.layout(), "stroke").is_some(), "the panel stays where it is");
h.click(control.center());
assert!(!crate::panels::pstate::<bool>(&h.ctx, "stroke-hide-options"), "a second click shows them again");
// A docked panel's tab strip has it too, and a floating panel without sizes does not.
h.app.run("window.panel.dock", json!({"panel": "color", "anchor": "layers", "zone": "below"})).unwrap();
h.app.run("window.panel.float", json!({"panel": "swatches"})).unwrap();
for _ in 0..3 {
h.frame(vec![]);
}
let control = cycle_button(&h, "color").expect("a docked Color panel has the double triangle");
h.click(control.center());
assert!(h.app.ui.color_hide_options);
assert!(cycle_button(&h, "swatches").is_none());
}
+1
View File
@@ -1061,6 +1061,7 @@ Commands (`panel` and every panel parameter take a panel id in any case or its d
| `window.panel.activate`, `.close`, `.closeGroup`, `.closeOthers` | `{panel}` | shows and selects, or hides |
| `window.panel.minimize` | `{panel, minimized?}` | minimizes a dock group to its tabs, or a floating window to its title bar; omitted toggles |
| `window.panel.collapse` | `{panel, collapsed?}` | `window.panel.minimize`; returns `{panel, collapsed, layout}` |
| `window.panel.cycleOptions` | `{panel}` | shows the panel at its next display size (its Show/Hide Options states, largest first), as the double triangle on its tab strip does; a panel without sizes is an error; returns `{panel, size, sizes}` |
| `window.panel.iconic` | `{panel, iconic?}` | collapses the panel's dock column to icons, or expands it |
| `window.panel.layout`, `ui.dock` | `{action}` | one craft-ui `Action`, externally tagged, e.g. `{"MoveFloating":{"panel":"swatches","rect":[44,66,360,450]}}` or `{"ResizeSplit":{"path":[],"size":{"Ratio":0.35}}}`; `ui.dock` also takes craft-ui's `{operation, …}` |
+8
View File
@@ -3374,6 +3374,14 @@ already walks Image Trace. Short agent entry points:
`largeList`. Without `view` the command answers the current one. Each panel keeps its own view for the session, and
the document does not change. An unknown panel or view is an error, and then nothing changes. It answers
`{panel, view}`.
- Panel display sizes: `window.panel.cycleOptions {panel}` shows the panel at its next display size, as the double
triangle at the right end of its tab strip does, docked or floating. The sizes are the states its panel menu's Show
Options and Hide Options items set, largest first, and the smallest is followed by the largest. Align, Attributes,
Character, Color, Flattener Preview, Gradient, Info, Paragraph, Stroke and Transform have two sizes (options shown,
options hidden). Transparency has three: thumbnails and options, thumbnails alone, and neither. A panel whose
states match none of its sizes goes to its largest. An unknown panel or a panel without display sizes is an error,
and then nothing changes. It answers `{panel, size, sizes}`, where `size` 0 is the largest. The order of the sizes
and the panels that have them are VectorCraft's own.
- The Brushes panel menu's Select All Unused: `brush.unused` (a query) lists the brushes no stroke paints with, in
library order, and the panel selects them. Strokes in the art (opacity masks included), symbols, graph designs,
pattern tiles (with the tiles that pattern editing's Cancel puts back) and graphic styles count, and so do the
+1
View File
@@ -405,6 +405,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po
| Floating groups stack into sets; sets dock as extra dock columns (a multi-column dock); groups drop anywhere in a set or column, or onto its tabs; a column taller than the window scrolls | done | `window.panel.float {below, above}`, `window.panel.dock {column}` |
| Panels dragged onto a dock group's tabs join it; onto its upper or lower half they make a new group above or below it (a top/bottom split, resizable); onto the icon column they become icons, the tabbed group's panels too; a dock tab's context menu closes it (Window menu reopens it) | done | `window.panel.dock {anchor, zone}`, `window.panel.dock {icon: true}`, `window.panel.close` |
| A double-click on a dock group's tab collapses the group to its tabs (a group below it moves up into the room) and a second one expands it; a click on another of its tabs expands it showing that panel ([helpx: Workspace basics](https://helpx.adobe.com/illustrator/using/workspace-basics.html), panel groups) | done | `window.panel.collapse {panel, collapsed?}`; in dock groups and floating windows; a group beside another (a left/right split) doesn't collapse |
| The double triangle at the right end of a panel's tab strip cycles the panel's display sizes, the states its Show/Hide Options (and Transparency's Show/Hide Thumbnails) panel-menu items set ([archived user guide](https://web.archive.org/web/20220911143322/https://helpx.adobe.com/pdf/cs6/illustrator_reference.pdf#page=189), Transparency; [archived user guide](https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=479), Character and Paragraph) | done | `window.panel.cycleOptions {panel}`; Align, Attributes, Character, Color, Flattener Preview, Gradient, Info, Paragraph, Stroke, Transform and Transparency; the order of the sizes, the glyph and where it sits are VectorCraft's own (#3041) |
| Panels outside the app window (another monitor) | done | floating groups in OS windows of their own on the desktop (#4135) |
| Edit Toolbar (•••): the All Tools drawer opens beside the toolbar by its button (Escape or a click outside closes it), dims the tools already in the toolbar; while it is open, tools drag from it onto the toolbar (between two tools, or onto one to join its group), from the toolbar into it, and within the toolbar; each toolbar keeps its edits | done | #1018; `window.editToolbar`, `toolbar.addTool`/`removeTool`/`reset`; the drawer's Reset (Illustrator has it in a drawer menu); dragging a toolbar button moves the tool it shows, not its whole group; tool flyouts are as wide as their longest translated name and shortcut need (#1616) |
| Window › Toolbars › New Toolbar… (also in the All Tools drawer's menu): a name and OK make a blank floating toolbar, listed under Window › Toolbars (its item shows or hides it); its title bar moves it, its × hides it and its double arrow shows its tools in one column or two; its ••• button opens the All Tools drawer beside it to fill it; kept with the workspace it was made in | done | #1759 in part; `window.toolbar.new`, `window.toolbar.custom`, `window.toolbar.list`, the `toolbar` param of `window.toolbarColumns`, `window.editToolbar` and `toolbar.addTool`/`removeTool`/`reset` |