Compare commits

..

1 Commits

Author SHA1 Message Date
David Federman
c77ac66c33 Re-enable MSBuildCache 2025-07-24 09:36:36 -07:00
351 changed files with 7810 additions and 12040 deletions

View File

@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"XamlStyler.Console": {
"version": "3.2501.8",
"version": "3.2311.2",
"commands": [
"xstyler"
]

View File

@@ -174,7 +174,6 @@ tokeninfo
tolower
toupper
TRACKMOUSEEVENT
ubrk
UChar
UFIELD
ULARGE

View File

@@ -34,7 +34,6 @@ issecret
libucrt
libucrtd
LOCKFILE
LTCG
Lxss
makepri
microsoft

View File

@@ -28,7 +28,6 @@ jerrysh
Kaiyu
leonardder
lhecker
Lovecraft
masserano
menger
migrie

View File

@@ -115,6 +115,7 @@ BKCOLOR
BKGND
BKMK
Bksp
blds
Blt
blu
BLUESCROLL
@@ -180,6 +181,7 @@ CLIPCHILDREN
CLIPSIBLINGS
closetest
cloudconsole
CLOUDT
cloudvault
CLSCTX
clsids
@@ -822,7 +824,6 @@ INPUTSCOPE
INSERTMODE
INTERACTIVITYBASE
INTERCEPTCOPYPASTE
internalevent
INTERNALNAME
intsafe
INVALIDARG
@@ -961,7 +962,6 @@ lstatus
lstrcmp
lstrcmpi
LTEXT
lto
ltsc
LUID
luma
@@ -1585,7 +1585,6 @@ SLGP
SLIST
slmult
sln
slnx
slpit
SManifest
SMARTQUOTE
@@ -1711,7 +1710,6 @@ titlebars
TITLEISLINKNAME
TLDP
TLEN
Tlgg
TMAE
TMPF
tmultiple
@@ -1974,7 +1972,6 @@ WRITECONSOLEOUTPUT
WRITECONSOLEOUTPUTSTRING
wrkstr
WRL
wrl
wrp
WRunoff
WSLENV

View File

@@ -17,6 +17,7 @@
"Microsoft.VisualStudio.Component.AppInsights.Tools",
"Microsoft.Net.Component.4.8.TargetingPack",
"Microsoft.VisualStudio.Component.DiagnosticTools",
"Microsoft.NetCore.Component.Runtime.6.0",
"Microsoft.VisualStudio.Component.ClassDesigner",
"Microsoft.VisualStudio.Component.GraphDocument",
"Microsoft.VisualStudio.Component.CodeMap",

View File

@@ -33,6 +33,17 @@
A:\;
E:\;
$(windir)\**;
$(MSBuildBinPath)\**;
$(MSBuildToolsPath32)\**;
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
<!--
Unit tests may write to TEMP, but should not be considered outputs. However, $(Temp) is using the DOS path (C:\Users\CLOUDT~1\AppData\Local\Temp), which
isn't accounted for in these globs. So we're building up to TEMP using $(LOCALAPPDATA) instead.
-->
<MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
$(MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns);
$(LOCALAPPDATA)\Temp\**;
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
<!--
@@ -46,6 +57,15 @@
-->
<MSBuildCacheIdenticalDuplicateOutputPatterns>$(MSBuildCacheIdenticalDuplicateOutputPatterns);obj\*\vcpkg\**</MSBuildCacheIdenticalDuplicateOutputPatterns>
<!--
Ensure the MSBuildCache ignores collecting outputs under vcpkg's build tree, which is a working directory used to build vcpkg packages and not intended to be consumed by anything else in the build.
Note: We cannot use $(VcpkgInstalledDir) directly since it differs between projects, so use a pattern which encompasses all possibilities.
-->
<MSBuildCacheIgnoredOutputPatterns>
$(MSBuildCacheIgnoredOutputPatterns);
$(SolutionDir)\obj\*\vcpkg*\vcpkg\blds\**;
</MSBuildCacheIgnoredOutputPatterns>
<!-- version of MSBuildCache is not part of the cache key -->
<PackagesConfigFile>$(MSBuildThisFileDirectory)\dep\nuget\packages.config</PackagesConfigFile>
<MSBuildCacheIgnoredInputPatterns>$(MSBuildCacheIgnoredInputPatterns);$(PackagesConfigFile)</MSBuildCacheIgnoredInputPatterns>

View File

@@ -4,7 +4,7 @@
<clear />
<!-- Dependencies that we can turn on to force override for testing purposes before uploading. -->
<!--<add key="Static Package Dependencies" value="dep\packages" />-->
<add key="TerminalDependencies" value="https://pkgs.dev.azure.com/shine-oss/terminal/_packaging/TerminalDependencies%40Local/nuget/v3/index.json" />
<add key="TerminalDependencies" value="https://pkgs.dev.azure.com/shine-oss/terminal/_packaging/TerminalDependencies/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />

2339
OpenConsole.sln Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -375,7 +375,7 @@ winget configure .config\configuration.winget
## Building the Code
OpenConsole.slnx may be built from within Visual Studio or from the command-line
OpenConsole.sln may be built from within Visual Studio or from the command-line
using a set of convenience scripts & tools in the **/tools** directory:
### Building in PowerShell

View File

@@ -56,11 +56,11 @@ Dies ist ein Open Source-Projekt, und wir freuen uns über die Teilnahme der Com
<ReleaseNotes>
Version __VERSION_NUMBER__
Eine komplett neue Erweiterungsseite, die anzeigt, was in Ihrem Terminal installiert ist
Die Befehlspalette wird jetzt sowohl in Ihrer Muttersprache als auch auf Englisch angezeigt
Neue VT-Features wie synchronisiertes Rendering, neue Farbschemas, Konfiguration für schnelle Mausaktionen wie Zoomen und mehr
- Wir haben der Benutzeroberfläche durchschnittliche Einstellungen hinzugefügt, die nur einmal in der JSON-Datei vorhanden waren, einschließlich einer neuen Seite zum Anpassen des Layouts Ihres Menüs "Neue Registerkarte"!
- Wir haben die Fensterverwaltung zurückgesetzt, um die Zuverlässigkeit zu verbessern; Melden Sie alle Fehler, die mit dem alias "wt.exe" auftreten.
- Profile zeigen jetzt ein Symbol an, wenn sie ausgeblendet wurden oder auf programme verweisen, die deinstalliert wurden.
Weitere Informationen finden Sie auf unserer GitHub-Releaseseite.
Weitere Details finden Sie auf unserer GitHub-Releasesseite.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,9 +56,9 @@ This is an open source project and we welcome community participation. To partic
<ReleaseNotes _locID="App_ReleaseNotes">
<!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__}{Locked=wt.exe} App Release Note" -->Version __VERSION_NUMBER__
- A whole new Extensions page that shows what has been installed into your Terminal
- Command Palette now shows up in your native language as well as English
- New VT features such as synchronized rendering, new color schemes, configuration for quick mouse actions like zooming, and more
- We've added dozens of settings to the UI that once only existed in the JSON file, including a new page for customizing the layout of your New Tab menu!
- We have rearchitected window management to improve reliability; please file any bugs you encounter with the wt.exe alias
- Profiles now show an icon if they've been hidden or refer to programs which were uninstalled.
Please see our GitHub releases page for additional details.
</ReleaseNotes>

View File

@@ -56,11 +56,11 @@ Este es un proyecto de fuente abierta y animamos a la comunidad a participar. Pa
<ReleaseNotes>
Versión __VERSION_NUMBER__
- Página Extensiones completamente nueva que muestra lo que se ha instalado en tu terminal
- La paleta de comandos ahora se muestra en tu idioma nativo, así como en inglés
- Nuevas características de VT, como la representación sincronizada, nuevos esquemas de color, configuración para acciones rápidas del ratón, como el zoom, y más
- Hemos agregado decenas de configuraciones a la interfaz de usuario que solo existían una vez en el archivo JSON, incluida una página nueva para personalizar el diseño del menú Nueva pestaña.
- Tenemos administración de ventanas rearchitecdas para mejorar la confiabilidad; envíe los errores que encuentre con el alias de wt.exe.
- Ahora, los perfiles muestran un icono si se han ocultado o hacen referencia a programas que se han desinstalado.
Consulta la página de versiones de GitHub para más información.
Consulte nuestra página de versiones de GitHub para obtener más detalles.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -54,13 +54,13 @@ Il sagit dun projet open source et nous vous invitons à participer dans l
</DevStudio>
<ReleaseNotes>
Version __VERSION_NUMBER__
__VERSION_NUMBER__ de version
- Une toute nouvelle page Extensions qui montre ce qui a été installé dans votre terminal
- La palette de commandes saffiche désormais dans votre langue native, ainsi quen anglais
- Nouvelles fonctionnalités VT telles que le rendu synchronisé, de nouveaux schémas de couleurs, la configuration pour des actions rapides de la souris comme le zoom, et plus encore
- Nous avons ajouté des milliers de paramètres à linterface utilisateur qui nexistaient auparavant que dans le fichier JSON, y compris une nouvelle page pour personnaliser la disposition de votre menu Nouvel onglet !
- Nous avons réarchitialiser la gestion des fenêtres pour améliorer la fiabilité ; entrez les bogues rencontrés avec lalias wt.exe
- Les profils affichent désormais une icône sils ont été masqués ou sils font référence à des programmes qui ont été désinstallés.
Veuillez consulter notre page des versions GitHub pour découvrir dautres détails.
Pour plus dinformations, consultez notre page des mises en production GitHub.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -54,13 +54,13 @@ Si tratta di un progetto open source e la partecipazione della community è molt
</DevStudio>
<ReleaseNotes>
Versione __VERSION_NUMBER__
Versione __VERSION_NUMBER__
- Una pagina Estensioni completamente nuova che mostra ciò che è stato installato nel terminale
- Il riquadro comandi ora viene visualizzato nella tua lingua di origine oltre che in inglese
- Nuove funzionalità VT come il rendering sincronizzato, le nuove combinazioni di colori, la configurazione per azioni rapide del mouse come lo zoom e altro ancora
- Sono state aggiunte decine di impostazioni all'interfaccia utente che una volta esisteva solo nel file JSON, inclusa una nuova pagina per personalizzare il layout del menu Nuova scheda.
- È stata riattivata la gestione delle finestre per migliorare l'affidabilità; inserire eventuali bug riscontrati con l'alias wt.exe
- I profili ora mostrano un'icona se sono stati nascosti o fanno riferimento ai programmi che sono stati disinstallati.
Per altri dettagli, vedi la pagina delle release di GitHub.
Per altri dettagli, vedere la pagina delle versioni di GitHub.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,11 +56,11 @@
<ReleaseNotes>
バージョン __VERSION_NUMBER__
- ターミナルに何がインストールされているかを表示する新しい [拡張機能] ページ
- コマンド パレットがネイティブ言語と英語で表示されるようになりました
- 同期レンダリング、新しい配色、ズームなどのクイック マウス操作の構成などの、新しい VT 機能
- [新しいタブ] メニューのレイアウトをカスタマイズするための新しいページを含む、一度だけ JSON ファイルに存在した UI に多数の設定を追加しました。
- 信頼性を向上させるためにウィンドウ管理を再選択しました。wt.exe エイリアスで発生したバグを報告してください
- プロファイルが非表示になっているか、アンインストールされたプログラムを参照している場合にアイコンが表示されるようになりました。
詳細については、GitHub リリース ページをご覧ください。
詳細については、GitHub リリース ページを参照してください。
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,9 +56,9 @@
<ReleaseNotes>
버전 __VERSION_NUMBER__
- 터미널에 설치된 항목을 보여 주는 완전히 새로운 확장 페이지
- 명령 팔레트가 이제 영어뿐만 아니라 모국어로도 표시
- 동기화된 렌더링, 새로운 색 구성표, 확대/축소와 같은 빠른 마우스 동작을 위한 구성 등 새로운 VT 기능이 추가
- 새 탭 메뉴의 레이아웃을 사용자 지정하기 위한 새 페이지를 포함하여 JSON 파일에 한 번만 존재했던 UI에 수천 개의 설정을 추가했습니다.
- 안정성을 개선하기 위해 창 관리를 다시 보관했습니다. wt.exe 별칭에 발생한 버그를 제출하세요.
- 프로필이 숨겨졌거나 제거된 프로그램을 참조하는 경우 이제 프로필에 아이콘이 표시됩니다.
자세한 내용은 GitHub 릴리스 페이지를 참조하세요.
</ReleaseNotes>

View File

@@ -54,13 +54,13 @@ Este é um projeto de código aberto e a participação da comunidade é bem-vin
</DevStudio>
<ReleaseNotes>
Version __VERSION_NUMBER__
Versão __VERSION_NUMBER__
Uma nova página de Extensões que mostra o que foi instalado no seu Terminal
A Paleta de Comandos agora aparece no seu idioma nativo, além do inglês
Novos recursos da VT, como renderização sincronizada, novos esquemas de cores, configuração para ações rápidas do mouse, como zoom, e muito mais
- Adicionamos várias configurações à interface do usuário que só existiam no arquivo JSON, incluindo uma nova página para personalizar o layout do menu Nova Guia!
- Temos o gerenciamento de janelas rearmado para melhorar a confiabilidade; registre todos os bugs encontrados com o wt.exe alias
- Os perfis agora mostram um ícone se eles foram ocultos ou se referem a programas que foram desinstalados.
Confira nossa página de lançamentos no GitHub para obter mais detalhes.
Consulte nossa página de versões do GitHub para obter detalhes adicionais.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,11 +56,11 @@
<ReleaseNotes>
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
- Ą ωћόĺé ņέш ∑×τзńşĩōиŝ ρâģε τђат šнòωş ωħąт нǻś ъеēñ įηšтǻľĺéδ ĭʼnтο ўбμŗ Ţзřmĭňāŀ !!! !!! !!! !!! !!! !!! !!! !!!
- €όммаήδ Рдĺēтţĕ пŏẅ şĥŏшś üρ ϊñ ỳоũѓ йαťïνє ļäŋģµаġέ άś ŵєŀľ åś Σиĝℓĭŝђ !!! !!! !!! !!! !!! !!! !!!
- ∏еẅ VΤ ƒэåŧύґέŝ şűçн ăŝ ѕỳňсĥŗǿйìźėð гēŋďзříⁿğ, ηĕш ćôĺõг şĉћěмєѕ, çóńƒіĝџŗáτїöπ ƒοг qũī¢ķ möűšë ąćŧϊόņŝ ľîķє žøōmίйğ, ǻⁿđ мόřε !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ẁē'νё àðđέď đöžзńş öƒ śėŧťїńģš тб тнè ÛĮ ťħąт ŏņ¢з όⁿℓγ έжіѕŧéð іή тђε ЈŠΩŃ ƒїℓė, ĭňĉŀџđіņģ å ňэẅ φâģé ƒøя ςŭśŧŏmïżϊñģ тħέ ĺαŷöυτ öƒ убµř Йέẁ Ţàъ мęήµ! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ẁè ĥаνė řэąřčħΐŧέсτέð щįлďοш мǻňαĝēмêиť ťô ϊmрябνé ŗĕŀĩāвîĺïтγ; ρŀěăѕе ƒíŀё αⁿу вûġš ÿøú εʼnćōùлťēѓ ẃïτħ ŧћё wt.exe ǻļĭâś !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Рґøƒíŀêŝ ňöẁ šћθẁ ãй ĭčöñ ίƒ ŧħэŷ'νę ъеєл ђіðδэñ őř řєƒěґ ŧσ φяοġгаmŝ ẅђíçĥ ẁ℮гέ џňϊйşťàľĺèð. !!! !!! !!! !!! !!! !!! !!! !!! !!! !
Ρĺęąŝэ ѕєě õμя ĞĭтΗύв řєĺэдšέŝ рάġě ƒοґ àďđϊтїõлаℓ ðêţǻїłş. !!! !!! !!! !!! !!! !!!
Рļèāŝє ŝèĕ θџŗ ĢίťĤцъ řέĺэªşэš ρąĝę ƒόř áďđїτϊōπαľ đэŧдįļŝ. !!! !!! !!! !!! !!! !!!
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,11 +56,11 @@
<ReleaseNotes>
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
- Ą ωћόĺé ņέш ∑×τзńşĩōиŝ ρâģε τђат šнòωş ωħąт нǻś ъеēñ įηšтǻľĺéδ ĭʼnтο ўбμŗ Ţзřmĭňāŀ !!! !!! !!! !!! !!! !!! !!! !!!
- €όммаήδ Рдĺēтţĕ пŏẅ şĥŏшś üρ ϊñ ỳоũѓ йαťïνє ļäŋģµаġέ άś ŵєŀľ åś Σиĝℓĭŝђ !!! !!! !!! !!! !!! !!! !!!
- ∏еẅ VΤ ƒэåŧύґέŝ şűçн ăŝ ѕỳňсĥŗǿйìźėð гēŋďзříⁿğ, ηĕш ćôĺõг şĉћěмєѕ, çóńƒіĝџŗáτїöπ ƒοг qũī¢ķ möűšë ąćŧϊόņŝ ľîķє žøōmίйğ, ǻⁿđ мόřε !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ẁē'νё àðđέď đöžзńş öƒ śėŧťїńģš тб тнè ÛĮ ťħąт ŏņ¢з όⁿℓγ έжіѕŧéð іή тђε ЈŠΩŃ ƒїℓė, ĭňĉŀџđіņģ å ňэẅ φâģé ƒøя ςŭśŧŏmïżϊñģ тħέ ĺαŷöυτ öƒ убµř Йέẁ Ţàъ мęήµ! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ẁè ĥаνė řэąřčħΐŧέсτέð щįлďοш мǻňαĝēмêиť ťô ϊmрябνé ŗĕŀĩāвîĺïтγ; ρŀěăѕе ƒíŀё αⁿу вûġš ÿøú εʼnćōùлťēѓ ẃïτħ ŧћё wt.exe ǻļĭâś !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Рґøƒíŀêŝ ňöẁ šћθẁ ãй ĭčöñ ίƒ ŧħэŷ'νę ъеєл ђіðδэñ őř řєƒěґ ŧσ φяοġгаmŝ ẅђíçĥ ẁ℮гέ џňϊйşťàľĺèð. !!! !!! !!! !!! !!! !!! !!! !!! !!! !
Ρĺęąŝэ ѕєě õμя ĞĭтΗύв řєĺэдšέŝ рάġě ƒοґ àďđϊтїõлаℓ ðêţǻїłş. !!! !!! !!! !!! !!! !!!
Рļèāŝє ŝèĕ θџŗ ĢίťĤцъ řέĺэªşэš ρąĝę ƒόř áďđїτϊōπαľ đэŧдįļŝ. !!! !!! !!! !!! !!! !!!
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,11 +56,11 @@
<ReleaseNotes>
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
- Ą ωћόĺé ņέш ∑×τзńşĩōиŝ ρâģε τђат šнòωş ωħąт нǻś ъеēñ įηšтǻľĺéδ ĭʼnтο ўбμŗ Ţзřmĭňāŀ !!! !!! !!! !!! !!! !!! !!! !!!
- €όммаήδ Рдĺēтţĕ пŏẅ şĥŏшś üρ ϊñ ỳоũѓ йαťïνє ļäŋģµаġέ άś ŵєŀľ åś Σиĝℓĭŝђ !!! !!! !!! !!! !!! !!! !!!
- ∏еẅ VΤ ƒэåŧύґέŝ şűçн ăŝ ѕỳňсĥŗǿйìźėð гēŋďзříⁿğ, ηĕш ćôĺõг şĉћěмєѕ, çóńƒіĝџŗáτїöπ ƒοг qũī¢ķ möűšë ąćŧϊόņŝ ľîķє žøōmίйğ, ǻⁿđ мόřε !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ẁē'νё àðđέď đöžзńş öƒ śėŧťїńģš тб тнè ÛĮ ťħąт ŏņ¢з όⁿℓγ έжіѕŧéð іή тђε ЈŠΩŃ ƒїℓė, ĭňĉŀџđіņģ å ňэẅ φâģé ƒøя ςŭśŧŏmïżϊñģ тħέ ĺαŷöυτ öƒ убµř Йέẁ Ţàъ мęήµ! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ẁè ĥаνė řэąřčħΐŧέсτέð щįлďοш мǻňαĝēмêиť ťô ϊmрябνé ŗĕŀĩāвîĺïтγ; ρŀěăѕе ƒíŀё αⁿу вûġš ÿøú εʼnćōùлťēѓ ẃïτħ ŧћё wt.exe ǻļĭâś !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Рґøƒíŀêŝ ňöẁ šћθẁ ãй ĭčöñ ίƒ ŧħэŷ'νę ъеєл ђіðδэñ őř řєƒěґ ŧσ φяοġгаmŝ ẅђíçĥ ẁ℮гέ џňϊйşťàľĺèð. !!! !!! !!! !!! !!! !!! !!! !!! !!! !
Ρĺęąŝэ ѕєě õμя ĞĭтΗύв řєĺэдšέŝ рάġě ƒοґ àďđϊтїõлаℓ ðêţǻїłş. !!! !!! !!! !!! !!! !!!
Рļèāŝє ŝèĕ θџŗ ĢίťĤцъ řέĺэªşэš ρąĝę ƒόř áďđїτϊōπαľ đэŧдįļŝ. !!! !!! !!! !!! !!! !!!
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,9 +56,9 @@
<ReleaseNotes>
Версия __VERSION_NUMBER__
Новая страница расширений, на которой отображается информация о том, что было установлено в вашем терминале
Палитра команд теперь доступна на вашем языке, а также на английском
Новые функции VT, например синхронизированная отрисовка, новые цветовые схемы, настройка быстрых действий мыши, таких как масштабирование, и т. д.
- Мы добавили в пользовательский интерфейс десятки параметров, которые существовали только в JSON-файле, включая новую страницу для настройки макета меню "Новая вкладка".
- Для повышения надежности мы переупоряхлили управление окнами; создайте все ошибки, обнаруженные с wt.exe псевдонимом
- Профили теперь показывают значок, если они скрыты или ссылаются на программы, которые были удалены.
Дополнительные сведения см. на странице выпусков GitHub.
</ReleaseNotes>

View File

@@ -54,13 +54,13 @@
</DevStudio>
<ReleaseNotes>
Version __VERSION_NUMBER__
版本 __VERSION_NUMBER__
- 一个全新的“扩展”页,显示已安装到终端的内容
- 命令面板现在以你的母语和英语显示
- 新的 VT 功能,例如同步渲染、新配色方案、快速鼠标操作(如缩放)的配置等
- 我们向用户界面添加了许多设置,这些设置仅存在于 JSON 文件中,包括用于自定义“新建标签页”菜单布局的新页面!
- 我们已重新检测窗口管理以提高可靠性;请将遇到的任何 bug 归档为 wt.exe 别名
- 如果配置文件已隐藏或引用已卸载的程序,则它们现在将显示一个图标。
有关其他详细信息,请参阅我们的 GitHub 发布页面。
有关其他详细信息,请参阅 GitHub 发布页面。
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -54,13 +54,13 @@
</DevStudio>
<ReleaseNotes>
Version __VERSION_NUMBER__
版本 __VERSION_NUMBER__
- 全新的延伸模組頁面會顯示已安裝在您終端機中的內容
- 命令選擇區現在以您的母語和英文顯示
- 新的 VT 功能,例如同步轉譯、新的色彩配置、快速滑鼠動作 (例如縮放) 設定等等
- 我們已新增數十個只存在於 JSON 檔案中的設定到 UI包括自定義 [新索引標籤] 功能表版面配置的新頁面!
- 我們已重新設定視窗管理,以改善可靠性;請提出您在 wt.exe 別名遇到的任何錯誤
- 設定文件現在會在隱藏或參照已卸載的程式時顯示圖示。
如需更多詳細資料,請參閱我們的 GitHub 發行版本頁面。
如需詳細數據,請參閱我們的 GitHub 版本頁面。
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -20,7 +20,6 @@
"DisableAutoPackageNameFormatting": false
},
"appSubmission": {
"appId": "9N8G5RFZ9XK3",
"productId": "00014050269303149694",
"targetPublishMode": "NotSet",
"targetPublishDate": null,

View File

@@ -56,9 +56,12 @@ Dies ist ein Open Source-Projekt, und wir freuen uns über die Teilnahme an der
<ReleaseNotes>
Version __VERSION_NUMBER__
Wir haben der Benutzeroberfläche Dutzende von Einstellungen hinzugefügt, die nur einmal in der JSON-Datei vorhanden waren, einschließlich einer neuen Seite zum Anpassen des Layouts Ihres Menüs „Neue Registerkarte“!
Wir haben die Fensterverwaltung umgestaltet, um die Zuverlässigkeit zu verbessern. Melden Sie alle Fehler, die beim alias „wt.exe“ auftreten
Profile zeigen jetzt ein Symbol an, wenn sie ausgeblendet wurden oder auf Programme verweisen, die deinstalliert wurden.
Wir haben umgeschrieben, wie Konsolenanwendungen im Terminal gehostet werden! Melden Sie alle auftretenden Fehler.
Terminal unterstützt jetzt Sixels!
Sie können jetzt einen angedockten Bereich öffnen, der Ausschnitte von Befehlen enthält, die Sie gespeichert haben, um sie später zu verwenden.
Für Benutzer der Eingabeaufforderung der neuesten Version von Windows 11 wird möglicherweise ein QuickInfo-Symbol angezeigt, das installierbare Software von WinGet vorschlägt.
Ausgewählter Text wird jetzt viel sichtbarer (und anpassbarer!).
- Eine Reihe von Zuverlässigkeitsfehlern, Benutzerfreundlichkeitsproblemen und Ärgernissen wurden behoben.
Weitere Informationen finden Sie auf unserer GitHub-Releaseseite.
</ReleaseNotes>

View File

@@ -54,11 +54,14 @@ This is an open source project and we welcome community participation. To partic
<!-- _locComment_text="{MaxLength=255} App DevStudio" -->
</DevStudio>
<ReleaseNotes _locID="App_ReleaseNotes">
<!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__}{Locked=wt.exe} App Release Note" -->Version __VERSION_NUMBER__
<!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__} App Release Note" -->Version __VERSION_NUMBER__
- We've added dozens of settings to the UI that once only existed in the JSON file, including a new page for customizing the layout of your New Tab menu!
- We have rearchitected window management to improve reliability; please file any bugs you encounter with the wt.exe alias
- Profiles now show an icon if they've been hidden or refer to programs which were uninstalled.
- We've rewritten how console applications are hosted inside Terminal! Please report any bugs you encounter.
- Terminal now supports Sixels!
- You can now open a docked panel containing snippets of commands you have saved to use later
- Command Prompt users on the latest Windows 11 release may see a "quick tip" icon that suggests installable software from WinGet
- Selected text will now be much more visible (and customizable!)
- A number of reliabilty bugs, convenience issues and annoyances have been fixed.
Please see our GitHub releases page for additional details.
</ReleaseNotes>

View File

@@ -56,9 +56,12 @@ Este es un proyecto de fuente abierta y animamos a la comunidad a participar. Pa
<ReleaseNotes>
Versión __VERSION_NUMBER__
- Hemos añadido decenas de configuraciones a la interfaz de usuario que antes solo existían en el archivo JSON, incluida una nueva página para personalizar el diseño del menú Nueva pestaña.
- Hemos reestructurado la gestión de ventanas para mejorar la fiabilidad; informe de cualquier error que encuentre con el alias wt.exe
- Ahora, los perfiles muestran un icono si han sido ocultados o hacen referencia a programas que han sido desinstalados.
- Hemos reescrito cómo se hospedan las aplicaciones de consola en Terminal. Informe de los errores que encuentre.
- Terminal ahora admite síxeles.
- Ahora puede abrir un panel acoplado que contenga fragmentos de comandos que haya guardado para usarlos más adelante
- Los usuarios del símbolo del sistema de la versión más reciente de Windows 11 pueden ver un icono de "sugerencia rápida" que sugiere software instalable de WinGet
- El texto seleccionado ahora será mucho más visible (y personalizable)
- Se han corregido varios errores de fiabilidad, problemas de comodidad y molestias.
Consulte la página de versiones de GitHub para más información.
</ReleaseNotes>

View File

@@ -56,9 +56,12 @@ Il sagit dun projet open source et nous encourageons la participation à l
<ReleaseNotes>
Version __VERSION_NUMBER__
- Nous avons ajouté des dizaines de paramètres à linterface utilisateur qui nexistaient auparavant que dans le fichier JSON, y compris une nouvelle page pour personnaliser la disposition de votre menu Nouvel onglet.
- Nous avons fait une refonte de la gestion des fenêtres pour améliorer la fiabilité. Veuillez signaler les bogues que vous rencontrez avec lalias wt.exe.
- Les profils affichent désormais une icône sils ont été masqués ou sils font référence à des programmes qui ont été désinstallés.
Nous avons réécrit la manière dont les applications de console sont hébergées dans Terminal ! Veuillez signaler tout bogue que vous rencontrez.
Terminal prend désormais en charge Sixels !
Vous pouvez maintenant ouvrir un panneau ancré contenant des extraits de commandes que vous avez enregistrées pour les utiliser ultérieurement
Les utilisateurs de linvite de commande sur la dernière version de Windows 11 peuvent voir une icône « astuce rapide » qui suggère un logiciel installable à partir de WinGet
Le texte sélectionné sera désormais beaucoup plus visible (et personnalisable !)
Un certain nombre de bogues de fiabilité, de problèmes de commodité et de désagréments ont été corrigés.
Veuillez consulter notre page des versions GitHub pour découvrir dautres détails.
</ReleaseNotes>

View File

@@ -56,9 +56,12 @@ Si tratta di un progetto open source e la partecipazione della community è molt
<ReleaseNotes>
Versione __VERSION_NUMBER__
- Abbiamo aggiunto decine di impostazioni all'interfaccia utente che in precedenza esistevano solo nel file JSON, inclusa una nuova pagina per personalizzare il layout del menu Nuova scheda.
- Abbiamo riprogettato la gestione delle finestre per migliorarne l'affidabilità; segnala eventuali bug riscontrati con l'alias wt.exe
- I profili ora mostrano un'icona se sono stati nascosti o se fanno riferimento a programmi disinstallati.
- Abbiamo cambiato il modo in cui le applicazioni della console vengono ospitate allinterno di Terminale. Segnala eventuali bug riscontrati.
- Ora Terminale supporta i Sixel.
- Puoi aprire un pannello ancorato contenente frammenti di comandi salvati per usarli in seguito
- Gli utenti che usano il prompt dei comandi nella versione più recente di Windows 11 potrebbero visualizzare unicona di “suggerimento rapido” che consiglia il software installabile da WinGet
- Il testo selezionato sarà ora molto più visibile, oltre che personalizzabile.
- Sono stati risolti diversi bug di affidabilità e problemi di ordine pratico.
Per altri dettagli, vedi la pagina delle release di GitHub.
</ReleaseNotes>

View File

@@ -56,9 +56,12 @@
<ReleaseNotes>
バージョン __VERSION_NUMBER__
- 新しいタブ メニューのレイアウトをカスタマイズするための新しいページなど、以前は JSON ファイルにしかなかった設定が UI に多数追加されました
- 信頼性を向上させるために、ウィンドウ管理を再設計しました。wt.exe エイリアスで発生したバグを報告してください
- プロファイルが非表示になっている場合や、アンインストールされたプログラムを参照している場合に、アイコンが表示されるようになりました
- ターミナル内でのコンソール アプリケーションのホスト方法を書き換えました。発生したバグを報告してください
- ターミナルで Sixels がサポートされるようになりました。
- 後で使用するために保存したコマンドのスニペットを含むドッキング パネルを開けるようになりました
- 最新の Windows 11 リリースのコマンド プロンプト ユーザーには、WinGet からインストール可能なソフトウェアを提案する "クイック ヒント" アイコンが表示される場合があります
- 選択したテキストが大幅に見やすくなりました (カスタマイズも可能です)
- 信頼性に関するバグ、利便性の問題、不快な問題の多くが修正されました。
詳細については、GitHub リリース ページをご覧ください。
</ReleaseNotes>

View File

@@ -56,9 +56,12 @@
<ReleaseNotes>
버전 __VERSION_NUMBER__
- 새 탭 메뉴의 레이아웃을 사용자 지정하기 위한 새 페이지를 포함하여 JSON 파일에만 존재했던 수십 개의 설정을 UI에 추가
- 안정성을 개선하기 위해 창 관리 구조를 재구성했습니다. wt.exe 별칭과 관련하여 발생한 버그 신고
- 프로필이 숨겨졌거나 제거된 프로그램을 참조하는 경우 이제 프로필에 아이콘이 표시됩니다.
- 콘솔 애플리케이션이 터미널 내에서 호스팅되는 방법을 다시 작성했습니다. 버그가 발생하면 보고해 주세요.
- 터미널에서 이제 Sixels를 지원합니다.
- 이제 나중에 사용하기 위해 저장한 명령 조각이 포함된 도킹된 패널을 열 수 있습니다.
- 최신 Windows 11 릴리스의 명령 프롬프트 사용자는 WinGet에서 설치 가능한 소프트웨어를 추천하는 "간단한 팁" 아이콘을 볼 수 있습니다.
- 이제 선택한 텍스트가 훨씬 더 잘 보입니다(사용자 지정 가능).
- 여러 안정성 버그, 편의성 문제, 불편 사항이 수정되었습니다.
자세한 내용은 GitHub 릴리스 페이지를 참조하세요.
</ReleaseNotes>

View File

@@ -54,11 +54,14 @@ Este é um projeto de código aberto e a participação da comunidade é bem-vin
</DevStudio>
<ReleaseNotes>
Version __VERSION_NUMBER__
Versão __VERSION_NUMBER__
Adicionamos várias configurações à interface do usuário que antes só existiam no arquivo JSON, incluindo uma nova página para personalizar o layout do seu menu Nova Guia!
Reestruturamos o gerenciamento de janelas para melhorar a confiabilidade; registre os bugs que você encontrar com o alias wt.exe
Os perfis agora exibem um ícone se estiverem ocultos ou se referirem a programas que foram desinstalados.
Reescrevemos a forma como os aplicativos de console são hospedados no Terminal! Relate os bugs encontrados.
O terminal agora oferece suporte ao Sixels!
Agora você pode abrir um painel acoplado contendo snippets de comandos que você salvou para usar mais tarde
Os usuários do Prompt de Comando na versão mais recente do Windows 11 podem ver um ícone de "dica rápida", que sugere softwares instaláveis a partir do WinGet
O texto selecionado agora ficará muito mais visível (e personalizável!)
Vários bugs de confiabilidade, problemas de conveniência e incômodos foram resolvidos.
Confira nossa página de lançamentos no GitHub para obter mais detalhes.
</ReleaseNotes>

View File

@@ -56,11 +56,14 @@
<ReleaseNotes>
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
- Ẁē'νё àðđέď đöžзńş öƒ śėŧťїńģš тб тнè ÛĮ ťħąт ŏņ¢з όⁿℓγ έжіѕŧéð іή тђε ЈŠΩŃ ƒїℓė, ĭňĉŀџđіņģ å ňэẅ φâģé ƒøя ςŭśŧŏmïżϊñģ тħέ ĺαŷöυτ öƒ убµř Йέẁ Ţàъ мęήµ! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ẁè ĥаνė řэąřčħΐŧέсτέð щįлďοш мǻňαĝēмêиť ťô ϊmрябνé ŗĕŀĩāвîĺïтγ; ρŀěăѕе ƒíŀё αⁿу вûġš ÿøú εʼnćōùлťēѓ ẃïτħ ŧћё wt.exe ǻļĭâś !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Рґøƒíŀêŝ ňöẁ šћθẁ ãй ĭčöñ ίƒ ŧħэŷ'νę ъеєл ђіðδэñ őř řєƒěґ ŧσ φяοġгаmŝ ẅђíçĥ ẁ℮гέ џňϊйşťàľĺèð. !!! !!! !!! !!! !!! !!! !!! !!! !!! !
- Ẁē'νё ŕéẁѓĭτťёñ ћοώ ĉòπşõℓε άррℓіċªťįõпѕ αяе ĥθѕťэđ įŋšιďé Ţєямїńąℓ! Рļéаšė яёροřτ αņу ьϋģš ýõμ éпćŏџήţęя. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!
- Ţëямΐʼnαļ ńóẃ ŝüррöятš Śїхέłś! !!! !!! !!!
- ¥оų ĉåи ńòŵ θρėñ д đбčĸэď ράńέļ ċőлŧăīņϊňģ śⁿіφφëťś оƒ ςōмmàⁿďş ŷŏũ ĥªν℮ şåνěđ τσ üśε łαťэŗ !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ćοмmäлđ Рřōmφť üş℮ŗѕ öη τће ļāťëšτ Щīйđôώѕ 11 řёℓеаѕĕ måў ŝэε ά "qůïςκ ŧĭр" ιсôñ τĥдт šűğģєѕŧѕ ίńśŧăłłавļз šôƒţẁαгέ ƒґόm ЩĩйĞéţ !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Śєļèċťєď ţĕжт ωϊŀļ йǿẃ ьέ mџ¢н мǿѓε νĭŝϊъļė (άŋđ сŭŝтŏмΐżдьļē!) !!! !!! !!! !!! !!! !!! !
- Ä ņϋmъŗ ŏƒ ѓēŀїаъïļŧÿ ьüĝś, ςôⁿνėηĭ℮иć℮ îѕšůëş ăπð âлňбγдňçėŝ ћªνε ъēёп ƒΐ×еð. !!! !!! !!! !!! !!! !!! !!! !!!
Рļèāŝє ŝèĕ θџŗ ĢίťĤцъ řέĺэªşэš ρąĝę ƒόř áďđїτϊōπαľ đэŧдįļŝ. !!! !!! !!! !!! !!! !!!
Ρĺёàŝ℮ ŝез ǿúг ĢīťНŭъ řěłεαśèŝ φāğ℮ ƒóѓ дďδітĭøиąℓ ð℮тªїľŝ. !!! !!! !!! !!! !!! !!!
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,11 +56,14 @@
<ReleaseNotes>
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
- Ẁē'νё àðđέď đöžзńş öƒ śėŧťїńģš тб тнè ÛĮ ťħąт ŏņ¢з όⁿℓγ έжіѕŧéð іή тђε ЈŠΩŃ ƒїℓė, ĭňĉŀџđіņģ å ňэẅ φâģé ƒøя ςŭśŧŏmïżϊñģ тħέ ĺαŷöυτ öƒ убµř Йέẁ Ţàъ мęήµ! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ẁè ĥаνė řэąřčħΐŧέсτέð щįлďοш мǻňαĝēмêиť ťô ϊmрябνé ŗĕŀĩāвîĺïтγ; ρŀěăѕе ƒíŀё αⁿу вûġš ÿøú εʼnćōùлťēѓ ẃïτħ ŧћё wt.exe ǻļĭâś !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Рґøƒíŀêŝ ňöẁ šћθẁ ãй ĭčöñ ίƒ ŧħэŷ'νę ъеєл ђіðδэñ őř řєƒěґ ŧσ φяοġгаmŝ ẅђíçĥ ẁ℮гέ џňϊйşťàľĺèð. !!! !!! !!! !!! !!! !!! !!! !!! !!! !
- Ẁē'νё ŕéẁѓĭτťёñ ћοώ ĉòπşõℓε άррℓіċªťįõпѕ αяе ĥθѕťэđ įŋšιďé Ţєямїńąℓ! Рļéаšė яёροřτ αņу ьϋģš ýõμ éпćŏџήţęя. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!
- Ţëямΐʼnαļ ńóẃ ŝüррöятš Śїхέłś! !!! !!! !!!
- ¥оų ĉåи ńòŵ θρėñ д đбčĸэď ράńέļ ċőлŧăīņϊňģ śⁿіφφëťś оƒ ςōмmàⁿďş ŷŏũ ĥªν℮ şåνěđ τσ üśε łαťэŗ !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ćοмmäлđ Рřōmφť üş℮ŗѕ öη τће ļāťëšτ Щīйđôώѕ 11 řёℓеаѕĕ måў ŝэε ά "qůïςκ ŧĭр" ιсôñ τĥдт šűğģєѕŧѕ ίńśŧăłłавļз šôƒţẁαгέ ƒґόm ЩĩйĞéţ !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Śєļèċťєď ţĕжт ωϊŀļ йǿẃ ьέ mџ¢н мǿѓε νĭŝϊъļė (άŋđ сŭŝтŏмΐżдьļē!) !!! !!! !!! !!! !!! !!! !
- Ä ņϋmъŗ ŏƒ ѓēŀїаъïļŧÿ ьüĝś, ςôⁿνėηĭ℮иć℮ îѕšůëş ăπð âлňбγдňçėŝ ћªνε ъēёп ƒΐ×еð. !!! !!! !!! !!! !!! !!! !!! !!!
Рļèāŝє ŝèĕ θџŗ ĢίťĤцъ řέĺэªşэš ρąĝę ƒόř áďđїτϊōπαľ đэŧдįļŝ. !!! !!! !!! !!! !!! !!!
Ρĺёàŝ℮ ŝез ǿúг ĢīťНŭъ řěłεαśèŝ φāğ℮ ƒóѓ дďδітĭøиąℓ ð℮тªїľŝ. !!! !!! !!! !!! !!! !!!
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,11 +56,14 @@
<ReleaseNotes>
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
- Ẁē'νё àðđέď đöžзńş öƒ śėŧťїńģš тб тнè ÛĮ ťħąт ŏņ¢з όⁿℓγ έжіѕŧéð іή тђε ЈŠΩŃ ƒїℓė, ĭňĉŀџđіņģ å ňэẅ φâģé ƒøя ςŭśŧŏmïżϊñģ тħέ ĺαŷöυτ öƒ убµř Йέẁ Ţàъ мęήµ! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ẁè ĥаνė řэąřčħΐŧέсτέð щįлďοш мǻňαĝēмêиť ťô ϊmрябνé ŗĕŀĩāвîĺïтγ; ρŀěăѕе ƒíŀё αⁿу вûġš ÿøú εʼnćōùлťēѓ ẃïτħ ŧћё wt.exe ǻļĭâś !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Рґøƒíŀêŝ ňöẁ šћθẁ ãй ĭčöñ ίƒ ŧħэŷ'νę ъеєл ђіðδэñ őř řєƒěґ ŧσ φяοġгаmŝ ẅђíçĥ ẁ℮гέ џňϊйşťàľĺèð. !!! !!! !!! !!! !!! !!! !!! !!! !!! !
- Ẁē'νё ŕéẁѓĭτťёñ ћοώ ĉòπşõℓε άррℓіċªťįõпѕ αяе ĥθѕťэđ įŋšιďé Ţєямїńąℓ! Рļéаšė яёροřτ αņу ьϋģš ýõμ éпćŏџήţęя. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!
- Ţëямΐʼnαļ ńóẃ ŝüррöятš Śїхέłś! !!! !!! !!!
- ¥оų ĉåи ńòŵ θρėñ д đбčĸэď ράńέļ ċőлŧăīņϊňģ śⁿіφφëťś оƒ ςōмmàⁿďş ŷŏũ ĥªν℮ şåνěđ τσ üśε łαťэŗ !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ćοмmäлđ Рřōmφť üş℮ŗѕ öη τће ļāťëšτ Щīйđôώѕ 11 řёℓеаѕĕ måў ŝэε ά "qůïςκ ŧĭр" ιсôñ τĥдт šűğģєѕŧѕ ίńśŧăłłавļз šôƒţẁαгέ ƒґόm ЩĩйĞéţ !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Śєļèċťєď ţĕжт ωϊŀļ йǿẃ ьέ mџ¢н мǿѓε νĭŝϊъļė (άŋđ сŭŝтŏмΐżдьļē!) !!! !!! !!! !!! !!! !!! !
- Ä ņϋmъŗ ŏƒ ѓēŀїаъïļŧÿ ьüĝś, ςôⁿνėηĭ℮иć℮ îѕšůëş ăπð âлňбγдňçėŝ ћªνε ъēёп ƒΐ×еð. !!! !!! !!! !!! !!! !!! !!! !!!
Рļèāŝє ŝèĕ θџŗ ĢίťĤцъ řέĺэªşэš ρąĝę ƒόř áďđїτϊōπαľ đэŧдįļŝ. !!! !!! !!! !!! !!! !!!
Ρĺёàŝ℮ ŝез ǿúг ĢīťНŭъ řěłεαśèŝ φāğ℮ ƒóѓ дďδітĭøиąℓ ð℮тªїľŝ. !!! !!! !!! !!! !!! !!!
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,9 +56,12 @@
<ReleaseNotes>
Версия __VERSION_NUMBER__
Мы добавили в пользовательский интерфейс десятки параметров, которые ранее существовали только в JSON-файле, включая новую страницу для настройки макета меню новой вкладки.
Мы переработали управление окнами для повышения надежности. Сообщайте о любых ошибках, которые вы обнаружите с псевдонимом wt.exe
Профили теперь отображают значок, если они были скрыты или ссылаются на программы, которые были удалены.
Мы переписали, как консольные приложения размещаются внутри Терминала! Сообщайте о любых ошибках, с которыми вы столкнулись.
Терминал теперь поддерживает форматы Sixel!
Теперь вы можете открыть закрепленную панель, содержащую фрагменты команд, которые вы сохранили для использования в дальнейшем
Пользователи командной строки в новейшем выпуске Windows 11 могут увидеть значок "краткой подсказки", который предлагает устанавливаемые программы из WinGet
Выделенный текст теперь станет более видимым (и настраиваемым!)
Исправлено несколько ошибок надежности, проблем с удобством, а также устранены раздражающие моменты.
Дополнительные сведения см. на странице выпусков GitHub.
</ReleaseNotes>

View File

@@ -56,9 +56,12 @@
<ReleaseNotes>
Version __VERSION_NUMBER__
- 我们向用户界面添加了许多之前仅存在于 JSON 文件中的设置,包括用于自定义“新建标签页”菜单布局的新页面!
- 我们已重新架构窗口管理以提高可靠性; 请使用 wt.exe 别名提交您遇到的任何错误
- 配置文件如果已被隐藏或引用了已卸载的程序,现在会显示一个图标。
- 我们已改变主机应用程序在终端内的托管方式!请报告遇到的任何 bug。
- 终端现在支持 Sixels!
- 现在可以打开一个停靠面板,其中包含已保存供以后使用的命令片段
- 最新 Windows 11 版本上的命令提示用户可能会看到“快速提示”图标,该图标建议从 WinGet 安装软件
- 所选文本现在将具有更高的可见性(和可自定义性!)
- 修复了许多可靠性 bug、便利性问题和令人烦恼的问题。
有关其他详细信息,请参阅我们的 GitHub 发布页面。
</ReleaseNotes>

View File

@@ -54,13 +54,16 @@
</DevStudio>
<ReleaseNotes>
Version __VERSION_NUMBER__
版本 __VERSION_NUMBER__
- 我們已在使用者介面中新增數十個曾經僅存在於 JSON 檔案中的設定,包括一個可自訂新索引標籤選單版面配置的新頁面!
- 我們已重新架構視窗管理以提升可靠性; 如果您在使用 wt.exe 別名時遇到任何錯誤,請提交錯誤回報
- 如果設定檔已隱藏或參照已解除安裝的程式,現在會顯示圖示。
- 我們已重寫主機應用程式在終端機內託管的方式!請報告您遇到的錯誤。
- 終端機現在支援 Sixels!
- 現在,您可以開啟包含已儲存命令程式碼片段的固定面板,以供稍後使用
- 最新 Windows 11 版本中的 [命令提示] 使用者可能會看到「快速提示」圖示,建議可自 WinGet 安裝的軟體
- 選取的文字現在會更明顯 (且可自訂!)
- 已修正一些可靠性錯誤、便利性問題和令人困擾的問題。
如需更多詳細資,請參閱我們的 GitHub 發行版本頁面。
如需更多詳細資,請參閱我們的 GitHub 發行頁面。
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -20,7 +20,6 @@
"DisableAutoPackageNameFormatting": false
},
"appSubmission": {
"appId": "9N0DX20HK701",
"productId": "00013926773940052066",
"targetPublishMode": "NotSet",
"targetPublishDate": null,

View File

@@ -2,7 +2,7 @@
{
"MatchedPath": [
"WpfTerminalControl/net472/Microsoft.Terminal.Wpf.dll",
"WpfTerminalControl/net8.0-windows/Microsoft.Terminal.Wpf.dll"
"WpfTerminalControl/net6.0-windows/Microsoft.Terminal.Wpf.dll"
],
"SigningInfo": {
"Operations": [

View File

@@ -14,21 +14,21 @@
<Package
Name="Microsoft.UI.Xaml.2.8"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
Version="8.2306.22001.0"
Version="8.2305.5001.0"
ProcessorArchitecture="x64"
Uri="https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.5/Microsoft.UI.Xaml.2.8.x64.appx" />
Uri="https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.4/Microsoft.UI.Xaml.2.8.x64.appx" />
<Package
Name="Microsoft.UI.Xaml.2.8"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
Version="8.2306.22001.0"
Version="8.2305.5001.0"
ProcessorArchitecture="x86"
Uri="https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.5/Microsoft.UI.Xaml.2.8.x86.appx" />
Uri="https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.4/Microsoft.UI.Xaml.2.8.x86.appx" />
<Package
Name="Microsoft.UI.Xaml.2.8"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
Version="8.2306.22001.0"
Version="8.2305.5001.0"
ProcessorArchitecture="arm64"
Uri="https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.5/Microsoft.UI.Xaml.2.8.arm64.appx" />
Uri="https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.4/Microsoft.UI.Xaml.2.8.arm64.appx" />
</Dependencies>
<UpdateSettings>

View File

@@ -84,7 +84,7 @@ stages:
buildEverything: true
keepAllExpensiveBuildOutputs: false
${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}:
enableCaching: true
enableMsBuildCaching: true
- ${{ if eq(parameters.runTests, true) }}:
- stage: Test_${{ platform }}

View File

@@ -25,6 +25,8 @@ pr:
variables:
- name: runCodesignValidationInjectionBG
value: false
- name: EnablePipelineCache
value: true
# 0.0.yyMM.dd##
# 0.0.1904.0900
@@ -45,6 +47,10 @@ parameters:
- x64
- x86
- arm64
- name: enableMsBuildCaching
type: boolean
displayName: "Enable MSBuild Caching"
default: true
stages:
- ${{ if eq(parameters.auditMode, true) }}:
@@ -87,6 +93,8 @@ stages:
buildConfigurations: [Release]
buildEverything: true
keepAllExpensiveBuildOutputs: false
${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}:
enableMsBuildCaching: ${{ parameters.enableMsBuildCaching }}
- ${{ if eq(parameters.runTests, true) }}:
- stage: Test_${{ platform }}

View File

@@ -75,9 +75,9 @@ jobs:
- template: .\steps-restore-nuget.yml
- task: VSBuild@1
displayName: Build solution OpenConsole.slnx for WPF Control (Pack)
displayName: Build solution OpenConsole.sln for WPF Control (Pack)
inputs:
solution: 'OpenConsole.slnx'
solution: 'OpenConsole.sln'
msbuildArgs: >-
/p:WindowsTerminalReleaseBuild=true;Version=$(XES_PACKAGEVERSIONNUMBER)
/p:NoBuild=true

View File

@@ -68,7 +68,7 @@ parameters:
- name: signingIdentity
type: object
default: {}
- name: enableCaching
- name: enableMsBuildCaching
type: boolean
default: false
@@ -144,7 +144,7 @@ jobs:
}
displayName: Prepare Build and Sign Targets
- ${{ if eq(parameters.enableCaching, true) }}:
- ${{ if eq(parameters.enableMsBuildCaching, true) }}:
- pwsh: |-
$MSBuildCacheParameters = ""
$MSBuildCacheParameters += " -graph"
@@ -170,9 +170,9 @@ jobs:
- ${{ parameters.beforeBuildSteps }}
- task: VSBuild@1
displayName: Build OpenConsole.slnx
displayName: Build OpenConsole.sln
inputs:
solution: 'OpenConsole.slnx'
solution: 'OpenConsole.sln'
msbuildArgs: >-
/p:WindowsTerminalOfficialBuild=true;WindowsTerminalBranding=${{ parameters.branding }};PGOBuildMode=${{ parameters.pgoBuildMode }}
${{ parameters.additionalBuildOptions }}
@@ -183,7 +183,7 @@ jobs:
configuration: $(BuildConfiguration)
msbuildArchitecture: x64
maximumCpuCount: true
${{ if eq(parameters.enableCaching, true) }}:
${{ if eq(parameters.enableMsBuildCaching, true) }}:
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
@@ -192,7 +192,7 @@ jobs:
artifact: logs-$(BuildPlatform)-$(BuildConfiguration)${{ parameters.artifactStem }}
condition: always()
displayName: Publish Build Log
- ${{ if eq(parameters.enableCaching, true) }}:
- ${{ if eq(parameters.enableMsBuildCaching, true) }}:
- publish: $(Build.SourcesDirectory)\MSBuildCacheLogs
artifact: logs-msbuildcache-$(BuildPlatform)-$(BuildConfiguration)${{ parameters.artifactStem }}
condition: always()
@@ -203,7 +203,7 @@ jobs:
inputs:
contents: $(Build.SourcesDirectory)/msbuild.binlog
TargetFolder: $(Terminal.BinDir)
- ${{ if eq(parameters.enableCaching, true) }}:
- ${{ if eq(parameters.enableMsBuildCaching, true) }}:
- task: CopyFiles@2
displayName: Copy MSBuildCache Logs
inputs:

View File

@@ -86,7 +86,7 @@ jobs:
$MachineToken = $env:SYSTEM_ACCESSTOKEN | ConvertTo-SecureString -AsPlainText -Force
$Credential = [PSCredential]::new("ONEBRANCH_TOKEN", $MachineToken)
$MachineToken = $null
$Feed = "https://pkgs.dev.azure.com/shine-oss/terminal/_packaging/TerminalDependencies%40Local/nuget/v3/index.json"
$Feed = "https://pkgs.dev.azure.com/shine-oss/terminal/_packaging/TerminalDependencies/nuget/v3/index.json"
Register-PSResourceRepository -Name "PSGalleryUpstream" -Uri $Feed -Trusted
Get-PSResourceRepository

View File

@@ -69,3 +69,10 @@ jobs:
artifact: $(JobOutputArtifactName)
displayName: 'Publish VPack Manifest to Drop'
- task: PkgESFCIBGit@12
displayName: 'Submit VPack Manifest to Windows'
inputs:
configPath: '$(Build.SourcesDirectory)\build\config\GitCheckin.json'
artifactsDirectory: $(XES_VPACKMANIFESTDIRECTORY)
prTimeOut: 5

View File

@@ -19,16 +19,14 @@ steps:
restoreSolution: build/packages.config
restoreDirectory: '$(Build.SourcesDirectory)\packages'
- task: VSBuild@1
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: Restore NuGet packages for solution
inputs:
solution: 'OpenConsole.slnx'
msbuildArgs: /t:Restore
platform: $(BuildPlatform)
configuration: $(BuildConfiguration)
msbuildArchitecture: x64
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
command: restore
feedsToUse: config
configPath: NuGet.config
restoreSolution: OpenConsole.sln
restoreDirectory: '$(Build.SourcesDirectory)\packages'
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: Restore NuGet packages for global nuget

View File

@@ -5,7 +5,7 @@
<XesUseOneStoreVersioning>true</XesUseOneStoreVersioning>
<XesBaseYearForStoreVersion>2025</XesBaseYearForStoreVersion>
<VersionMajor>1</VersionMajor>
<VersionMinor>25</VersionMinor>
<VersionMinor>24</VersionMinor>
<VersionInfoProductName>Windows Terminal</VersionInfoProductName>
<VersionInfoCulture>1033</VersionInfoCulture>
<!-- The default has a spacing problem -->

View File

@@ -4,8 +4,8 @@
<!-- Native packages -->
<package id="Microsoft.Internal.PGO-Helpers.Cpp" version="0.2.34" targetFramework="native" />
<package id="Microsoft.Taef" version="10.93.240607003" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.250303.1" targetFramework="native" />
<package id="Microsoft.Internal.Windows.Terminal.ThemeHelpers" version="0.8.250811004" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230207.1" targetFramework="native" />
<package id="Microsoft.Internal.Windows.Terminal.ThemeHelpers" version="0.7.230706001" targetFramework="native" />
<package id="Microsoft.VisualStudio.Setup.Configuration.Native" version="2.3.2262" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.UI.Xaml" version="2.8.4" targetFramework="native" />
<package id="Microsoft.Web.WebView2" version="1.0.1661.34" targetFramework="native" />
@@ -20,7 +20,7 @@
<package id="Selenium.WebDriver" version="3.5.0" targetFramework="net45" />
<!-- MSBuildCache -->
<package id="Microsoft.MSBuildCache.AzurePipelines" version="0.1.283-preview" />
<package id="Microsoft.MSBuildCache.Local" version="0.1.283-preview" />
<package id="Microsoft.MSBuildCache.SharedCompilation" version="0.1.283-preview" />
<package id="Microsoft.MSBuildCache.AzurePipelines" version="0.1.318-preview" />
<package id="Microsoft.MSBuildCache.Local" version="0.1.318-preview" />
<package id="Microsoft.MSBuildCache.SharedCompilation" version="0.1.318-preview" />
</packages>

View File

@@ -7,7 +7,7 @@ This repository uses [git submodules](https://git-scm.com/book/en/v2/Git-Tools-S
git submodule update --init --recursive
```
OpenConsole.slnx may be built from within Visual Studio or from the command-line using a set of convenience scripts & tools in the **/tools** directory:
OpenConsole.sln may be built from within Visual Studio or from the command-line using a set of convenience scripts & tools in the **/tools** directory:
When using Visual Studio, be sure to set up the path for code formatting. To download the required clang-format.exe file, follow one of the building instructions below and run:
```powershell
@@ -103,7 +103,7 @@ If you want to use .nupkg files instead of the downloaded Nuget package, you can
The Terminal is bundled as an `.msix`, which is produced by the `CascadiaPackage.wapproj` project. To build that project from the commandline, you can run the following (from a window you've already run `tools\razzle.cmd` in):
```cmd
"%msbuild%" "%OPENCON%\OpenConsole.slnx" /p:Configuration=%_LAST_BUILD_CONF% /p:Platform=%ARCH% /p:AppxSymbolPackageEnabled=false /t:Terminal\CascadiaPackage /m
"%msbuild%" "%OPENCON%\OpenConsole.sln" /p:Configuration=%_LAST_BUILD_CONF% /p:Platform=%ARCH% /p:AppxSymbolPackageEnabled=false /t:Terminal\CascadiaPackage /m
```
This takes quite some time, and only generates an `msix`. It does not install the msix. To deploy the package:

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.250303.1" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230207.1" targetFramework="native" />
<package id="Microsoft.UI.Xaml" version="2.8.4" targetFramework="native" />
<package id="Microsoft.Web.WebView2" version="1.0.1661.34" targetFramework="native" />
</packages>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.250303.1" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230207.1" targetFramework="native" />
<package id="Microsoft.UI.Xaml" version="2.8.4" targetFramework="native" />
<package id="Microsoft.Web.WebView2" version="1.0.1661.34" targetFramework="native" />
</packages>

View File

@@ -942,12 +942,12 @@ void ROW::_resizeChars(uint16_t colEndDirty, uint16_t chBegDirty, size_t chEndDi
}
}
RowAttributes& ROW::Attributes() noexcept
til::small_rle<TextAttribute, uint16_t, 1>& ROW::Attributes() noexcept
{
return _attr;
}
const RowAttributes& ROW::Attributes() const noexcept
const til::small_rle<TextAttribute, uint16_t, 1>& ROW::Attributes() const noexcept
{
return _attr;
}

View File

@@ -14,11 +14,6 @@
class ROW;
class TextBuffer;
// Because MarkKind::Output gets set only on the actually written text,
// most rows will end up having at least 2 runs: The start of the line
// with MarkKind::Output and the rest of the line with MarkKind::None.
using RowAttributes = til::small_rle<TextAttribute, uint16_t, 2>;
enum class DelimiterClass
{
ControlChar,
@@ -154,8 +149,8 @@ public:
void ReplaceText(RowWriteState& state);
void CopyTextFrom(RowCopyTextFromState& state);
RowAttributes& Attributes() noexcept;
const RowAttributes& Attributes() const noexcept;
til::small_rle<TextAttribute, uint16_t, 1>& Attributes() noexcept;
const til::small_rle<TextAttribute, uint16_t, 1>& Attributes() const noexcept;
TextAttribute GetAttrByColumn(til::CoordType column) const;
std::vector<uint16_t> GetHyperlinks() const;
ImageSlice* SetImageSlice(ImageSlice::Pointer imageSlice) noexcept;
@@ -303,7 +298,7 @@ private:
std::span<uint16_t> _charOffsets;
// _attr is a run-length-encoded vector of TextAttribute with a decompressed
// length equal to _columnCount (= 1 TextAttribute per column).
RowAttributes _attr;
til::small_rle<TextAttribute, uint16_t, 1> _attr;
// The width of the row in visual columns.
uint16_t _columnCount = 0;
// Stores double-width/height (DECSWL/DECDWL/DECDHL) attributes.

View File

@@ -21,7 +21,6 @@ namespace TerminalAppLocalTests
_value{ value } {}
winrt::hstring Name() { return _value; }
winrt::hstring Subtitle() { return {}; }
winrt::hstring KeyChordText() { return {}; }
winrt::hstring Icon() { return {}; }

View File

@@ -5,14 +5,12 @@
#include "../TerminalApp/TerminalPage.h"
#include "../UnitTests_SettingsModel/TestUtils.h"
#include "../TerminalSettingsAppAdapterLib/TerminalSettings.h"
using namespace Microsoft::Console;
using namespace WEX::Logging;
using namespace WEX::TestExecution;
using namespace WEX::Common;
using namespace winrt::TerminalApp;
using namespace winrt::Microsoft::Terminal::Settings;
using namespace winrt::Microsoft::Terminal::Settings::Model;
using namespace winrt::Microsoft::Terminal::Control;
@@ -1421,10 +1419,10 @@ namespace TerminalAppLocalTests
VERIFY_ARE_EQUAL(L"profile0", terminalArgs.Profile());
VERIFY_IS_NULL(terminalArgs.Elevate());
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs);
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
const auto termSettings = termSettingsResult.DefaultSettings();
VERIFY_ARE_EQUAL(L"cmd.exe", termSettings->Commandline());
VERIFY_ARE_EQUAL(false, termSettings->Elevate());
VERIFY_ARE_EQUAL(L"cmd.exe", termSettings.Commandline());
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
}
{
Log::Comment(L"profile.elevate=true, action.elevate=nullopt: DO auto elevate");
@@ -1444,10 +1442,10 @@ namespace TerminalAppLocalTests
VERIFY_ARE_EQUAL(L"profile1", terminalArgs.Profile());
VERIFY_IS_NULL(terminalArgs.Elevate());
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs);
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
const auto termSettings = termSettingsResult.DefaultSettings();
VERIFY_ARE_EQUAL(L"pwsh.exe", termSettings->Commandline());
VERIFY_ARE_EQUAL(true, termSettings->Elevate());
VERIFY_ARE_EQUAL(L"pwsh.exe", termSettings.Commandline());
VERIFY_ARE_EQUAL(true, termSettings.Elevate());
}
{
Log::Comment(L"profile.elevate=false, action.elevate=nullopt: don't auto elevate");
@@ -1467,10 +1465,10 @@ namespace TerminalAppLocalTests
VERIFY_ARE_EQUAL(L"profile2", terminalArgs.Profile());
VERIFY_IS_NULL(terminalArgs.Elevate());
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs);
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
const auto termSettings = termSettingsResult.DefaultSettings();
VERIFY_ARE_EQUAL(L"wsl.exe", termSettings->Commandline());
VERIFY_ARE_EQUAL(false, termSettings->Elevate());
VERIFY_ARE_EQUAL(L"wsl.exe", termSettings.Commandline());
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
}
{
@@ -1492,10 +1490,10 @@ namespace TerminalAppLocalTests
VERIFY_IS_NOT_NULL(terminalArgs.Elevate());
VERIFY_IS_FALSE(terminalArgs.Elevate().Value());
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs);
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
const auto termSettings = termSettingsResult.DefaultSettings();
VERIFY_ARE_EQUAL(L"cmd.exe", termSettings->Commandline());
VERIFY_ARE_EQUAL(false, termSettings->Elevate());
VERIFY_ARE_EQUAL(L"cmd.exe", termSettings.Commandline());
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
}
{
Log::Comment(L"profile.elevate=true, action.elevate=false: don't auto elevate");
@@ -1516,10 +1514,10 @@ namespace TerminalAppLocalTests
VERIFY_IS_NOT_NULL(terminalArgs.Elevate());
VERIFY_IS_FALSE(terminalArgs.Elevate().Value());
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs);
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
const auto termSettings = termSettingsResult.DefaultSettings();
VERIFY_ARE_EQUAL(L"pwsh.exe", termSettings->Commandline());
VERIFY_ARE_EQUAL(false, termSettings->Elevate());
VERIFY_ARE_EQUAL(L"pwsh.exe", termSettings.Commandline());
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
}
{
Log::Comment(L"profile.elevate=false, action.elevate=false: don't auto elevate");
@@ -1540,10 +1538,10 @@ namespace TerminalAppLocalTests
VERIFY_IS_NOT_NULL(terminalArgs.Elevate());
VERIFY_IS_FALSE(terminalArgs.Elevate().Value());
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs);
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
const auto termSettings = termSettingsResult.DefaultSettings();
VERIFY_ARE_EQUAL(L"wsl.exe", termSettings->Commandline());
VERIFY_ARE_EQUAL(false, termSettings->Elevate());
VERIFY_ARE_EQUAL(L"wsl.exe", termSettings.Commandline());
VERIFY_ARE_EQUAL(false, termSettings.Elevate());
}
{
@@ -1565,10 +1563,10 @@ namespace TerminalAppLocalTests
VERIFY_IS_NOT_NULL(terminalArgs.Elevate());
VERIFY_IS_TRUE(terminalArgs.Elevate().Value());
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs);
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
const auto termSettings = termSettingsResult.DefaultSettings();
VERIFY_ARE_EQUAL(L"cmd.exe", termSettings->Commandline());
VERIFY_ARE_EQUAL(true, termSettings->Elevate());
VERIFY_ARE_EQUAL(L"cmd.exe", termSettings.Commandline());
VERIFY_ARE_EQUAL(true, termSettings.Elevate());
}
{
Log::Comment(L"profile.elevate=true, action.elevate=true: DO auto elevate");
@@ -1588,10 +1586,10 @@ namespace TerminalAppLocalTests
VERIFY_IS_NOT_NULL(terminalArgs.Elevate());
VERIFY_IS_TRUE(terminalArgs.Elevate().Value());
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs);
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
const auto termSettings = termSettingsResult.DefaultSettings();
VERIFY_ARE_EQUAL(L"pwsh.exe", termSettings->Commandline());
VERIFY_ARE_EQUAL(true, termSettings->Elevate());
VERIFY_ARE_EQUAL(L"pwsh.exe", termSettings.Commandline());
VERIFY_ARE_EQUAL(true, termSettings.Elevate());
}
{
Log::Comment(L"profile.elevate=false, action.elevate=true: DO auto elevate");
@@ -1612,10 +1610,10 @@ namespace TerminalAppLocalTests
VERIFY_IS_NOT_NULL(terminalArgs.Elevate());
VERIFY_IS_TRUE(terminalArgs.Elevate().Value());
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs);
const auto termSettingsResult = TerminalSettings::CreateWithNewTerminalArgs(settings, terminalArgs, nullptr);
const auto termSettings = termSettingsResult.DefaultSettings();
VERIFY_ARE_EQUAL(L"wsl.exe", termSettings->Commandline());
VERIFY_ARE_EQUAL(true, termSettings->Elevate());
VERIFY_ARE_EQUAL(L"wsl.exe", termSettings.Commandline());
VERIFY_ARE_EQUAL(true, termSettings.Elevate());
}
}

View File

@@ -66,6 +66,7 @@ namespace TerminalAppLocalTests
// can help you identify if something much lower in the stack has
// failed.
TEST_METHOD(EnsureTestsActivate);
TEST_METHOD(TryCreateSettingsType);
TEST_METHOD(TryCreateConnectionType);
TEST_METHOD(TryCreateXamlObjects);
@@ -130,12 +131,23 @@ namespace TerminalAppLocalTests
VERIFY_IS_TRUE(true);
}
void TabTests::TryCreateSettingsType()
{
// Verify we can create a WinRT type we authored
// Just creating it is enough to know that everything is working.
TerminalSettings settings;
VERIFY_IS_NOT_NULL(settings);
}
void TabTests::TryCreateConnectionType()
{
// Verify we can create a WinRT type we authored
// Just creating it is enough to know that everything is working.
winrt::Microsoft::Terminal::TerminalConnection::EchoConnection conn{};
VERIFY_IS_NOT_NULL(conn);
// We're doing this test separately from the TryCreateSettingsType test,
// to ensure both dependent binaries (TerminalSettings and
// TerminalConnection) both work individually.
}
void TabTests::TryCreateXamlObjects()
@@ -1294,15 +1306,6 @@ namespace TerminalAppLocalTests
});
}
static til::color _getControlBackgroundColor(winrt::TerminalApp::implementation::ContentManager* contentManager,
const winrt::Microsoft::Terminal::Control::TermControl& c)
{
auto interactivity{ contentManager->TryLookupCore(c.ContentId()) };
VERIFY_IS_NOT_NULL(interactivity);
const auto core{ interactivity.Core() };
return til::color{ core.BackgroundColor() };
}
void TabTests::TestPreviewCommitScheme()
{
Log::Comment(L"Preview a color scheme. Make sure it's applied, then committed accordingly");
@@ -1310,12 +1313,14 @@ namespace TerminalAppLocalTests
auto page = _commonSetup();
VERIFY_IS_NOT_NULL(page);
TestOnUIThread([&page, this]() {
TestOnUIThread([&page]() {
const auto& activeControl{ page->_GetActiveControl() };
VERIFY_IS_NOT_NULL(activeControl);
const auto backgroundColor{ _getControlBackgroundColor(_contentManager.get(), activeControl) };
VERIFY_ARE_EQUAL(til::color{ 0xff0c0c0c }, backgroundColor);
const auto& controlSettings = activeControl.Settings();
VERIFY_IS_NOT_NULL(controlSettings);
VERIFY_ARE_EQUAL(til::color{ 0xff0c0c0c }, til::color{ controlSettings.DefaultBackground() });
});
TestOnUIThread([&page]() {
@@ -1325,13 +1330,15 @@ namespace TerminalAppLocalTests
page->_PreviewAction(actionAndArgs);
});
TestOnUIThread([&page, this]() {
TestOnUIThread([&page]() {
const auto& activeControl{ page->_GetActiveControl() };
VERIFY_IS_NOT_NULL(activeControl);
const auto& controlSettings = activeControl.Settings();
VERIFY_IS_NOT_NULL(controlSettings);
Log::Comment(L"Color should be changed to the preview");
const auto backgroundColor{ _getControlBackgroundColor(_contentManager.get(), activeControl) };
VERIFY_ARE_EQUAL(til::color{ 0xff000000 }, backgroundColor);
VERIFY_ARE_EQUAL(til::color{ 0xff000000 }, til::color{ controlSettings.DefaultBackground() });
// And we should have stored a function to revert the change.
VERIFY_ARE_EQUAL(1u, page->_restorePreviewFuncs.size());
@@ -1345,13 +1352,15 @@ namespace TerminalAppLocalTests
page->_HandleSetColorScheme(nullptr, ActionEventArgs{ args });
});
TestOnUIThread([&page, this]() {
TestOnUIThread([&page]() {
const auto& activeControl{ page->_GetActiveControl() };
VERIFY_IS_NOT_NULL(activeControl);
const auto& controlSettings = activeControl.Settings();
VERIFY_IS_NOT_NULL(controlSettings);
Log::Comment(L"Color should be changed");
const auto backgroundColor{ _getControlBackgroundColor(_contentManager.get(), activeControl) };
VERIFY_ARE_EQUAL(til::color{ 0xff000000 }, backgroundColor);
VERIFY_ARE_EQUAL(til::color{ 0xff000000 }, til::color{ controlSettings.DefaultBackground() });
// After preview there should be no more restore functions to execute.
VERIFY_ARE_EQUAL(0u, page->_restorePreviewFuncs.size());
@@ -1372,12 +1381,14 @@ namespace TerminalAppLocalTests
auto page = _commonSetup();
VERIFY_IS_NOT_NULL(page);
TestOnUIThread([&page, this]() {
TestOnUIThread([&page]() {
const auto& activeControl{ page->_GetActiveControl() };
VERIFY_IS_NOT_NULL(activeControl);
const auto backgroundColor{ _getControlBackgroundColor(_contentManager.get(), activeControl) };
VERIFY_ARE_EQUAL(til::color{ 0xff0c0c0c }, backgroundColor);
const auto& controlSettings = activeControl.Settings();
VERIFY_IS_NOT_NULL(controlSettings);
VERIFY_ARE_EQUAL(til::color{ 0xff0c0c0c }, til::color{ controlSettings.DefaultBackground() });
});
TestOnUIThread([&page]() {
@@ -1387,13 +1398,15 @@ namespace TerminalAppLocalTests
page->_PreviewAction(actionAndArgs);
});
TestOnUIThread([&page, this]() {
TestOnUIThread([&page]() {
const auto& activeControl{ page->_GetActiveControl() };
VERIFY_IS_NOT_NULL(activeControl);
const auto& controlSettings = activeControl.Settings();
VERIFY_IS_NOT_NULL(controlSettings);
Log::Comment(L"Color should be changed to the preview");
const auto backgroundColor{ _getControlBackgroundColor(_contentManager.get(), activeControl) };
VERIFY_ARE_EQUAL(til::color{ 0xff000000 }, backgroundColor);
VERIFY_ARE_EQUAL(til::color{ 0xff000000 }, til::color{ controlSettings.DefaultBackground() });
});
TestOnUIThread([&page]() {
@@ -1401,13 +1414,15 @@ namespace TerminalAppLocalTests
page->_EndPreview();
});
TestOnUIThread([&page, this]() {
TestOnUIThread([&page]() {
const auto& activeControl{ page->_GetActiveControl() };
VERIFY_IS_NOT_NULL(activeControl);
const auto& controlSettings = activeControl.Settings();
VERIFY_IS_NOT_NULL(controlSettings);
Log::Comment(L"Color should be the same as it originally was");
const auto backgroundColor{ _getControlBackgroundColor(_contentManager.get(), activeControl) };
VERIFY_ARE_EQUAL(til::color{ 0xff0c0c0c }, backgroundColor);
VERIFY_ARE_EQUAL(til::color{ 0xff0c0c0c }, til::color{ controlSettings.DefaultBackground() });
});
Log::Comment(L"Sleep to let events propagate");
Sleep(250);
@@ -1422,12 +1437,14 @@ namespace TerminalAppLocalTests
auto page = _commonSetup();
VERIFY_IS_NOT_NULL(page);
TestOnUIThread([&page, this]() {
TestOnUIThread([&page]() {
const auto& activeControl{ page->_GetActiveControl() };
VERIFY_IS_NOT_NULL(activeControl);
const auto backgroundColor{ _getControlBackgroundColor(_contentManager.get(), activeControl) };
VERIFY_ARE_EQUAL(til::color{ 0xff0c0c0c }, backgroundColor);
const auto& controlSettings = activeControl.Settings();
VERIFY_IS_NOT_NULL(controlSettings);
VERIFY_ARE_EQUAL(til::color{ 0xff0c0c0c }, til::color{ controlSettings.DefaultBackground() });
});
TestOnUIThread([&page]() {
@@ -1436,13 +1453,15 @@ namespace TerminalAppLocalTests
page->_PreviewColorScheme(args);
});
TestOnUIThread([&page, this]() {
TestOnUIThread([&page]() {
const auto& activeControl{ page->_GetActiveControl() };
VERIFY_IS_NOT_NULL(activeControl);
const auto& controlSettings = activeControl.Settings();
VERIFY_IS_NOT_NULL(controlSettings);
Log::Comment(L"Color should be changed to the preview");
const auto backgroundColor{ _getControlBackgroundColor(_contentManager.get(), activeControl) };
VERIFY_ARE_EQUAL(til::color{ 0xff000000 }, backgroundColor);
VERIFY_ARE_EQUAL(til::color{ 0xff000000 }, til::color{ controlSettings.DefaultBackground() });
});
TestOnUIThread([&page]() {
@@ -1451,13 +1470,15 @@ namespace TerminalAppLocalTests
page->_PreviewColorScheme(args);
});
TestOnUIThread([&page, this]() {
TestOnUIThread([&page]() {
const auto& activeControl{ page->_GetActiveControl() };
VERIFY_IS_NOT_NULL(activeControl);
const auto& controlSettings = activeControl.Settings();
VERIFY_IS_NOT_NULL(controlSettings);
Log::Comment(L"Color should be changed to the preview");
const auto backgroundColor{ _getControlBackgroundColor(_contentManager.get(), activeControl) };
VERIFY_ARE_EQUAL(til::color{ 0xffFAFAFA }, backgroundColor);
VERIFY_ARE_EQUAL(til::color{ 0xffFAFAFA }, til::color{ controlSettings.DefaultBackground() });
});
TestOnUIThread([&page]() {
@@ -1468,13 +1489,15 @@ namespace TerminalAppLocalTests
page->_HandleSetColorScheme(nullptr, ActionEventArgs{ args });
});
TestOnUIThread([&page, this]() {
TestOnUIThread([&page]() {
const auto& activeControl{ page->_GetActiveControl() };
VERIFY_IS_NOT_NULL(activeControl);
const auto& controlSettings = activeControl.Settings();
VERIFY_IS_NOT_NULL(controlSettings);
Log::Comment(L"Color should be changed");
const auto backgroundColor{ _getControlBackgroundColor(_contentManager.get(), activeControl) };
VERIFY_ARE_EQUAL(til::color{ 0xffFAFAFA }, backgroundColor);
VERIFY_ARE_EQUAL(til::color{ 0xffFAFAFA }, til::color{ controlSettings.DefaultBackground() });
});
Log::Comment(L"Sleep to let events propagate");
Sleep(250);

View File

@@ -24,7 +24,6 @@
<PropertyGroup Label="NuGet Dependencies">
<!-- TerminalCppWinrt is intentionally not set -->
<TerminalMUX>true</TerminalMUX>
<TerminalThemeHelpers>true</TerminalThemeHelpers>
</PropertyGroup>
<Import Project="$(SolutionDir)\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
@@ -60,9 +59,6 @@
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
<ProjectReference Include="$(OpenConsoleDir)\src\cascadia\TerminalApp\dll\TerminalApp.vcxproj" />
<ProjectReference Include="$(OpenConsoleDir)\src\cascadia\TerminalSettingsModel\dll\Microsoft.Terminal.Settings.Model.vcxproj" />
<ProjectReference Include="$(OpenConsoleDir)\src\cascadia\TerminalSettingsAppAdapterLib\TerminalSettingsAppAdapterLib.vcxproj">
<Project>{3c46e2b0-ae6c-4132-9122-6772fb411959}</Project>
</ProjectReference>
</ItemGroup>
<!-- ========================= Globals ======================== -->

View File

@@ -22,7 +22,6 @@
<VcpkgAutoLink>false</VcpkgAutoLink>
<TerminalMUX>true</TerminalMUX>
<TerminalThemeHelpers>true</TerminalThemeHelpers>
<!--
These two properties are very important!
@@ -115,9 +114,6 @@
<Project>{CA5CAD1A-082C-4476-9F33-94B339494076}</Project>
</ProjectReference>
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\UIHelpers\UIHelpers.vcxproj">
<Project>{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup>

View File

@@ -5,7 +5,6 @@
#include "TerminalPage.h"
#include "Utils.h"
#include "../../types/inc/utils.hpp"
#include "../TerminalSettingsAppAdapterLib/TerminalSettings.h"
#include <LibraryResources.h>
@@ -98,19 +97,24 @@ namespace winrt::TerminalApp::implementation
{
if (const auto& scheme{ _settings.GlobalSettings().ColorSchemes().TryLookup(args.SchemeName()) })
{
// Clear the saved preview funcs because we don't need to add a restore each time
// the preview color changes, we only need to be able to restore the last one.
_restorePreviewFuncs.clear();
const auto backup = _restorePreviewFuncs.empty();
_ApplyToActiveControls([&](const auto& control) {
auto temporarySettings{ winrt::make_self<Settings::TerminalSettings>() };
temporarySettings->ApplyColorScheme(scheme);
control.ApplyPreviewColorScheme(temporarySettings.try_as<winrt::Microsoft::Terminal::Core::ICoreScheme>());
// Stash a copy of the current scheme.
auto originalScheme{ control.ColorScheme() };
// Take a copy of the inputs, since they are pointers anyways.
_restorePreviewFuncs.emplace_back([=]() {
control.ResetPreviewColorScheme();
});
// Apply the new scheme.
control.ColorScheme(scheme.ToCoreScheme());
if (backup)
{
// Each control will emplace a revert into the
// _restorePreviewFuncs for itself.
_restorePreviewFuncs.emplace_back([=]() {
// On dismiss, restore the original scheme.
control.ColorScheme(originalScheme);
});
}
});
}
}

View File

@@ -8,7 +8,6 @@
#include "ScratchpadContent.h"
#include "../WinRTUtils/inc/WtExeUtils.h"
#include "../../types/inc/utils.hpp"
#include "../TerminalSettingsAppAdapterLib/TerminalSettings.h"
#include "Utils.h"
using namespace winrt::Windows::ApplicationModel::DataTransfer;
@@ -549,9 +548,7 @@ namespace winrt::TerminalApp::implementation
{
if (const auto& realArgs = args.ActionArgs().try_as<CopyTextArgs>())
{
const auto copyFormatting = realArgs.CopyFormatting();
const auto format = copyFormatting ? copyFormatting.Value() : _settings.GlobalSettings().CopyFormatting();
const auto handled = _CopyText(realArgs.DismissSelection(), realArgs.SingleLine(), realArgs.WithControlSequences(), format);
const auto handled = _CopyText(realArgs.DismissSelection(), realArgs.SingleLine(), realArgs.WithControlSequences(), realArgs.CopyFormatting());
args.Handled(handled);
}
}
@@ -669,10 +666,8 @@ namespace winrt::TerminalApp::implementation
{
if (const auto scheme = _settings.GlobalSettings().ColorSchemes().TryLookup(realArgs.SchemeName()))
{
auto temporarySettings{ winrt::make_self<Settings::TerminalSettings>() };
temporarySettings->ApplyColorScheme(scheme);
const auto res = _ApplyToActiveControls([&](auto& control) {
control.SetOverrideColorScheme(temporarySettings.try_as<winrt::Microsoft::Terminal::Core::ICoreScheme>());
control.ColorScheme(scheme.ToCoreScheme());
});
args.Handled(res);
}

View File

@@ -135,19 +135,12 @@ namespace winrt::TerminalApp::implementation
_isElevated = ::Microsoft::Console::Utils::IsRunningElevated();
_canDragDrop = ::Microsoft::Console::Utils::CanUwpDragDrop();
_reloadSettings = std::make_shared<ThrottledFunc<>>(
DispatcherQueue::GetForCurrentThread(),
til::throttled_func_options{
.delay = std::chrono::milliseconds{ 100 },
.debounce = true,
.trailing = true,
},
[weakSelf = get_weak()]() {
if (auto self{ weakSelf.get() })
{
self->ReloadSettings();
}
});
_reloadSettings = std::make_shared<ThrottledFuncTrailing<>>(winrt::Windows::System::DispatcherQueue::GetForCurrentThread(), std::chrono::milliseconds(100), [weakSelf = get_weak()]() {
if (auto self{ weakSelf.get() })
{
self->ReloadSettings();
}
});
_languageProfileNotifier = winrt::make_self<LanguageProfileNotifier>([this]() {
_reloadSettings->Run();

View File

@@ -64,7 +64,7 @@ namespace winrt::TerminalApp::implementation
bool _hasSettingsStartupActions{ false };
::TerminalApp::AppCommandlineArgs _settingsAppArgs;
std::shared_ptr<ThrottledFunc<>> _reloadSettings;
std::shared_ptr<ThrottledFuncTrailing<>> _reloadSettings;
std::vector<Microsoft::Terminal::Settings::Model::SettingsLoadWarnings> _warnings{};

View File

@@ -0,0 +1,267 @@
#include "ColorHelper.h"
using namespace winrt::TerminalApp;
// Method Description:
// Determines whether or not a given color is light
// Arguments:
// - color: this color is going to be examined whether it
// is light or not
// Return Value:
// - true if light, false if dark
bool ColorHelper::IsBrightColor(const winrt::Windows::UI::Color& color)
{
// https://www.w3.org/TR/AERT#color-contrast
auto brightness = (color.R * 299 + color.G * 587 + color.B * 114) / 1000.f;
return brightness > 128.f;
}
// Method Description:
// Converts a rgb color to an hsl one
// Arguments:
// - color: the rgb color, which is going to be converted
// Return Value:
// - a hsl color with the following ranges
// - H: [0.f -360.f]
// - L: [0.f - 1.f] (rounded to the third decimal place)
// - S: [0.f - 1.f] (rounded to the third decimal place)
HSL ColorHelper::RgbToHsl(const winrt::Windows::UI::Color& color)
{
// https://www.rapidtables.com/convert/color/rgb-to-hsl.html
auto epsilon = std::numeric_limits<float>::epsilon();
auto r = color.R / 255.f;
auto g = color.G / 255.f;
auto b = color.B / 255.f;
auto max = std::max(r, std::max(g, b));
auto min = std::min(r, std::min(g, b));
auto delta = max - min;
auto h = 0.f;
auto s = 0.f;
auto l = (max + min) / 2;
if (delta < epsilon || max < epsilon) /* delta == 0 || max == 0*/
{
l = std::roundf(l * 1000) / 1000;
return HSL{ h, s, l };
}
s = l > 0.5 ? delta / (2 - max - min) : delta / (max + min);
if (max - r < epsilon) // max == r
{
h = (g - b) / delta + (g < b ? 6 : 0);
}
else if (max - g < epsilon) // max == g
{
h = (b - r) / delta + 2;
}
else if (max - b < epsilon) // max == b
{
h = (r - g) / delta + 4;
}
// three decimal places after the comma ought
// to be enough for everybody - Bill Gates, 1981
auto finalH = std::roundf(h * 60);
auto finalS = std::roundf(s * 1000) / 1000;
auto finalL = std::roundf(l * 1000) / 1000;
return HSL{ finalH, finalS, finalL };
}
// Method Description:
// Converts a hsl color to rgb one
// Arguments:
// - color: the hsl color, which is going to be converted
// Return Value:
// - the rgb color (r,g,b - [0, 255] range)
winrt::Windows::UI::Color ColorHelper::HslToRgb(const HSL& color)
{
auto epsilon = std::numeric_limits<float>::epsilon();
auto h = (color.H - 1.f > epsilon) ? color.H / 360.f : color.H;
auto s = (color.S - 1.f > epsilon) ? color.S / 100.f : color.S;
auto l = (color.L - 1.f > epsilon) ? color.L / 100.f : color.L;
auto r = l;
auto g = l;
auto b = l;
if (s > epsilon)
{
auto q = l < 0.5 ? l * (1 + s) : l + s - l * s;
auto p = 2 * l - q;
r = HueToRgb(p, q, h + 1.f / 3.f);
g = HueToRgb(p, q, h);
b = HueToRgb(p, q, h - 1.f / 3.f);
}
auto finalR = static_cast<uint8_t>(std::roundf(r * 255));
auto finalG = static_cast<uint8_t>(std::roundf(g * 255));
auto finalB = static_cast<uint8_t>(std::roundf(b * 255));
uint8_t finalA = 255; //opaque
return winrt::Windows::UI::ColorHelper::FromArgb(finalA, finalR, finalG, finalB);
}
float ColorHelper::HueToRgb(float p, float q, float t)
{
auto epsilon = std::numeric_limits<float>::epsilon();
if (t < 0)
t += 1;
if (t > 1)
t -= 1;
if (t - (1.f / 6.f) < epsilon)
return p + (q - p) * 6 * t;
if (t - .5f < epsilon)
return q;
if (t - 2.f / 3.f < epsilon)
return p + (q - p) * (2.f / 3.f - t) * 6;
return p;
}
// Method Description:
// Lightens a color by a given amount
// Arguments:
// - color: the color which is going to be lightened
// - amount: the lighten amount (0-100)
// Return Value:
// - the lightened color in RGB format
winrt::Windows::UI::Color ColorHelper::Lighten(const winrt::Windows::UI::Color& color, float amount /* = 10.f*/)
{
auto hsl = RgbToHsl(color);
hsl.L += amount / 100;
hsl.L = std::clamp(hsl.L, 0.f, 1.f);
return HslToRgb(hsl);
}
// Method Description:
// Darkens a color by a given amount
// Arguments:
// - color: the color which is going to be darkened
// - amount: the darken amount (0-100)
// Return Value:
// - the darkened color in RGB format
winrt::Windows::UI::Color ColorHelper::Darken(const winrt::Windows::UI::Color& color, float amount /* = 10.f*/)
{
auto hsl = RgbToHsl(color);
hsl.L -= amount / 100;
hsl.L = std::clamp(hsl.L, 0.f, 1.f);
return HslToRgb(hsl);
}
// Method Description:
// Gets an accent color to a given color. Basically, generates
// 16 shades of the color and finds the first which has a good
// contrast according to https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
// Readability ratio of 3.5 seems to look quite nicely
// Arguments:
// - color: the color for which we need an accent
// Return Value:
// - the accent color in RGB format
winrt::Windows::UI::Color ColorHelper::GetAccentColor(const winrt::Windows::UI::Color& color)
{
auto accentColor = RgbToHsl(color);
if (accentColor.S < 0.15)
{
accentColor.S = 0.15f;
}
constexpr auto shadeCount = 16;
constexpr auto shadeStep = 1.f / shadeCount;
auto shades = std::map<float, HSL>();
for (auto i = 0; i < 15; i++)
{
auto shade = HSL{ accentColor.H, accentColor.S, i * shadeStep };
auto contrast = GetReadability(shade, accentColor);
shades.insert(std::make_pair(contrast, shade));
}
// 3f is quite nice if the whole non-client area is painted
constexpr auto readability = 1.75f;
for (auto shade : shades)
{
if (shade.first >= readability)
{
return HslToRgb(shade.second);
}
}
return HslToRgb(shades.end()->second);
}
// Method Description:
// Gets the readability of two colors according to
// https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
// Arguments:
// - firstColor: the first color for the readability check (hsl)
// - secondColor: the second color for the readability check (hsl)
// Return Value:
// - the readability of the colors according to (WCAG Version 2)
float ColorHelper::GetReadability(const HSL& first, const HSL& second)
{
return GetReadability(HslToRgb(first), HslToRgb(second));
}
// Method Description:
// Gets the readability of two colors according to
// https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
// Arguments:
// - firstColor: the first color for the readability check (rgb)
// - secondColor: the second color for the readability check (rgb)
// Return Value:
// - the readability of the colors according to (WCAG Version 2)
float ColorHelper::GetReadability(const winrt::Windows::UI::Color& first, const winrt::Windows::UI::Color& second)
{
auto l1 = GetLuminance(first);
auto l2 = GetLuminance(second);
return (std::max(l1, l2) + 0.05f) / std::min(l1, l2) + 0.05f;
}
// Method Description:
// Calculates the luminance of a given color according to
// https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
// Arguments:
// - color: its luminance is going to be calculated
// Return Value:
// - the luminance of the color
float ColorHelper::GetLuminance(const winrt::Windows::UI::Color& color)
{
auto epsilon = std::numeric_limits<float>::epsilon();
float R, G, B;
auto RsRGB = color.R / 255.f;
auto GsRGB = color.G / 255.f;
auto BsRGB = color.B / 255.f;
if (RsRGB - 0.03928f <= epsilon)
{
R = RsRGB / 12.92f;
}
else
{
R = std::pow(((RsRGB + 0.055f) / 1.055f), 2.4f);
}
if (GsRGB - 0.03928f <= epsilon)
{
G = GsRGB / 12.92f;
}
else
{
G = std::pow(((GsRGB + 0.055f) / 1.055f), 2.4f);
}
if (BsRGB - 0.03928f <= epsilon)
{
B = BsRGB / 12.92f;
}
else
{
B = std::pow(((BsRGB + 0.055f) / 1.055f), 2.4f);
}
auto luminance = (0.2126f * R) + (0.7152f * G) + (0.0722f * B);
return std::roundf(luminance * 10000) / 10000.f;
}

View File

@@ -0,0 +1,31 @@
#pragma once
#include <winrt/Windows.UI.h>
namespace winrt::TerminalApp
{
class HSL
{
public:
float H;
float S;
float L;
};
class ColorHelper
{
public:
static bool IsBrightColor(const Windows::UI::Color& color);
static HSL RgbToHsl(const Windows::UI::Color& color);
static Windows::UI::Color HslToRgb(const HSL& color);
static Windows::UI::Color Lighten(const Windows::UI::Color& color, float amount = 10.f);
static Windows::UI::Color Darken(const Windows::UI::Color& color, float amount = 10.f);
static Windows::UI::Color GetAccentColor(const Windows::UI::Color& color);
static float GetLuminance(const Windows::UI::Color& color);
static float GetReadability(const Windows::UI::Color& first, const Windows::UI::Color& second);
static float GetReadability(const HSL& first, const HSL& second);
private:
static float HueToRgb(float p, float q, float t);
};
}

View File

@@ -44,12 +44,6 @@
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
</Style>
<Style x:Key="SubtitleTextStyle"
TargetType="TextBlock">
<Setter Property="FontSize" Value="10" />
<Setter Property="Foreground" Value="{ThemeResource SystemBaseMediumColor}" />
</Style>
<DataTemplate x:Key="ListItemTemplate"
x:DataType="local:FilteredCommand">
<ListViewItem HorizontalContentAlignment="Stretch"
@@ -77,19 +71,11 @@
Height="16"
Content="{x:Bind Item.ResolvedIcon, Mode=OneWay}" />
<StackPanel Grid.Column="1"
HorizontalAlignment="Left"
Orientation="Vertical">
<local:HighlightedTextControl HorizontalAlignment="Left"
HighlightedRuns="{x:Bind NameHighlights, Mode=OneWay}"
Text="{x:Bind Item.Name, Mode=OneWay}" />
<local:HighlightedTextControl HorizontalAlignment="Left"
HighlightedRuns="{x:Bind SubtitleHighlights, Mode=OneWay}"
Text="{x:Bind Item.Subtitle, Mode=OneWay}"
TextBlockStyle="{StaticResource SubtitleTextStyle}"
Visibility="{x:Bind HasSubtitle, Mode=OneWay}" />
<local:HighlightedTextControl Grid.Column="1"
HorizontalAlignment="Left"
HighlightedRuns="{x:Bind NameHighlights, Mode=OneWay}"
Text="{x:Bind Item.Name, Mode=OneWay}" />
</StackPanel>
<!--
The block for the key chord is only visible
when there's actual text set as the label.
@@ -136,19 +122,10 @@
Height="16"
Content="{x:Bind Item.ResolvedIcon, Mode=OneWay}" />
<StackPanel Grid.Column="1"
HorizontalAlignment="Left"
Orientation="Vertical">
<local:HighlightedTextControl HorizontalAlignment="Left"
HighlightedRuns="{x:Bind NameHighlights, Mode=OneWay}"
Text="{x:Bind Item.Name, Mode=OneWay}" />
<local:HighlightedTextControl HorizontalAlignment="Left"
HighlightedRuns="{x:Bind SubtitleHighlights, Mode=OneWay}"
Text="{x:Bind Item.Subtitle, Mode=OneWay}"
TextBlockStyle="{StaticResource SubtitleTextStyle}"
Visibility="{x:Bind HasSubtitle, Mode=OneWay}" />
</StackPanel>
<local:HighlightedTextControl Grid.Column="1"
HorizontalAlignment="Left"
HighlightedRuns="{x:Bind NameHighlights, Mode=OneWay}"
Text="{x:Bind Item.Name, Mode=OneWay}" />
<!--
The block for the key chord is only visible

View File

@@ -17,31 +17,6 @@ namespace winrt::TerminalApp::implementation
ActionPaletteItem(const Microsoft::Terminal::Settings::Model::Command& command, const winrt::hstring keyChordText) :
_Command{ command }, _name{ command.Name() }, _keyChordText{ keyChordText }
{
static bool shouldShowSubtitles = [] {
try
{
const auto context{ winrt::Windows::ApplicationModel::Resources::Core::ResourceContext::GetForViewIndependentUse() };
const auto qualifiers{ context.QualifierValues() };
if (const auto language{ qualifiers.TryLookup(L"language") })
{
return !til::starts_with_insensitive_ascii(*language, L"en-");
}
}
catch (...)
{
LOG_CAUGHT_EXCEPTION();
}
return false;
}();
if (shouldShowSubtitles)
{
const auto subtitle = _Command.LanguageNeutralName();
if (subtitle != _name)
{
_subtitle = std::move(subtitle);
}
}
}
winrt::hstring Name()
@@ -49,11 +24,6 @@ namespace winrt::TerminalApp::implementation
return _name;
}
winrt::hstring Subtitle()
{
return _subtitle;
}
winrt::hstring KeyChordText()
{
return _keyChordText;
@@ -61,7 +31,7 @@ namespace winrt::TerminalApp::implementation
winrt::hstring Icon()
{
return _Command.Icon().Resolved();
return _Command.IconPath();
}
WINRT_PROPERTY(Microsoft::Terminal::Settings::Model::Command, Command, nullptr);
@@ -69,7 +39,6 @@ namespace winrt::TerminalApp::implementation
private:
Windows::UI::Xaml::Data::INotifyPropertyChanged::PropertyChanged_revoker _commandChangedRevoker;
winrt::hstring _name;
winrt::hstring _subtitle;
winrt::hstring _keyChordText;
};
@@ -85,11 +54,6 @@ namespace winrt::TerminalApp::implementation
return _CommandLine;
}
winrt::hstring Subtitle()
{
return {};
}
winrt::hstring KeyChordText()
{
return {};
@@ -123,11 +87,6 @@ namespace winrt::TerminalApp::implementation
return {};
}
winrt::hstring Subtitle()
{
return {};
}
winrt::hstring KeyChordText()
{
return {};

View File

@@ -26,16 +26,11 @@ namespace winrt::TerminalApp::implementation
{
// Recompute the highlighted name if the item name changes
// Our Item will not change, so we don't need to update the revoker if it does.
_itemChangedRevoker = _Item.as<winrt::Windows::UI::Xaml::Data::INotifyPropertyChanged>().PropertyChanged(winrt::auto_revoke, [=](auto& /*sender*/, auto& e) {
const auto property{ e.PropertyName() };
if (property == L"Name")
_itemChangedRevoker = _Item.as<winrt::Windows::UI::Xaml::Data::INotifyPropertyChanged>().PropertyChanged(winrt::auto_revoke, [weakThis{ get_weak() }](auto& /*sender*/, auto& e) {
auto filteredCommand{ weakThis.get() };
if (filteredCommand && e.PropertyName() == L"Name")
{
_update();
}
else if (property == L"Subtitle")
{
_update();
PropertyChanged.raise(*this, winrt::Windows::UI::Xaml::Data::PropertyChangedEventArgs{ L"HasSubtitle" });
filteredCommand->_update();
}
});
}
@@ -51,11 +46,6 @@ namespace winrt::TerminalApp::implementation
}
}
bool FilteredCommand::HasSubtitle()
{
return !_Item.Subtitle().empty();
}
static std::tuple<std::vector<winrt::TerminalApp::HighlightedRun>, int32_t> _matchedSegmentsAndWeight(const std::shared_ptr<fzf::matcher::Pattern>& pattern, const winrt::hstring& haystack)
{
std::vector<winrt::TerminalApp::HighlightedRun> segments;
@@ -78,17 +68,7 @@ namespace winrt::TerminalApp::implementation
void FilteredCommand::_update()
{
auto itemName = _Item.Name();
auto [segments, weight] = _matchedSegmentsAndWeight(_pattern, itemName);
decltype(segments) subtitleSegments;
if (HasSubtitle())
{
auto itemSubtitle = _Item.Subtitle();
int32_t subtitleWeight = 0;
std::tie(subtitleSegments, subtitleWeight) = _matchedSegmentsAndWeight(_pattern, itemSubtitle);
weight = std::max(weight, subtitleWeight);
}
auto [segments, weight] = _matchedSegmentsAndWeight(_pattern, _Item.Name());
if (segments.empty())
{
@@ -99,15 +79,6 @@ namespace winrt::TerminalApp::implementation
NameHighlights(winrt::single_threaded_vector(std::move(segments)));
}
if (subtitleSegments.empty())
{
SubtitleHighlights(nullptr);
}
else
{
SubtitleHighlights(winrt::single_threaded_vector(std::move(subtitleSegments)));
}
Weight(weight);
}

View File

@@ -24,12 +24,9 @@ namespace winrt::TerminalApp::implementation
static int Compare(const winrt::TerminalApp::FilteredCommand& first, const winrt::TerminalApp::FilteredCommand& second);
bool HasSubtitle();
til::property_changed_event PropertyChanged;
WINRT_OBSERVABLE_PROPERTY(winrt::TerminalApp::IPaletteItem, Item, PropertyChanged.raise, nullptr);
WINRT_OBSERVABLE_PROPERTY(winrt::Windows::Foundation::Collections::IVector<winrt::TerminalApp::HighlightedRun>, NameHighlights, PropertyChanged.raise);
WINRT_OBSERVABLE_PROPERTY(winrt::Windows::Foundation::Collections::IVector<winrt::TerminalApp::HighlightedRun>, SubtitleHighlights, PropertyChanged.raise);
WINRT_OBSERVABLE_PROPERTY(int, Weight, PropertyChanged.raise);
private:

View File

@@ -13,8 +13,6 @@ namespace TerminalApp
IPaletteItem Item { get; };
IVector<HighlightedRun> NameHighlights { get; };
IVector<HighlightedRun> SubtitleHighlights { get; };
Boolean HasSubtitle { get; };
Int32 Weight;
}
}

View File

@@ -16,7 +16,6 @@ namespace TerminalApp
{
PaletteItemType Type { get; };
String Name { get; };
String Subtitle { get; };
String KeyChordText { get; };
String Icon { get; };
Windows.UI.Xaml.Controls.IconElement ResolvedIcon { get; };

View File

@@ -19,6 +19,41 @@ DEFINE_PROPERTYKEY(PKEY_AppUserModel_DestListLogoUri, 0x9F4C2855, 0x9F79, 0x4B39
{ 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3 }, 29 \
}
// Function Description:
// - This function guesses whether a string is a file path.
static constexpr bool _isProbableFilePath(std::wstring_view path)
{
// "C:X", "C:\X", "\\?", "\\."
// _this function rejects \??\ as a path_
if (path.size() >= 3)
{
const auto firstColon{ path.find(L':') };
if (firstColon == 1)
{
return true;
}
const auto prefix{ path.substr(0, 2) };
return prefix == LR"(//)" || prefix == LR"(\\)";
}
return false;
}
// Function Description:
// - DestListLogoUri cannot take paths that are separated by / unless they're URLs.
// This function uses std::filesystem to normalize strings that appear to be file
// paths to have the "correct" slash direction.
static std::wstring _normalizeIconPath(std::wstring_view path)
{
const auto fullPath{ wil::ExpandEnvironmentStringsW<std::wstring>(path.data()) };
if (_isProbableFilePath(fullPath))
{
std::filesystem::path asPath{ fullPath };
return asPath.make_preferred().wstring();
}
return std::wstring{ fullPath };
}
// Method Description:
// - Updates the items of the Jumplist based on the given settings.
// Arguments:
@@ -89,7 +124,7 @@ void Jumplist::_updateProfiles(IObjectCollection* jumplistItems, winrt::Windows:
auto args = fmt::format(FMT_COMPILE(L"-p {}"), to_hstring(profile.Guid()));
// Create the shell link object for the profile
const auto normalizedIconPath{ profile.Icon().Resolved() };
const auto normalizedIconPath{ _normalizeIconPath(profile.Icon()) };
const auto shLink = _createShellLink(profile.Name(), normalizedIconPath, args);
THROW_IF_FAILED(jumplistItems->AddObject(shLink.get()));
}

View File

@@ -35,23 +35,17 @@ namespace winrt::TerminalApp::implementation
// (which should be the default, see:
// https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-trackmouseevent#remarks)
unsigned int hoverTimeoutMillis{ 400 };
if (FAILED(SystemParametersInfoW(SPI_GETMOUSEHOVERTIME, 0, &hoverTimeoutMillis, 0)))
{
hoverTimeoutMillis = 400;
}
LOG_IF_WIN32_BOOL_FALSE(SystemParametersInfoW(SPI_GETMOUSEHOVERTIME, 0, &hoverTimeoutMillis, 0));
const auto toolTipInterval = std::chrono::milliseconds(hoverTimeoutMillis);
// Create a ThrottledFunc for opening the tooltip after the hover
// timeout. If we hover another button, we should make sure to call
// Run() with the new button. Calling `_displayToolTip.Run(nullptr)`,
// which will cause us to not display a tooltip, which is used when we
// leave the control entirely.
_displayToolTip = std::make_shared<ThrottledFunc<Controls::Button>>(
_displayToolTip = std::make_shared<ThrottledFuncTrailing<Controls::Button>>(
dispatcher,
til::throttled_func_options{
.delay = std::chrono::milliseconds{ hoverTimeoutMillis },
.debounce = true,
.trailing = true,
},
toolTipInterval,
[weakThis = get_weak()](Controls::Button button) {
// If we provide a button, then open the tooltip on that button.
// We can "dismiss" this throttled func by calling it with null,

View File

@@ -32,7 +32,7 @@ namespace winrt::TerminalApp::implementation
til::typed_event<TerminalApp::MinMaxCloseControl, winrt::Windows::UI::Xaml::RoutedEventArgs> MaximizeClick;
til::typed_event<TerminalApp::MinMaxCloseControl, winrt::Windows::UI::Xaml::RoutedEventArgs> CloseClick;
std::shared_ptr<ThrottledFunc<winrt::Windows::UI::Xaml::Controls::Button>> _displayToolTip{ nullptr };
std::shared_ptr<ThrottledFuncTrailing<winrt::Windows::UI::Xaml::Controls::Button>> _displayToolTip{ nullptr };
std::optional<CaptionButton> _lastPressedButton{ std::nullopt };
};
}

View File

@@ -1161,12 +1161,10 @@ void Pane::SetActive()
// focused, else the profile of the last control to be focused
Profile Pane::GetFocusedProfile()
{
if (auto lastFocused{ GetActivePane() })
auto lastFocused = GetActivePane();
if (const auto& terminalPane{ lastFocused->_getTerminalContent() })
{
if (const auto& terminalPane{ lastFocused->_getTerminalContent() })
{
return terminalPane.GetProfile();
}
return terminalPane.GetProfile();
}
return nullptr;
}

View File

@@ -270,9 +270,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>Registerkarte kopieren</value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>Mindestens eine in den Einstellungen angegebene Ressource (z. B. icon oder backgroundImage) wurde nicht gefunden.</value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>Profil mit einem ungültigen "backgroundImage" gefunden. Dieses Profil hat standardmäßig kein Hintergrundbild. Stellen Sie sicher, dass beim Festlegen eines "backgroundImage" der Wert ein gültiger Dateipfad zu einem Bild ist.</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>Profil mit einem ungültigen "icon" gefunden. Dieses Profil hat standardmäßig kein Symbol. Stellen Sie sicher, dass beim Festlegen eines "icon" der Wert ein gültiger Dateipfad zu einem Bild ist.</value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>Beim Analysieren Ihrer Tastenzuordnungen wurden Warnungen gefunden:</value>

View File

@@ -271,9 +271,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>Duplicate tab</value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>One or more resources (such as icon or backgroundImage) specified in your settings could not be found.</value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>Found a profile with an invalid "backgroundImage". Defaulting that profile to have no background image. Make sure that when setting a "backgroundImage", the value is a valid file path to an image.</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>Found a profile with an invalid "icon". Defaulting that profile to have no icon. Make sure that when setting an "icon", the value is a valid file path to an image.</value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>Warnings were found while parsing your keybindings:</value>

View File

@@ -267,9 +267,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>Duplicar pestaña</value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>No se encontraron uno o varios recursos (como icon o backgroundImage) especificados en la configuración.</value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>Se encontró un perfil con un "backgroundImage" no válido. Si se predetermina que ese perfil no tiene imagen de fondo. Asegúrese de que al establecer "backgroundImage", el valor sea una ruta de acceso de archivo válida a una imagen.</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>Se encontró un perfil con un "icon" no válido. Estableciendo ese perfil para no tener icono. Asegúrese de que, al establecer un "icon", el valor es una ruta de acceso de archivo válida a una imagen.</value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>Se encontraron advertencias al analizar los enlaces de teclado:</value>

View File

@@ -267,9 +267,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>Dupliquer longlet</value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>Une ou plusieurs ressources (telles que icon ou backgroundImage) spécifiées dans vos paramètres sont introuvables.</value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>Profil détecté avec une "backgroundImage" non valide. Par défaut, ce profil ne possède pas dimage darrière-plan. Assurez-vous que lorsque vous définissez une "backgroundImage", la valeur est un chemin daccès de fichier valide vers une image.</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>Profil détecté avec une "icon" non valide. Par défaut, ce profil ne possède pas dicône. Assurez-vous que lorsque vous définissez une "icon", la valeur est un chemin daccès de fichier valide vers une image.</value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>Des avertissements ont été détectés lors de lanalyse de vos combinaisons de touches :</value>

View File

@@ -267,9 +267,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>Duplica scheda</value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>Impossibile trovare una o più risorse, ad esempio icon o backgroundImage, specificate nelle impostazioni.</value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>È stato trovato un profilo con un "backgroundImage" non valido. Impostazione predefinita per il profilo non è disponibile un'immagine di sfondo. Accertarsi che quando si imposta un "backgroundImage", il valore è un percorso di file valido per un'immagine.</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>Trovato un profilo con "icon" non valida. Impostare il profilo senza icon. Assicurarsi che, quando si imposta una "icon", il valore abbia un percorso file valido per un'immagine.</value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>Sono stati trovati avvisi durante l'analisi delle associazioni di tasti:</value>

View File

@@ -268,9 +268,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>タブを複製する</value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>設定で指定された 1 つ以上のリソース (icon や backgroundImage など) が見つかりませんでした。</value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>無効な "backgroundImage" を持つプロファイルが見つかりました。既定では、そのプロファイルに背景画像はありません。"backgroundImage" を設定するときに、値が画像への有効なファイル パスとなっていることをご確認ください。</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>無効な "icon" を持つプロファイルが見つかりました。既定では、そのプロファイルにアイコンはありません。"icon" を設定するときに、値が画像への有効なファイル パスとなっていることをご確認ください。</value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>キー バインドの解析中に警告が検出されました:</value>

View File

@@ -267,9 +267,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>탭 복제</value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>설정에 지정된 하나 이상의 리소스(예: icon 또는 backgroundImage)찾을 수 없습니다.</value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>잘못된 "backgroundImage" 프로필을 찾았습니다. 해당 프로필을 배경 이미지가 없는 기본값으로 설정합니다. "backgroundImage"설정할 때 값이 이미지에 대한 유효한 파일 경로인지 확인합니다.</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>잘못된 "icon"이 있는 프로필을 발견했습니다. 해당 프로필에 아이콘이 없도록 기본값을 설정합니다. "icon" 설정 시 값이 이미지에 대한 올바른 파일 경로인지 확인합니다.</value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>키 바인딩 구문을 분석하는 동안 경고를 발견했습니다.</value>

View File

@@ -267,9 +267,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>Duplicar guia</value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>Um ou mais recursos (como icon ou backgroundImage) especificados em suas configurações não foram encontrados.</value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>Foi encontrado um perfil com um "backgroundImage" inválido. O perfil deve ser o padrão para que não haja nenhuma imagem de tela de fundo. Certifique-se de que, ao definir um "backgroundImage", o valor é um caminho de arquivo válido para uma imagem.</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>Foi encontrado um perfil com um "icon" inválido. Padronize esse perfil para ele não ter ícone. Certifique-se de que, ao definir um "icon", o valor seja um caminho de arquivo válido para uma imagem.</value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>Os avisos foram encontrados durante a análise das suas ligações de teclas:</value>

View File

@@ -271,9 +271,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>Ďϋφľіčάтέ τàв !!! </value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>Ωňę бггě яėŝǿüґсėş (šυćн âş icon ōя backgroundImage) ŝрěçìƒįєð ίπ ýőūŕ ŝėтťīлġš ċòŭĺð йöŧ вέ ƒòúпď. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! </value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>₣σúŋδ ą φѓοƒĩļé ẃϊţħ äй ïηνàĺìď "backgroundImage". Đēƒãųŀŧϊпğ ťнªт φѓőƒĭļè το нªνе πō ьąçќġгθúпδ ιмãġė. Маĸē śμѓē ŧћäţ ẁђēή šêťτϊлġ å "backgroundImage", ţĥě νаłųё ïŝ ά νάľîď ƒĩŀê φąťħ ţŏ άń ΐмąġė. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>₣ǿũиđ à рřöƒϊℓз ŵĩţн аñ įņνàŀїδ "icon". Ðěƒаúľτīŋğ ţħаτ ρřόƒìŀё тб ђâνє пǿ íčой. Мàĸë ŝùřë ŧĥаţ ωĥĕл ŝеτŧīлĝ ăй "icon", τħε νāłϋë ïŝ ă νàľīđ ƒïŀè рªтн ţő äи ïмäģё. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! </value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>Щαѓńΐňģš ώĕřе ƒбŭπδ ώħīļë рăяşìⁿġ ўσυŕ κёỳвĩиðīήġş: !!! !!! !!! !!! !!!</value>

View File

@@ -271,9 +271,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>Ďϋφľіčάтέ τàв !!! </value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>Ωňę бггě яėŝǿüґсėş (šυćн âş icon ōя backgroundImage) ŝрěçìƒįєð ίπ ýőūŕ ŝėтťīлġš ċòŭĺð йöŧ вέ ƒòúпď. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! </value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>₣σúŋδ ą φѓοƒĩļé ẃϊţħ äй ïηνàĺìď "backgroundImage". Đēƒãųŀŧϊпğ ťнªт φѓőƒĭļè το нªνе πō ьąçќġгθúпδ ιмãġė. Маĸē śμѓē ŧћäţ ẁђēή šêťτϊлġ å "backgroundImage", ţĥě νаłųё ïŝ ά νάľîď ƒĩŀê φąťħ ţŏ άń ΐмąġė. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>₣ǿũиđ à рřöƒϊℓз ŵĩţн аñ įņνàŀїδ "icon". Ðěƒаúľτīŋğ ţħаτ ρřόƒìŀё тб ђâνє пǿ íčой. Мàĸë ŝùřë ŧĥаţ ωĥĕл ŝеτŧīлĝ ăй "icon", τħε νāłϋë ïŝ ă νàľīđ ƒïŀè рªтн ţő äи ïмäģё. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! </value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>Щαѓńΐňģš ώĕřе ƒбŭπδ ώħīļë рăяşìⁿġ ўσυŕ κёỳвĩиðīήġş: !!! !!! !!! !!! !!!</value>

View File

@@ -271,9 +271,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>Ďϋφľіčάтέ τàв !!! </value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>Ωňę бггě яėŝǿüґсėş (šυćн âş icon ōя backgroundImage) ŝрěçìƒįєð ίπ ýőūŕ ŝėтťīлġš ċòŭĺð йöŧ вέ ƒòúпď. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! </value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>₣σúŋδ ą φѓοƒĩļé ẃϊţħ äй ïηνàĺìď "backgroundImage". Đēƒãųŀŧϊпğ ťнªт φѓőƒĭļè το нªνе πō ьąçќġгθúпδ ιмãġė. Маĸē śμѓē ŧћäţ ẁђēή šêťτϊлġ å "backgroundImage", ţĥě νаłųё ïŝ ά νάľîď ƒĩŀê φąťħ ţŏ άń ΐмąġė. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>₣ǿũиđ à рřöƒϊℓз ŵĩţн аñ įņνàŀїδ "icon". Ðěƒаúľτīŋğ ţħаτ ρřόƒìŀё тб ђâνє пǿ íčой. Мàĸë ŝùřë ŧĥаţ ωĥĕл ŝеτŧīлĝ ăй "icon", τħε νāłϋë ïŝ ă νàľīđ ƒïŀè рªтн ţő äи ïмäģё. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! </value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>Щαѓńΐňģš ώĕřе ƒбŭπδ ώħīļë рăяşìⁿġ ўσυŕ κёỳвĩиðīήġş: !!! !!! !!! !!! !!!</value>

View File

@@ -267,9 +267,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>Дублировать вкладку</value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>Не удалось найти один или несколько ресурсов (icon или backgroundImage), указанных в параметрах.</value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>Найден профиль с недопустимым объектом "backgroundImage". По умолчанию для этого профиля не используется фоновое изображение. Убедитесь, что значение, заданное для "backgroundImage", является допустимым путем файла к изображению.</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>Найден профиль с недопустимым объектом "icon". По умолчанию для этого профиля не используется значок. Убедитесь, что значение, заданное для "icon", является допустимым путем файла к изображению.</value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>При анализе настраиваемых сочетаний клавиш найдены предупреждения:</value>

View File

@@ -267,9 +267,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>复制标签页</value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>找不到设置中指定的一个或多个资源 (,如 icon 或 backgroundImage)。</value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>找到一个具有无效 "backgroundImage" 的配置文件。将该配置文件设置为默认设置为不包含背景图像。请确保在设置 "backgroundImage" 时,该值是指向图像的有效文件路径。</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>找到一个带有无效 "icon" 的配置文件。将该配置文件默认为无图标。确保设置 "icon" 时,该值是图像的有效文件路径。</value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>分析键绑定时发现警告:</value>

View File

@@ -267,9 +267,13 @@
<data name="DuplicateTabText" xml:space="preserve">
<value>複製索引標籤</value>
</data>
<data name="InvalidMediaResource" xml:space="preserve">
<value>找不到一或多個資源 (,例如在您的設定中指定的 icon 或 backgroundImage)。</value>
<comment>{Locked="icon","backgroundImage"} Indicates that something has gone wrong while reading a user's settings.</comment>
<data name="InvalidBackgroundImage" xml:space="preserve">
<value>找到具有無效 "backgroundImage" 的設定檔。將該設定檔的預設值設為沒有背景影像。請確定設定 "backgroundImage" 時,該值是影像的有效檔案路徑。</value>
<comment>{Locked="\"backgroundImage\""}</comment>
</data>
<data name="InvalidIcon" xml:space="preserve">
<value>已發現具有無效 "icon" 的設定檔。將該設定檔預設為無圖示。設定 "icon" 時,請確認值是有效的影像檔案路徑。</value>
<comment>{Locked="\"icon\""} The word "icon" in quotes is locked, the word icon OUTSIDE of quotes should be localized.</comment>
</data>
<data name="AtLeastOneKeybindingWarning" xml:space="preserve">
<value>剖析金鑰繫結時發現警告:</value>

View File

@@ -8,8 +8,8 @@
#include "SettingsPaneContent.h"
#include "Tab.g.cpp"
#include "Utils.h"
#include "ColorHelper.h"
#include "AppLogic.h"
#include "../../types/inc/ColorFix.hpp"
using namespace winrt;
using namespace winrt::Windows::UI::Xaml;
@@ -1035,49 +1035,27 @@ namespace winrt::TerminalApp::implementation
void Tab::_AttachEventHandlersToContent(const uint32_t paneId, const TerminalApp::IPaneContent& content)
{
auto weakThis{ get_weak() };
auto dispatcher = DispatcherQueue::GetForCurrentThread();
auto dispatcher = TabViewItem().Dispatcher();
ContentEventTokens events{};
auto throttledTitleChanged = std::make_shared<ThrottledFunc<>>(
dispatcher,
til::throttled_func_options{
.delay = std::chrono::milliseconds{ 200 },
.leading = true,
.trailing = true,
},
[weakThis]() {
if (const auto tab = weakThis.get())
{
tab->UpdateTitle();
}
});
events.TitleChanged = content.TitleChanged(
winrt::auto_revoke,
[func = std::move(throttledTitleChanged)](auto&&, auto&&) {
func->Run();
});
auto throttledTaskbarProgressChanged = std::make_shared<ThrottledFunc<>>(
dispatcher,
til::throttled_func_options{
.delay = std::chrono::milliseconds{ 200 },
.leading = true,
.trailing = true,
},
[weakThis]() {
if (const auto tab = weakThis.get())
[dispatcher, weakThis](auto&&, auto&&) -> safe_void_coroutine {
// The lambda lives in the `std::function`-style container owned by `control`. That is, when the
// `control` gets destroyed the lambda struct also gets destroyed. In other words, we need to
// copy `weakThis` onto the stack, because that's the only thing that gets captured in coroutines.
// See: https://devblogs.microsoft.com/oldnewthing/20211103-00/?p=105870
const auto weakThisCopy = weakThis;
co_await wil::resume_foreground(dispatcher);
// Check if Tab's lifetime has expired
if (auto tab{ weakThisCopy.get() })
{
tab->_UpdateProgressState();
// The title of the control changed, but not necessarily the title of the tab.
// Set the tab's text to the active panes' text.
tab->UpdateTitle();
}
});
events.TaskbarProgressChanged = content.TaskbarProgressChanged(
winrt::auto_revoke,
[func = std::move(throttledTaskbarProgressChanged)](auto&&, auto&&) {
func->Run();
});
events.TabColorChanged = content.TabColorChanged(
winrt::auto_revoke,
[dispatcher, weakThis](auto&&, auto&&) -> safe_void_coroutine {
@@ -1093,6 +1071,18 @@ namespace winrt::TerminalApp::implementation
}
});
events.TaskbarProgressChanged = content.TaskbarProgressChanged(
winrt::auto_revoke,
[dispatcher, weakThis](auto&&, auto&&) -> safe_void_coroutine {
const auto weakThisCopy = weakThis;
co_await wil::resume_foreground(dispatcher);
// Check if Tab's lifetime has expired
if (auto tab{ weakThisCopy.get() })
{
tab->_UpdateProgressState();
}
});
events.ConnectionStateChanged = content.ConnectionStateChanged(
winrt::auto_revoke,
[dispatcher, weakThis](auto&&, auto&&) -> safe_void_coroutine {
@@ -2127,9 +2117,9 @@ namespace winrt::TerminalApp::implementation
// - The value to populate in the title run of the tool tip
winrt::hstring Tab::_CreateToolTipTitle()
{
if (const auto profile{ GetFocusedProfile() })
if (const auto& control{ GetActiveTerminalControl() })
{
const auto profileName{ profile.Name() };
const auto profileName{ control.Settings().ProfileName() };
if (profileName != Title())
{
return winrt::hstring{ fmt::format(FMT_COMPILE(L"{}: {}"), profileName, Title()) };
@@ -2285,13 +2275,11 @@ namespace winrt::TerminalApp::implementation
// the background color
// - This method should only be called on the UI thread.
// Arguments:
// - uiColor: the color the user picked for their tab
// - color: the color the user picked for their tab
// Return Value:
// - <none>
void Tab::_ApplyTabColorOnUIThread(const winrt::Windows::UI::Color& uiColor)
void Tab::_ApplyTabColorOnUIThread(const winrt::Windows::UI::Color& color)
{
constexpr auto lightnessThreshold = 0.6f;
const til::color color{ uiColor };
Media::SolidColorBrush selectedTabBrush{};
Media::SolidColorBrush deselectedTabBrush{};
Media::SolidColorBrush fontBrush{};
@@ -2304,7 +2292,7 @@ namespace winrt::TerminalApp::implementation
// calculate the luminance of the current color and select a font
// color based on that
// see https://www.w3.org/TR/WCAG20/#relativeluminancedef
if (ColorFix::GetLightness(color) >= lightnessThreshold)
if (TerminalApp::ColorHelper::IsBrightColor(color))
{
auto subtleFillColorSecondary = winrt::Windows::UI::Colors::Black();
subtleFillColorSecondary.A = 0x09;
@@ -2324,8 +2312,8 @@ namespace winrt::TerminalApp::implementation
}
// The tab font should be based on the evaluated appearance of the tab color layered on tab row.
const auto layeredTabColor = color.layer_over(_tabRowColor);
if (ColorFix::GetLightness(layeredTabColor) >= lightnessThreshold)
const auto layeredTabColor = til::color{ color }.layer_over(_tabRowColor);
if (TerminalApp::ColorHelper::IsBrightColor(layeredTabColor))
{
fontBrush.Color(winrt::Windows::UI::Colors::Black());
auto secondaryFontColor = winrt::Windows::UI::Colors::Black();
@@ -2345,7 +2333,8 @@ namespace winrt::TerminalApp::implementation
selectedTabBrush.Color(color);
// Start with the current tab color, set to Opacity=.3
auto deselectedTabColor = color.with_alpha(77); // 255 * .3 = 77
til::color deselectedTabColor{ color };
deselectedTabColor = deselectedTabColor.with_alpha(77); // 255 * .3 = 77
// If we DON'T have a color set from the color picker, or the profile's
// tabColor, but we do have a unfocused color in the theme, use the
@@ -2387,7 +2376,7 @@ namespace winrt::TerminalApp::implementation
// We don't want that to result in white text on a white tab row for
// inactive tabs.
const auto deselectedActualColor = deselectedTabColor.layer_over(_tabRowColor);
if (ColorFix::GetLightness(deselectedActualColor) >= lightnessThreshold)
if (TerminalApp::ColorHelper::IsBrightColor(deselectedActualColor))
{
deselectedFontBrush.Color(winrt::Windows::UI::Colors::Black());
}

View File

@@ -21,8 +21,8 @@ namespace TerminalApp
UInt32 TabViewIndex;
UInt32 TabViewNumTabs;
void Focus(Windows.UI.Xaml.FocusState focusState);
void Shutdown();
overridable void Focus(Windows.UI.Xaml.FocusState focusState);
overridable void Shutdown();
void SetDispatch(ShortcutActionDispatch dispatch);
}

View File

@@ -18,9 +18,9 @@
#include <LibraryResources.h>
#include "TabRowControl.h"
#include "ColorHelper.h"
#include "DebugTapConnection.h"
#include "..\TerminalSettingsModel\FileUtils.h"
#include "../TerminalSettingsAppAdapterLib/TerminalSettings.h"
#include <shlobj.h>
@@ -75,7 +75,7 @@ namespace winrt::TerminalApp::implementation
{
return S_FALSE;
}
const auto settings{ Settings::TerminalSettings::CreateWithNewTerminalArgs(_settings, newTerminalArgs) };
const auto settings{ TerminalSettings::CreateWithNewTerminalArgs(_settings, newTerminalArgs, *_bindings) };
// Try to handle auto-elevation
if (_maybeElevate(newTerminalArgs, settings, profile))
@@ -158,7 +158,12 @@ namespace winrt::TerminalApp::implementation
// Set this tab's icon to the icon from the content
_UpdateTabIcon(*newTabImpl);
// This is necessary, because WinUI does not have support for middle clicks.
// Its Tapped event doesn't provide the information what button was used either.
tabViewItem.PointerPressed({ this, &TerminalPage::_OnTabPointerPressed });
tabViewItem.PointerReleased({ this, &TerminalPage::_OnTabPointerReleased });
tabViewItem.PointerExited({ this, &TerminalPage::_OnTabPointerExited });
tabViewItem.PointerEntered({ this, &TerminalPage::_OnTabPointerEntered });
// When the tab requests close, try to close it (prompt for approval, if required)
newTabImpl->CloseRequested([weakTab, weakThis{ get_weak() }](auto&& /*s*/, auto&& /*e*/) {
@@ -660,7 +665,7 @@ namespace winrt::TerminalApp::implementation
// Method Description:
// - returns a tab corresponding to a view item. This might return null,
// so make sure to check the result!
winrt::TerminalApp::Tab TerminalPage::_GetTabByTabViewItem(const IInspectable& tabViewItem) const noexcept
winrt::TerminalApp::Tab TerminalPage::_GetTabByTabViewItem(const Microsoft::UI::Xaml::Controls::TabViewItem& tabViewItem) const noexcept
{
uint32_t tabIndexFromControl{};
const auto items{ _tabView.TabItems() };
@@ -872,64 +877,60 @@ namespace winrt::TerminalApp::implementation
_UpdateTabView();
}
void TerminalPage::_OnTabPointerPressed(const IInspectable& sender, const Windows::UI::Xaml::Input::PointerRoutedEventArgs& e)
// Method Description:
// - Additional responses to clicking on a TabView's item. Currently, just remove tab with middle click
// Arguments:
// - sender: the control that originated this event (TabViewItem)
// - eventArgs: the event's constituent arguments
void TerminalPage::_OnTabPointerPressed(const IInspectable& sender, const Windows::UI::Xaml::Input::PointerRoutedEventArgs& eventArgs)
{
if (!_tabItemMiddleClickHookEnabled || !e.GetCurrentPoint(nullptr).Properties().IsMiddleButtonPressed())
if (eventArgs.GetCurrentPoint(nullptr).Properties().IsMiddleButtonPressed())
{
return;
}
const auto tabViewItem = sender.try_as<MUX::Controls::TabViewItem>();
if (!tabViewItem || !tabViewItem.CapturePointer(e.Pointer()))
{
return;
}
_tabItemMiddleClickExited = false;
_tabItemMiddleClickPointerEntered = tabViewItem.PointerEntered(winrt::auto_revoke, [this](auto&&, auto&& e) {
_tabItemMiddleClickExited = false;
e.Handled(true);
});
_tabItemMiddleClickPointerExited = tabViewItem.PointerExited(winrt::auto_revoke, [this](auto&&, auto&& e) {
_tabItemMiddleClickExited = true;
e.Handled(true);
});
_tabItemMiddleClickPointerCaptureLost = tabViewItem.PointerCaptureLost(winrt::auto_revoke, [this](auto&& sender, auto&& e) {
// The WinUI TabView calls CapturePointer() internally and it's not reference counted,
// so when it calls ReleasePointerCapture() in its PointerReleased handler,
// we get a PointerCaptureLost before we receive the PointerReleased event.
// This makes typical handling of PointerReleased events on our side difficult.
// Well, whatever, now we just hook PointerCaptureLost because we know WinUI will trigger it.
_tabItemMiddleClickPointerEntered.revoke();
_tabItemMiddleClickPointerExited.revoke();
_tabItemMiddleClickPointerCaptureLost.revoke();
if (!_tabItemMiddleClickExited && !e.GetCurrentPoint(nullptr).Properties().IsMiddleButtonPressed())
if (const auto tabViewItem{ sender.try_as<MUX::Controls::TabViewItem>() })
{
_OnTabPointerReleasedCloseTab(std::move(sender));
_tabPointerMiddleButtonPressed = tabViewItem.CapturePointer(eventArgs.Pointer());
_tabPointerMiddleButtonExited = false;
}
e.Handled(true);
});
e.Handled(true);
eventArgs.Handled(true);
}
}
safe_void_coroutine TerminalPage::_OnTabPointerReleasedCloseTab(IInspectable sender)
// Method Description:
// - Tracking pointer state for tab remove
// Arguments:
// - sender: the control that originated this event (TabViewItem)
// - eventArgs: the event's constituent arguments
void TerminalPage::_OnTabPointerReleased(const IInspectable& sender, const Windows::UI::Xaml::Input::PointerRoutedEventArgs& eventArgs)
{
// WinUI asynchronously updates its tab view items, so it may happen that we're given a
// `TabViewItem` that still contains a `Tab` which has actually already been removed.
// First we must yield once, to flush out whatever TabView is currently doing.
const auto strong = get_strong();
co_await wil::resume_foreground(Dispatcher());
if (_tabPointerMiddleButtonPressed && !eventArgs.GetCurrentPoint(nullptr).Properties().IsMiddleButtonPressed())
{
_tabPointerMiddleButtonPressed = false;
if (auto tabViewItem{ sender.try_as<MUX::Controls::TabViewItem>() })
{
tabViewItem.ReleasePointerCapture(eventArgs.Pointer());
if (!_tabPointerMiddleButtonExited)
{
_OnTabPointerReleasedCloseTab(std::move(tabViewItem));
}
}
eventArgs.Handled(true);
}
}
safe_void_coroutine TerminalPage::_OnTabPointerReleasedCloseTab(winrt::Microsoft::UI::Xaml::Controls::TabViewItem sender)
{
const auto tab = _GetTabByTabViewItem(sender);
if (!tab)
{
co_return;
}
// WinUI asynchronously updates its tab view items, so it may happen that we're given a
// `TabViewItem` that still contains a `Tab` which has actually already been removed.
// First we must yield once, to flush out whatever TabView is currently doing.
const auto strong = get_strong();
co_await wil::resume_foreground(Dispatcher());
// `tab.Shutdown()` in `_RemoveTab()` sets the content to null = This checks if the tab is closed.
if (tab.Content())
{
@@ -937,6 +938,34 @@ namespace winrt::TerminalApp::implementation
}
}
// Method Description:
// - Tracking pointer state for tab remove
// Arguments:
// - sender: the control that originated this event (TabViewItem)
// - eventArgs: the event's constituent arguments
void TerminalPage::_OnTabPointerEntered(const IInspectable& /*sender*/, const Windows::UI::Xaml::Input::PointerRoutedEventArgs& eventArgs)
{
if (eventArgs.GetCurrentPoint(nullptr).Properties().IsMiddleButtonPressed())
{
_tabPointerMiddleButtonExited = false;
eventArgs.Handled(true);
}
}
// Method Description:
// - Tracking pointer state for tab remove
// Arguments:
// - sender: the control that originated this event (TabViewItem)
// - eventArgs: the event's constituent arguments
void TerminalPage::_OnTabPointerExited(const IInspectable& /*sender*/, const Windows::UI::Xaml::Input::PointerRoutedEventArgs& eventArgs)
{
if (eventArgs.GetCurrentPoint(nullptr).Properties().IsMiddleButtonPressed())
{
_tabPointerMiddleButtonExited = true;
eventArgs.Handled(true);
}
}
void TerminalPage::_UpdatedSelectedTab(const winrt::TerminalApp::Tab& tab)
{
// Unfocus all the tabs.
@@ -971,7 +1000,10 @@ namespace winrt::TerminalApp::implementation
tab.TabViewItem().StartBringIntoView();
// Raise an event that our title changed
TitleChanged.raise(*this, nullptr);
if (_settings.GlobalSettings().ShowTitleInTitlebar())
{
TitleChanged.raise(*this, tab.Title());
}
_updateThemeColors();
@@ -981,8 +1013,6 @@ namespace winrt::TerminalApp::implementation
auto profile = tabImpl->GetFocusedProfile();
_UpdateBackground(profile);
}
_adjustProcessPriorityThrottled->Run();
}
CATCH_LOG();
}

View File

@@ -26,7 +26,6 @@
<TerminalCppWinrt>true</TerminalCppWinrt>
<TerminalMUX>true</TerminalMUX>
<TerminalWinGetInterop>true</TerminalWinGetInterop>
<TerminalThemeHelpers>true</TerminalThemeHelpers>
</PropertyGroup>
<Import Project="..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
<Import Project="$(OpenConsoleDir)src\common.nugetversions.props" />
@@ -135,6 +134,7 @@
<ClInclude Include="FilteredCommand.h" />
<ClInclude Include="Pane.h" />
<ClInclude Include="fzf/fzf.h" />
<ClInclude Include="ColorHelper.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="ShortcutActionDispatch.h">
<DependentUpon>ShortcutActionDispatch.idl</DependentUpon>
@@ -174,7 +174,9 @@
<DependentUpon>TerminalPaneContent.idl</DependentUpon>
</ClInclude>
<ClInclude Include="Toast.h" />
<ClInclude Include="TerminalSettingsCache.h" />
<ClInclude Include="TerminalSettingsCache.h">
<DependentUpon>TerminalSettingsCache.idl</DependentUpon>
</ClInclude>
<ClInclude Include="SuggestionsControl.h">
<DependentUpon>SuggestionsControl.xaml</DependentUpon>
</ClInclude>
@@ -245,6 +247,9 @@
<ClCompile Include="FilteredCommand.cpp" />
<ClCompile Include="Pane.cpp" />
<ClCompile Include="Pane.LayoutSizeNode.cpp" />
<ClCompile Include="ColorHelper.cpp">
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="DebugTapConnection.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
@@ -287,7 +292,9 @@
</ClCompile>
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
<ClCompile Include="Toast.cpp" />
<ClCompile Include="TerminalSettingsCache.cpp" />
<ClCompile Include="TerminalSettingsCache.cpp">
<DependentUpon>TerminalSettingsCache.idl</DependentUpon>
</ClCompile>
<ClCompile Include="SuggestionsControl.cpp">
<DependentUpon>SuggestionsControl.xaml</DependentUpon>
</ClCompile>
@@ -362,6 +369,7 @@
<DependentUpon>TaskPaneContent.xaml</DependentUpon>
<SubType>Code</SubType>
</Midl>
<Midl Include="TerminalSettingsCache.idl" />
<Midl Include="MarkdownPaneContent.idl">
<DependentUpon>MarkdownPaneContent.xaml</DependentUpon>
<SubType>Code</SubType>
@@ -414,9 +422,6 @@
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\UIHelpers\UIHelpers.vcxproj">
<Project>{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}</Project>
</ProjectReference>
<ProjectReference Include="$(OpenConsoleDir)\src\cascadia\TerminalSettingsAppAdapterLib\TerminalSettingsAppAdapterLib.vcxproj">
<Project>{3c46e2b0-ae6c-4132-9122-6772fb411959}</Project>
</ProjectReference>
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\UIMarkdown\UIMarkdown.vcxproj">
<Project>{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}</Project>
<Private>true</Private>

View File

@@ -20,6 +20,7 @@
</ClCompile>
<ClCompile Include="AppCommandlineArgs.cpp" />
<ClCompile Include="Commandline.cpp" />
<ClCompile Include="ColorHelper.cpp" />
<ClCompile Include="DebugTapConnection.cpp" />
<ClCompile Include="Jumplist.cpp" />
<ClCompile Include="FilteredCommand.cpp">
@@ -47,6 +48,7 @@
<ClInclude Include="AppCommandlineArgs.h" />
<ClInclude Include="Commandline.h" />
<ClInclude Include="DebugTapConnection.h" />
<ClInclude Include="ColorHelper.h" />
<ClInclude Include="Jumplist.h" />
<ClInclude Include="FilteredCommand.h">
<Filter>commandPalette</Filter>
@@ -90,6 +92,7 @@
<Midl Include="TerminalWindow.idl" />
<Midl Include="TaskbarState.idl" />
<Midl Include="IPaneContent.idl" />
<Midl Include="TerminalSettingsCache.idl" />
<Midl Include="Monarch.idl" />
</ItemGroup>
<ItemGroup>

File diff suppressed because it is too large Load Diff

View File

@@ -3,8 +3,6 @@
#pragma once
#include <ThrottledFunc.h>
#include "TerminalPage.g.h"
#include "Tab.h"
#include "AppKeyBindings.h"
@@ -29,15 +27,8 @@ namespace Microsoft::Terminal::Core
class ControlKeyStates;
}
namespace winrt::Microsoft::Terminal::Settings
{
struct TerminalSettingsCreateResult;
}
namespace winrt::TerminalApp::implementation
{
struct TerminalSettingsCache;
inline constexpr uint32_t DefaultRowsToScroll{ 3 };
inline constexpr std::wstring_view TabletInputServiceKey{ L"TabletInputService" };
@@ -158,7 +149,7 @@ namespace winrt::TerminalApp::implementation
safe_void_coroutine ProcessStartupActions(std::vector<Microsoft::Terminal::Settings::Model::ActionAndArgs> actions,
const winrt::hstring cwd = winrt::hstring{},
const winrt::hstring env = winrt::hstring{});
safe_void_coroutine CreateTabFromConnection(winrt::Microsoft::Terminal::TerminalConnection::ITerminalConnection connection);
void CreateTabFromConnection(winrt::Microsoft::Terminal::TerminalConnection::ITerminalConnection connection);
TerminalApp::WindowProperties WindowProperties() const noexcept { return _WindowProperties; };
@@ -178,7 +169,7 @@ namespace winrt::TerminalApp::implementation
til::property_changed_event PropertyChanged;
// -------------------------------- WinRT Events ---------------------------------
til::typed_event<IInspectable, IInspectable> TitleChanged;
til::typed_event<IInspectable, winrt::hstring> TitleChanged;
til::typed_event<IInspectable, IInspectable> CloseWindowRequested;
til::typed_event<IInspectable, winrt::Windows::UI::Xaml::UIElement> SetTitleBarContent;
til::typed_event<IInspectable, IInspectable> FocusModeChanged;
@@ -282,7 +273,7 @@ namespace winrt::TerminalApp::implementation
TerminalApp::ContentManager _manager{ nullptr };
std::shared_ptr<TerminalSettingsCache> _terminalSettingsCache{};
TerminalApp::TerminalSettingsCache _terminalSettingsCache{ nullptr };
struct StashedDragData
{
@@ -318,7 +309,7 @@ namespace winrt::TerminalApp::implementation
std::wstring _evaluatePathForCwd(std::wstring_view path);
winrt::Microsoft::Terminal::TerminalConnection::ITerminalConnection _CreateConnectionFromSettings(Microsoft::Terminal::Settings::Model::Profile profile, Microsoft::Terminal::Control::IControlSettings settings, const bool inheritCursor);
winrt::Microsoft::Terminal::TerminalConnection::ITerminalConnection _CreateConnectionFromSettings(Microsoft::Terminal::Settings::Model::Profile profile, Microsoft::Terminal::Settings::Model::TerminalSettings settings, const bool inheritCursor);
winrt::Microsoft::Terminal::TerminalConnection::ITerminalConnection _duplicateConnectionForRestart(const TerminalApp::TerminalPaneContent& paneContent);
void _restartPaneConnection(const TerminalApp::TerminalPaneContent&, const winrt::Windows::Foundation::IInspectable&);
@@ -368,11 +359,8 @@ namespace winrt::TerminalApp::implementation
bool _MovePane(const Microsoft::Terminal::Settings::Model::MovePaneArgs args);
bool _MoveTab(winrt::com_ptr<Tab> tab, const Microsoft::Terminal::Settings::Model::MoveTabArgs args);
std::shared_ptr<ThrottledFunc<>> _adjustProcessPriorityThrottled;
void _adjustProcessPriority() const;
template<typename F>
bool _ApplyToActiveControls(F f) const
bool _ApplyToActiveControls(F f)
{
if (const auto tab{ _GetFocusedTabImpl() })
{
@@ -391,12 +379,12 @@ namespace winrt::TerminalApp::implementation
return false;
}
winrt::Microsoft::Terminal::Control::TermControl _GetActiveControl() const;
winrt::Microsoft::Terminal::Control::TermControl _GetActiveControl();
std::optional<uint32_t> _GetFocusedTabIndex() const noexcept;
std::optional<uint32_t> _GetTabIndex(const TerminalApp::Tab& tab) const noexcept;
TerminalApp::Tab _GetFocusedTab() const noexcept;
winrt::com_ptr<Tab> _GetFocusedTabImpl() const noexcept;
TerminalApp::Tab _GetTabByTabViewItem(const IInspectable& tabViewItem) const noexcept;
TerminalApp::Tab _GetTabByTabViewItem(const Microsoft::UI::Xaml::Controls::TabViewItem& tabViewItem) const noexcept;
void _HandleClosePaneRequested(std::shared_ptr<Pane> pane);
safe_void_coroutine _SetFocusedTab(const winrt::TerminalApp::Tab tab);
@@ -425,11 +413,10 @@ namespace winrt::TerminalApp::implementation
bool _IsUriSupported(const winrt::Windows::Foundation::Uri& parsedUri);
void _ShowCouldNotOpenDialog(winrt::hstring reason, winrt::hstring uri);
bool _CopyText(bool dismissSelection, bool singleLine, bool withControlSequences, Microsoft::Terminal::Control::CopyFormat formats);
bool _CopyText(const bool dismissSelection, const bool singleLine, const bool withControlSequences, const Windows::Foundation::IReference<Microsoft::Terminal::Control::CopyFormat>& formats);
safe_void_coroutine _SetTaskbarProgressHandler(const IInspectable sender, const IInspectable eventArgs);
void _copyToClipboard(IInspectable, Microsoft::Terminal::Control::WriteToClipboardEventArgs args) const;
void _PasteText();
safe_void_coroutine _ControlNoticeRaisedHandler(const IInspectable sender, const Microsoft::Terminal::Control::NoticeEventArgs eventArgs);
@@ -440,18 +427,13 @@ namespace winrt::TerminalApp::implementation
void _TabDragStarted(const IInspectable& sender, const IInspectable& eventArgs);
void _TabDragCompleted(const IInspectable& sender, const IInspectable& eventArgs);
// BODGY: WinUI's TabView has a broken close event handler:
// If the close button is disabled, middle-clicking the tab raises no close
// event. Because that's dumb, we implement our own middle-click handling.
// `_tabItemMiddleClickHookEnabled` is true whenever the close button is hidden,
// and that enables all of the rest of this machinery (and this workaround).
bool _tabItemMiddleClickHookEnabled = false;
bool _tabItemMiddleClickExited = false;
PointerEntered_revoker _tabItemMiddleClickPointerEntered;
PointerExited_revoker _tabItemMiddleClickPointerExited;
PointerCaptureLost_revoker _tabItemMiddleClickPointerCaptureLost;
bool _tabPointerMiddleButtonPressed{ false };
bool _tabPointerMiddleButtonExited{ false };
void _OnTabPointerPressed(const IInspectable& sender, const Windows::UI::Xaml::Input::PointerRoutedEventArgs& eventArgs);
safe_void_coroutine _OnTabPointerReleasedCloseTab(IInspectable sender);
void _OnTabPointerReleased(const IInspectable& sender, const Windows::UI::Xaml::Input::PointerRoutedEventArgs& eventArgs);
safe_void_coroutine _OnTabPointerReleasedCloseTab(winrt::Microsoft::UI::Xaml::Controls::TabViewItem sender);
void _OnTabPointerEntered(const IInspectable& sender, const Windows::UI::Xaml::Input::PointerRoutedEventArgs& eventArgs);
void _OnTabPointerExited(const IInspectable& sender, const Windows::UI::Xaml::Input::PointerRoutedEventArgs& eventArgs);
void _OnTabSelectionChanged(const IInspectable& sender, const Windows::UI::Xaml::Controls::SelectionChangedEventArgs& eventArgs);
void _OnTabItemsChanged(const IInspectable& sender, const Windows::Foundation::Collections::IVectorChangedEventArgs& eventArgs);
@@ -466,7 +448,7 @@ namespace winrt::TerminalApp::implementation
void _Find(const Tab& tab);
winrt::Microsoft::Terminal::Control::TermControl _CreateNewControlAndContent(const winrt::Microsoft::Terminal::Settings::TerminalSettingsCreateResult& settings,
winrt::Microsoft::Terminal::Control::TermControl _CreateNewControlAndContent(const winrt::Microsoft::Terminal::Settings::Model::TerminalSettingsCreateResult& settings,
const winrt::Microsoft::Terminal::TerminalConnection::ITerminalConnection& connection);
winrt::Microsoft::Terminal::Control::TermControl _SetupControl(const winrt::Microsoft::Terminal::Control::TermControl& term);
winrt::Microsoft::Terminal::Control::TermControl _AttachControlToContent(const uint64_t& contentGuid);
@@ -481,7 +463,7 @@ namespace winrt::TerminalApp::implementation
void _RefreshUIForSettingsReload();
void _SetNewTabButtonColor(til::color color, til::color accentColor);
void _SetNewTabButtonColor(const Windows::UI::Color& color, const Windows::UI::Color& accentColor);
void _ClearNewTabButtonColor();
safe_void_coroutine _CompleteInitialization();
@@ -521,7 +503,7 @@ namespace winrt::TerminalApp::implementation
winrt::Microsoft::Terminal::Settings::Model::Profile GetClosestProfileForDuplicationOfProfile(const winrt::Microsoft::Terminal::Settings::Model::Profile& profile) const noexcept;
bool _maybeElevate(const winrt::Microsoft::Terminal::Settings::Model::NewTerminalArgs& newTerminalArgs,
const winrt::Microsoft::Terminal::Settings::TerminalSettingsCreateResult& controlSettings,
const winrt::Microsoft::Terminal::Settings::Model::TerminalSettingsCreateResult& controlSettings,
const winrt::Microsoft::Terminal::Settings::Model::Profile& profile);
void _OpenElevatedWT(winrt::Microsoft::Terminal::Settings::Model::NewTerminalArgs newTerminalArgs);

View File

@@ -82,7 +82,7 @@ namespace TerminalApp
void WindowActivated(Boolean activated);
void SendContentToOther(RequestReceiveContentArgs args);
event Windows.Foundation.TypedEventHandler<Object, Object> TitleChanged;
event Windows.Foundation.TypedEventHandler<Object, String> TitleChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> CloseWindowRequested;
event Windows.Foundation.TypedEventHandler<Object, Windows.UI.Xaml.UIElement> SetTitleBarContent;
event Windows.Foundation.TypedEventHandler<Object, Object> FocusModeChanged;

Some files were not shown because too many files have changed in this diff Show More