Compare commits
26 commits
abd415723c
...
eda2fb1d58
| Author | SHA1 | Date | |
|---|---|---|---|
| eda2fb1d58 | |||
|
|
032a10796b | ||
|
|
f8ccd51d4a | ||
|
|
ad9a5bcc40 | ||
|
|
67b00d6392 | ||
|
|
c6ab857444 | ||
|
|
ba9c1aa69c | ||
|
|
5095059f90 | ||
|
|
69cdcbd1c1 | ||
|
|
7daf10e3b5 | ||
|
|
6bf0c65ca9 | ||
|
|
543cbb0cb8 | ||
|
|
33c3869c40 | ||
|
|
e28eebbfb2 | ||
|
|
17678baf55 | ||
|
|
5db18f3fac | ||
|
|
117644e9c1 | ||
|
|
01af42aff5 | ||
|
|
44d042f45d | ||
|
|
d05ed099b6 | ||
|
|
46f8b1a9cf | ||
|
|
1019e04b82 | ||
|
|
a43b5ae500 | ||
|
|
10ca3f1025 | ||
|
|
e3b1cda8ab | ||
|
|
6bd07a6363 |
38 changed files with 1406 additions and 1292 deletions
2073
Cargo.lock
generated
2073
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
13
Cargo.toml
13
Cargo.toml
|
|
@ -1,10 +1,10 @@
|
|||
[package]
|
||||
name = "cosmic-term"
|
||||
version = "1.3.0"
|
||||
version = "1.6.0"
|
||||
authors = ["Jeremy Soller <jeremy@system76.com>"]
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
rust-version = "1.90"
|
||||
rust-version = "1.93"
|
||||
|
||||
[dependencies]
|
||||
alacritty_terminal = "0.25.1"
|
||||
|
|
@ -51,7 +51,14 @@ package = "libcosmic-yoda"
|
|||
path = "../libcosmic"
|
||||
default-features = false
|
||||
#TODO: a11y feature crashes file chooser dialog
|
||||
features = ["about", "autosize", "multi-window", "tokio", "winit", "surface-message"]
|
||||
features = [
|
||||
"about",
|
||||
"autosize",
|
||||
"multi-window",
|
||||
"tokio",
|
||||
"winit",
|
||||
"surface-message",
|
||||
]
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
fork = "0.4"
|
||||
|
|
|
|||
24
debian/changelog
vendored
24
debian/changelog
vendored
|
|
@ -1,3 +1,27 @@
|
|||
cosmic-term (1.6.0) noble; urgency=medium
|
||||
|
||||
* Epoch 1.6.0 version update
|
||||
|
||||
-- Jeremy Soller <jeremy@system76.com> Tue, 18 Aug 2026 07:15:01 -0600
|
||||
|
||||
cosmic-term (1.5.0) noble; urgency=medium
|
||||
|
||||
* Epoch 1.5.0 version update
|
||||
|
||||
-- Jeremy Soller <jeremy@system76.com> Tue, 28 Jul 2026 09:15:04 -0600
|
||||
|
||||
cosmic-term (1.4.0) noble; urgency=medium
|
||||
|
||||
* Epoch 1.4.0 version update
|
||||
|
||||
-- Jeremy Soller <jeremy@system76.com> Mon, 20 Jul 2026 14:36:58 -0600
|
||||
|
||||
cosmic-term (1.3.0) noble; urgency=medium
|
||||
|
||||
* Epoch 1.3.0 version update
|
||||
|
||||
-- Jeremy Soller <jeremy@system76.com> Sun, 12 Jul 2026 13:22:28 -0600
|
||||
|
||||
cosmic-term (1.2.0) noble; urgency=medium
|
||||
|
||||
* Epoch 1.2.0 version update
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ settings = الإعدادات
|
|||
### Appearance
|
||||
|
||||
appearance = المظهر
|
||||
theme = النسق
|
||||
theme = السمة
|
||||
match-desktop = طابق سطح المكتب
|
||||
dark = داكن
|
||||
light = فاتح
|
||||
|
|
@ -88,7 +88,7 @@ new-window = نافذة جديدة
|
|||
profile = ملف التعريف
|
||||
menu-profiles = ملفات التعريف...
|
||||
close-tab = أغلق اللسان
|
||||
quit = أنهِ
|
||||
quit = إنهِ
|
||||
|
||||
## Edit
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
cancel = Cancel·lar
|
||||
settings = Configuració
|
||||
quit = Surt
|
||||
delete = Suprimeix
|
||||
rename = Canvia el nom
|
||||
name = Nom
|
||||
|
|
|
|||
|
|
@ -38,15 +38,15 @@ advanced-font-settings = Pokročilá nastavení písma
|
|||
default-font = Písmo
|
||||
default-font-size = Velikost písma
|
||||
default-font-stretch = Šířka písma
|
||||
default-font-weight = Normální tloušťka písma
|
||||
default-dim-font-weight = Tenká tloušťka písma
|
||||
default-bold-font-weight = Tučná tloušťka písma
|
||||
default-font-weight = Tloušťka normálního písma
|
||||
default-dim-font-weight = Tloušťka zeslabeného písma
|
||||
default-bold-font-weight = Tloušťka tučného písma
|
||||
use-bright-bold = Světlejší tučný text
|
||||
splits = Rozdělení
|
||||
focus-follow-mouse = Zaměření psaní sleduje myš
|
||||
advanced = Pokročilé
|
||||
show-headerbar = Zobrazit hlavičku
|
||||
show-header-description = Hlavičku je možné odkrýt z kontextového menu
|
||||
show-header-description = Hlavičku lze odkrýt z nabídky zobrazené po kliknutí pravým tlačítkem myši
|
||||
find-placeholder = Najít...
|
||||
find-previous = Najít předchozí
|
||||
find-next = Najít další
|
||||
|
|
@ -109,3 +109,4 @@ paste-primary = Vložit primární
|
|||
copy-link = Kopírovat odkaz
|
||||
tab-new-inherit-working-directory = Nové karty a okna používají aktuální adresář
|
||||
tab-new-inherit-working-directory-description = Otevírat nové karty a okna v pracovním adresáři aktivní karty
|
||||
show-pane-borders = Zobrazit ohraničení panelu
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
rename = Omdøb
|
||||
delete = Slet
|
||||
name = Navn
|
||||
cancel = Annuller
|
||||
quit = Afslut
|
||||
find-next = Find næste
|
||||
select-all = Vælg alle
|
||||
new-window = Nyt vindue
|
||||
edit = Redigér
|
||||
copy = Kopiér
|
||||
theme = Tema
|
||||
appearance = Udseende
|
||||
light = Lyst
|
||||
repository = Pakkearkiv
|
||||
paste = Indsæt
|
||||
menu-settings = Indstillinger...
|
||||
view = Vis
|
||||
dark = Mørkt
|
||||
match-desktop = Følg skrivebordets indstillinger
|
||||
find-previous = Find forrige
|
||||
find-placeholder = Find...
|
||||
default-zoom-step = Zoom-trin
|
||||
file = Fil
|
||||
find = Find
|
||||
support = Support
|
||||
settings = Indstillinger
|
||||
keyboard-shortcuts = Tastaturgenveje
|
||||
menu-keyboard-shortcuts = Tastaturgenveje…
|
||||
replace = Erstat
|
||||
close-tab = Luk fane
|
||||
new-tab = Ny fane
|
||||
|
|
@ -69,7 +69,7 @@ advanced = Erweitert
|
|||
show-headerbar = Kopfzeile anzeigen
|
||||
show-header-description = Kopfzeile über das Rechtsklick-Menü aufzeigen
|
||||
# Suchen
|
||||
find-placeholder = Suchen...
|
||||
find-placeholder = Suchen ...
|
||||
find-previous = Vorherigen suchen
|
||||
find-next = Nächsten suchen
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ file = Datei
|
|||
new-tab = Neuer Tab
|
||||
new-window = Neues Fenster
|
||||
profile = Profil
|
||||
menu-profiles = Profile...
|
||||
menu-profiles = Profile ...
|
||||
close-tab = Tab schließen
|
||||
quit = Beenden
|
||||
|
||||
|
|
@ -106,14 +106,14 @@ previous-tab = Vorheriger Tab
|
|||
split-horizontal = Horizontal teilen
|
||||
split-vertical = Vertikal teilen
|
||||
pane-toggle-maximize = Maximierung umschalten
|
||||
menu-color-schemes = Farbschemen...
|
||||
menu-settings = Einstellungen...
|
||||
menu-about = Über COSMIC Terminal...
|
||||
repository = Repository
|
||||
menu-color-schemes = Farbschemen ...
|
||||
menu-settings = Einstellungen ...
|
||||
menu-about = Über COSMIC Terminal ...
|
||||
repository = Repositorium
|
||||
cancel = Abbrechen
|
||||
keyboard-shortcuts = Tastenkombinationen
|
||||
open-link = Link öffnen
|
||||
menu-password-manager = Passwörter...
|
||||
menu-password-manager = Passwörter ...
|
||||
passwords-title = Passwörter
|
||||
add-password = Passwort hinzufügen
|
||||
password-input = Passwort
|
||||
|
|
@ -124,7 +124,7 @@ focus-pane-down = Bereich unten fokussieren
|
|||
focus-pane-left = Bereich links fokussieren
|
||||
focus-pane-right = Bereich rechts fokussieren
|
||||
focus-pane-up = Bereich oben fokussieren
|
||||
menu-keyboard-shortcuts = Tastenkombinationen...
|
||||
menu-keyboard-shortcuts = Tastenkombinationen ...
|
||||
no-shortcuts = Keine Tastenkombinationen
|
||||
password-manager = Passwortmanager
|
||||
replace = Ersetzen
|
||||
|
|
@ -137,7 +137,7 @@ shortcut-group-window = Fenster
|
|||
shortcut-replace-title = Tastenkombination ersetzen?
|
||||
tab-activate = Tab { $number } aktivieren
|
||||
copy-link = Link kopieren
|
||||
type-to-search = Zum Suchen tippen...
|
||||
type-to-search = Zum Suchen tippen ...
|
||||
close-window = Fenster schließen
|
||||
copy-or-sigint = Kopieren oder SIGINT
|
||||
toggle-fullscreen = Vollbild umschalten
|
||||
|
|
@ -149,3 +149,4 @@ shortcut-replace-body = { $binding } ist bereits { $existing } zugeordnet. Durch
|
|||
keywords = Befehl;Shell;Terminal;CLI;
|
||||
tab-new-inherit-working-directory = Neue Tabs und Fenster verwenden das aktuelle Verzeichnis
|
||||
tab-new-inherit-working-directory-description = Neue Tabs und Fenster im Arbeitsverzeichnis des aktiven Tabs öffnen
|
||||
show-pane-borders = Bereichsrahmen anzeigen
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ new-window = Νέο παράθυρο
|
|||
profile = Προφίλ
|
||||
menu-profiles = Προφίλ...
|
||||
close-tab = Κλείσιμο καρτέλας
|
||||
quit = Έξοδος
|
||||
quit = Τερματισμός
|
||||
|
||||
## Edit
|
||||
|
||||
|
|
|
|||
|
|
@ -111,3 +111,7 @@ menu-settings = Settings...
|
|||
menu-about = About COSMIC Terminal...
|
||||
repository = Repository
|
||||
support = Support
|
||||
cancel = Cancel
|
||||
keyboard-shortcuts = Keyboard shortcuts
|
||||
replace = Replace
|
||||
menu-keyboard-shortcuts = Keyboard shortcuts...
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ use-bright-bold = Make bold text brighter
|
|||
### Splits
|
||||
splits = Splits
|
||||
focus-follow-mouse = Typing focus follows mouse
|
||||
show-pane-borders = Show pane borders
|
||||
|
||||
### Advanced
|
||||
advanced = Advanced
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
name = نام
|
||||
cancel = لغو
|
||||
quit = خروج
|
||||
rename = تغییر نام
|
||||
delete = حذف
|
||||
|
|
@ -38,7 +38,7 @@ settings = Asetukset
|
|||
|
||||
appearance = Ulkoasu
|
||||
theme = Teema
|
||||
match-desktop = Sovita työpöytään
|
||||
match-desktop = Sama kuin työpöytä
|
||||
dark = Tumma
|
||||
light = Vaalea
|
||||
syntax-dark = Tumma väriteema
|
||||
|
|
@ -151,3 +151,4 @@ toggle-fullscreen = Koko näyttö päällä tai pois
|
|||
shortcut-group-other = Muut
|
||||
tab-new-inherit-working-directory = Uudet välilehdet käyttävät nykyistä hakemistoa
|
||||
tab-new-inherit-working-directory-description = Avaa uudet välilehdet aktiivisen välilehden työskentelyhakemistossa
|
||||
show-pane-borders = Näytä paneelin rajat
|
||||
|
|
|
|||
|
|
@ -168,3 +168,4 @@ comment = Émulateur de terminal pour le bureau COSMIC
|
|||
keywords = Commande;Shell;Terminal;CLI;
|
||||
tab-new-inherit-working-directory = Les nouveaux onglets et fenêtres utilisent le répertoire actuel
|
||||
tab-new-inherit-working-directory-description = Ouvrir les nouveaux onglets et fenêtres dans le répertoire de travail de l'onglet actif
|
||||
show-pane-borders = Afficher les bordures des panneaux
|
||||
|
|
|
|||
|
|
@ -147,5 +147,5 @@ type-to-search = Clóscríobh le cuardach a dhéanamh...
|
|||
comment = Aithriseoir teirminéal don deasc COSMIC
|
||||
keywords = Ordú;Blaosc;Teirminéal;CLI;
|
||||
copy-link = Cóipeáil Nasc
|
||||
tab-new-inherit-working-directory = Úsáideann cluaisíní nua an eolaire reatha
|
||||
tab-new-inherit-working-directory-description = Oscail cluaisíní nua in eolaire oibre an chluaisín ghníomhaigh
|
||||
tab-new-inherit-working-directory = Úsáideann cluaisíní agus fuinneoga nua an t-eolaire reatha
|
||||
tab-new-inherit-working-directory-description = Oscail cluaisíní agus fuinneoga nua in eolaire oibre an chluaisín ghníomhaigh
|
||||
|
|
|
|||
112
i18n/gl/cosmic_term.ftl
Normal file
112
i18n/gl/cosmic_term.ftl
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
name = Nome
|
||||
cancel = Cancelar
|
||||
delete = Eliminar
|
||||
rename = Renomear
|
||||
repository = Repositorio
|
||||
support = Soporte
|
||||
settings = Axustes
|
||||
appearance = Apariencia
|
||||
theme = Tema
|
||||
match-desktop = Axustar ao escritorio
|
||||
dark = Escuro
|
||||
light = Claro
|
||||
default-zoom-step = Pasos do zoom
|
||||
keyboard-shortcuts = Atallos de teclado
|
||||
find-placeholder = Atopar…
|
||||
find-previous = Atopar antes
|
||||
find-next = Atopar seguinte
|
||||
replace = Remplazar
|
||||
file = Ficheiro
|
||||
new-window = Nova xanela
|
||||
quit = Pechar
|
||||
edit = Editar
|
||||
copy = Copiar
|
||||
paste = Pegar
|
||||
select-all = Seleccionar todo
|
||||
find = Atopar
|
||||
view = Ver
|
||||
menu-settings = Axustes...
|
||||
menu-keyboard-shortcuts = Atallos de teclado…
|
||||
new-tab = Nova lapela
|
||||
close-tab = Pechar lapela
|
||||
export = Exportar
|
||||
import = Importar
|
||||
reset-to-default = Restablecer aos valores predeterminados
|
||||
type-to-search = Escribe para buscar...
|
||||
add-another-keybinding = Engadir outro atallo de teclado
|
||||
cosmic-terminal = Terminal de COSMIC
|
||||
comment = Emulador de terminal para o escritorio COSMIC
|
||||
keywords = Orde; Shell; Terminal; CLI;
|
||||
new-terminal = Novo terminal
|
||||
color-schemes = Esquemas de cores
|
||||
import-errors = Importar erros
|
||||
profiles = Perfís
|
||||
command-line = Liña de comandos
|
||||
tab-title = Titulo da lapela
|
||||
tab-title-description = Substituír o título predeterminado da lapela
|
||||
add-profile = Engadir perfil
|
||||
new-profile = Novo perfil
|
||||
make-default = Facer predeterminado
|
||||
working-directory = Directorio de traballo
|
||||
hold = Manter
|
||||
remain-open = Permanecer aberto despois de que remate o proceso fillo.
|
||||
syntax-dark = Esquema de cores escuro
|
||||
syntax-light = Esquema de cores claras
|
||||
opacity = Opacidade do fondo
|
||||
font = Tipografía
|
||||
advanced-font-settings = Configuración avanzada da tipografía
|
||||
default-font = Tipografía
|
||||
default-font-size = Tamaño da tipografía
|
||||
default-font-stretch = Ancho da tipografía
|
||||
default-font-weight = Grosor da tipografía normal
|
||||
default-dim-font-weight = Grosor da tipografía fina
|
||||
default-bold-font-weight = Grosor da tipografía en negriña
|
||||
use-bright-bold = Facer máis brillante o texto en negriña
|
||||
splits = Divisións
|
||||
focus-follow-mouse = O foco de escritura segue o rato
|
||||
show-pane-borders = Mostrar os bordos dos paneis
|
||||
advanced = Avanzado
|
||||
show-headerbar = Mostrar a cabeceira
|
||||
show-header-description = Mostrar a cabeceira desde o menú contextual
|
||||
tab-new-inherit-working-directory = As novas lapelas e xanelas usan o directorio actual
|
||||
tab-new-inherit-working-directory-description = Abrir novas lapelas e xanelas no directorio de traballo da pestana activa
|
||||
close-window = Pechar xanela
|
||||
copy-or-sigint = Copiar ou SIGINT
|
||||
disable = Desactivar
|
||||
focus-pane-down = Poñer o foco no panel inferior
|
||||
focus-pane-left = Poñer o foco no panel esquerdo
|
||||
focus-pane-right = Poñer o foco no panel dereito
|
||||
focus-pane-up = Poñer o foco no panel superior
|
||||
no-shortcuts = Sen atallos de teclado
|
||||
password-manager = Xestor de contrasinais
|
||||
paste-primary = Pegar o contido primario
|
||||
shortcut-capture-hint = Preme a combinación de teclas
|
||||
shortcut-group-clipboard = Portapapeis
|
||||
shortcut-group-other = Outro
|
||||
shortcut-group-tabs = Lapelas
|
||||
shortcut-group-window = Xanela
|
||||
shortcut-group-zoom = Zoom
|
||||
shortcut-replace-body = { $binding } xa está asignado a { $existing }. Substituílo por { $new_action }?
|
||||
shortcut-replace-title = Remplazar atallo de teclado ?
|
||||
tab-activate = Activar a lapela { $number }
|
||||
toggle-fullscreen = Cambiar a pantalla completa
|
||||
profile = Perfil
|
||||
menu-profiles = Perfís...
|
||||
clear-scrollback = Limpar o historial de desprazamento
|
||||
open-link = Abrir enderezo
|
||||
copy-link = Copiar enderezo
|
||||
zoom-in = Texto máis grande
|
||||
zoom-reset = Tamaño de texto predeterminado
|
||||
zoom-out = Texto máis pequeno
|
||||
next-tab = Lapela seguinte
|
||||
previous-tab = Lapela previa
|
||||
split-horizontal = Dividir horizontalmente
|
||||
split-vertical = Dividir verticalmente
|
||||
pane-toggle-maximize = Alternar maximizado
|
||||
menu-color-schemes = Esquema de cores...
|
||||
menu-about = Sobre o Terminal de COSMIC...
|
||||
menu-password-manager = Contrasinais...
|
||||
passwords-title = Contrasinais
|
||||
add-password = Engadir contrasinal
|
||||
password-input = Contrasinal
|
||||
password-input-description = Descripción
|
||||
|
|
@ -29,18 +29,18 @@ remain-open = चाइल्ड प्रोसेस के निकलने
|
|||
|
||||
## Settings
|
||||
|
||||
settings = सेटिंग
|
||||
settings = सेटिंग्स
|
||||
|
||||
### Appearance
|
||||
|
||||
appearance = दिखावट
|
||||
theme = थीम
|
||||
match-desktop = डेस्कटॉप से मिलाएं
|
||||
appearance = रुप-रंग
|
||||
theme = प्रसंग
|
||||
match-desktop = डेस्कटॉप से मेल खाएँ
|
||||
dark = डार्क
|
||||
light = लाइट
|
||||
syntax-dark = रंग योजना डार्क
|
||||
syntax-light = रंग योजना लाइट
|
||||
default-zoom-step = ज़ूम स्तर
|
||||
default-zoom-step = ज़ूम चरण
|
||||
opacity = पृष्ठभूमि अपारदर्शिता
|
||||
|
||||
### Font
|
||||
|
|
@ -66,7 +66,7 @@ advanced = एडवांस
|
|||
show-headerbar = हैडर दिखाएं
|
||||
show-header-description = हैडर को राइट-क्लिक मेन्यू से दिखाएं।
|
||||
# Find
|
||||
find-placeholder = खोजें...
|
||||
find-placeholder = खोजें..।
|
||||
find-previous = पिछला खोजें
|
||||
find-next = अगला खोजें
|
||||
|
||||
|
|
@ -81,13 +81,13 @@ new-window = नई विंडो
|
|||
profile = प्रोफाइल
|
||||
menu-profiles = प्रोफाइल्स...
|
||||
close-tab = टैब बंद करें
|
||||
quit = बंद करें
|
||||
quit = बाहर जाएँ
|
||||
|
||||
### Edit
|
||||
|
||||
edit = संपादित करें
|
||||
edit = संपादन
|
||||
copy = कॉपी करें
|
||||
paste = पेस्ट करें
|
||||
paste = चिपकाएँ
|
||||
select-all = सभी चुनें
|
||||
find = खोजें
|
||||
clear-scrollback = स्क्रॉलबैक साफ़ करें
|
||||
|
|
@ -104,7 +104,11 @@ split-horizontal = क्षैतिज विभाजन
|
|||
split-vertical = लंबवत विभाजन
|
||||
pane-toggle-maximize = अधिकतम करें
|
||||
menu-color-schemes = रंग योजनाएँ...
|
||||
menu-settings = सेटिंग्स...
|
||||
menu-settings = सेटिंग्स..।
|
||||
menu-about = कॉस्मिक टर्मिनल के बारे में...
|
||||
repository = रिपॉजिटरी
|
||||
support = सहायता
|
||||
support = समर्थन
|
||||
cancel = रद्द करें
|
||||
keyboard-shortcuts = कीबोर्ड शॉर्टकट्स
|
||||
replace = बदलें
|
||||
menu-keyboard-shortcuts = कीबोर्ड शॉर्टकट्स..।
|
||||
|
|
|
|||
|
|
@ -149,3 +149,4 @@ type-to-search = Gépelj a kereséshez…
|
|||
copy-link = Hivatkozás másolása
|
||||
tab-new-inherit-working-directory = Az új lapok és ablakok az aktuális könyvtárat használják
|
||||
tab-new-inherit-working-directory-description = Az új lapok és ablakok az aktív lap munkakönyvtárában nyílnak meg
|
||||
show-pane-borders = Ablaktábla-szegélyek megjelenítése
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ remain-open = Tetap buka setelah proses anak berakhir.
|
|||
settings = Pengaturan
|
||||
appearance = Tampilan
|
||||
theme = Tema
|
||||
match-desktop = Cocokkan desktop
|
||||
match-desktop = Cocok desktop
|
||||
dark = Gelap
|
||||
light = Terang
|
||||
syntax-dark = Skema warna gelap
|
||||
|
|
@ -109,3 +109,4 @@ keywords = Perintah;Shell;Terminal;CLI;
|
|||
copy-link = Salin Tautan
|
||||
tab-new-inherit-working-directory = Tab dan jendela baru menggunakan direktori saat ini
|
||||
tab-new-inherit-working-directory-description = Buka tab dan jendela baru di direktori pekerjaan tab aktif
|
||||
show-pane-borders = Tampilkan batas panel
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ settings = Impostazioni
|
|||
|
||||
appearance = Aspetto
|
||||
theme = Tema
|
||||
match-desktop = Sistema
|
||||
match-desktop = Abbina al desktop
|
||||
dark = Scuro
|
||||
light = Chiaro
|
||||
syntax-dark = Schema colori scuro
|
||||
|
|
@ -115,3 +115,7 @@ menu-settings = Impostazioni...
|
|||
menu-about = Informazioni su COSMIC Terminal...
|
||||
support = Supporto
|
||||
repository = Repository
|
||||
cancel = Annulla
|
||||
keyboard-shortcuts = Scorciatoie da tastiera
|
||||
replace = Sostituisci
|
||||
menu-keyboard-shortcuts = Scorciatoie da tastiera...
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ delete = Өшіру
|
|||
repository = Репозиторий
|
||||
support = Қолдау
|
||||
settings = Баптаулар
|
||||
appearance = Сыртқы түрі
|
||||
theme = Тақырып
|
||||
match-desktop = Жұмыс үстеліне сәйкес келу
|
||||
dark = Қараңғы
|
||||
light = Жарық
|
||||
appearance = Сыртқы көрініс
|
||||
theme = Тема
|
||||
match-desktop = Жұмыс үстеліне сәйкес болу
|
||||
dark = Қою
|
||||
light = Ашық
|
||||
file = Файл
|
||||
new-tab = Жаңа бет
|
||||
new-window = Жаңа терезе
|
||||
|
|
@ -107,5 +107,6 @@ type-to-search = Іздеу үшін теріңіз...
|
|||
comment = COSMIC жұмыс үстелі үшін терминал эмуляторы
|
||||
keywords = Command;Shell;Terminal;CLI;Команда;Қоршам;Терминал;
|
||||
copy-link = Сілтемені көшіру
|
||||
tab-new-inherit-working-directory = Жаңа беттерде ағымдағы буманы қолдану
|
||||
tab-new-inherit-working-directory-description = Жаңа беттерді белсенді беттің жұмыс бумасында ашу
|
||||
tab-new-inherit-working-directory = Жаңа беттерде және терезелерде ағымдағы буманы қолдану
|
||||
tab-new-inherit-working-directory-description = Жаңа беттерді және терезелерді белсенді беттің жұмыс бумасында ашу
|
||||
show-pane-borders = Панель жақтауларын көрсету
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ command-line = Rêza fermanê
|
|||
view = Dîtin
|
||||
dark = Tarî
|
||||
hold = Ragire
|
||||
match-desktop = Li gorî sermaseyê
|
||||
match-desktop = Bi sermaseyê re li hev bîne
|
||||
find-previous = Yê paş bibîne
|
||||
cosmic-terminal = Termînalê COSMIC
|
||||
find-placeholder = Bibîne...
|
||||
|
|
@ -62,7 +62,7 @@ shortcut-group-zoom = Nêzîkbûn
|
|||
repository = Embar
|
||||
find = Bibîne
|
||||
replace = Biguhêrîne
|
||||
syntax-light = Şêwaza rengê ronî
|
||||
syntax-light = Şêwaza rengan a ronî
|
||||
default-font-weight = Giraniya cûrenivîsê ya normal
|
||||
zoom-in = Nivîsa mezintir
|
||||
previous-tab = Rûgera paş
|
||||
|
|
@ -109,3 +109,4 @@ tab-activate = Rûgera { $number } çalak bike
|
|||
toggle-fullscreen = Dîmendera tijî biguhêrîne
|
||||
type-to-search = Ji bo lêgerînê binivîse...
|
||||
copy-link = Girêdanê jê bigire
|
||||
show-pane-borders = Sînorên kilîtdankê nîşan bide
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name = Pavadinimas
|
||||
delete = Ištrinti
|
||||
cosmic-terminal = COSMIC Terminal
|
||||
cosmic-terminal = COSMIC Terminalas
|
||||
new-terminal = Naujas terminalas
|
||||
repository = Saugykla
|
||||
support = Palaikymas
|
||||
|
|
@ -19,7 +19,7 @@ make-default = Padaryti numatytu
|
|||
working-directory = Darbinis katalogas
|
||||
hold = Laikyti
|
||||
remain-open = Palikti atidarytą išsijungus vaikiniam procesui.
|
||||
settings = Nuostatos
|
||||
settings = Nuostatai
|
||||
appearance = Išvaizda
|
||||
theme = Stilius
|
||||
match-desktop = Pagal darbalaukio temą
|
||||
|
|
@ -47,7 +47,7 @@ new-window = Naujas langas
|
|||
profile = Profilis
|
||||
menu-profiles = Profiliai...
|
||||
close-tab = Uždaryti skirtuką
|
||||
quit = Išeiti
|
||||
quit = Išjungti
|
||||
edit = Redaguoti
|
||||
copy = Kopijuoti
|
||||
paste = Įdėti
|
||||
|
|
@ -65,7 +65,7 @@ split-horizontal = Skaidyti horizontaliai
|
|||
split-vertical = Skaidyti vertikaliai
|
||||
pane-toggle-maximize = Perjungti maksimalų padidinimą
|
||||
menu-color-schemes = Spalvų schemos...
|
||||
menu-settings = Nuostatos...
|
||||
menu-settings = Nuostatai...
|
||||
menu-about = Apie COSMIC Terminal...
|
||||
menu-password-manager = Slaptažodžiai...
|
||||
passwords-title = Slaptažodžiai
|
||||
|
|
|
|||
|
|
@ -1 +1,7 @@
|
|||
settings = Paramètres
|
||||
appearance = Aparéncia
|
||||
theme = Tèma
|
||||
match-desktop = Assortir al burèu
|
||||
dark = Fosc
|
||||
light = Clar
|
||||
file = Fichièr
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ name = ਨਾਂ
|
|||
settings = ਸੈਟਿੰਗਾਂ
|
||||
appearance = ਦਿੱਖ
|
||||
theme = ਥੀਮ
|
||||
match-desktop = ਡੈਸਕਟਾਪ ਨਾਲ ਮਿਲਦਾ
|
||||
match-desktop = ਡੈਸਕਟਾਪ ਨਾਲ ਮਿਲਾਓ
|
||||
dark = ਗੂੜ੍ਹਾ
|
||||
light = ਹਲਕਾ
|
||||
light = ਫਿੱਕਾ
|
||||
default-zoom-step = ਜ਼ੂਮ ਸਟੈਪ
|
||||
quit = ਬਾਹਰ
|
||||
quit = ਸਮਾਪਤ
|
||||
edit = ਸੋਧੋ
|
||||
copy = ਕਾਪੀ ਕਰੋ
|
||||
paste = ਚੇਪੋ
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ new-window = Nowe okno
|
|||
profile = Profil
|
||||
menu-profiles = Profile...
|
||||
close-tab = Zamknij kartę
|
||||
quit = Zamknij
|
||||
quit = Zakończ
|
||||
|
||||
## Edit
|
||||
|
||||
|
|
@ -149,3 +149,4 @@ focus-pane-up = Aktywuj panel wyżej
|
|||
copy-link = Skopiuj Odnośnik
|
||||
tab-new-inherit-working-directory = Nowe karty i okna użyją obecnego katalogu
|
||||
tab-new-inherit-working-directory-description = Otwieraj nowe karty i okna w katalogu roboczym aktywnej karty
|
||||
show-pane-borders = Pokaż obramowania paneli
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ new-window = Nova janela
|
|||
profile = Perfil
|
||||
menu-profiles = Perfis...
|
||||
close-tab = Fechar aba
|
||||
quit = Sair
|
||||
quit = Encerrar
|
||||
|
||||
## Edit
|
||||
|
||||
|
|
@ -149,3 +149,4 @@ type-to-search = Digite para pesquisar...
|
|||
copy-link = Copiar link
|
||||
tab-new-inherit-working-directory = Novas abas e janelas usam o diretório atual
|
||||
tab-new-inherit-working-directory-description = Abrir novas abas e janelas no diretório de trabalho da aba ativa
|
||||
show-pane-borders = Mostrar bordas do quadro
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
cosmic-terminal = Терминал
|
||||
comment = Эмулятор терминала для рабочей среды COSMIC
|
||||
comment = Эмулятор терминала для среды COSMIC
|
||||
keywords = Команда;Оболочка;Терминал;Консоль;
|
||||
new-terminal = Новый терминал
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ new-window = Новое окно
|
|||
profile = Профиль
|
||||
menu-profiles = Профили...
|
||||
close-tab = Закрыть вкладку
|
||||
quit = Выйти
|
||||
quit = Завершить
|
||||
|
||||
## Edit
|
||||
|
||||
|
|
@ -141,5 +141,6 @@ tab-activate = Активировать вкладку { $number }
|
|||
toggle-fullscreen = Вкл./выкл. полноэкранный режим
|
||||
type-to-search = Введите для поиска...
|
||||
copy-link = Копировать ссылку
|
||||
tab-new-inherit-working-directory = В новых вкладках исп. текущий каталог
|
||||
tab-new-inherit-working-directory-description = Открывать новые вкладки в рабочем каталоге активной вкладки
|
||||
tab-new-inherit-working-directory = Текущий каталог в новых вкладках и окнах
|
||||
tab-new-inherit-working-directory-description = Открывать новые вкладки и окна в рабочем каталоге активной вкладки
|
||||
show-pane-borders = Показывать границы панелей
|
||||
|
|
|
|||
2
i18n/sat/cosmic_term.ftl
Normal file
2
i18n/sat/cosmic_term.ftl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
cancel = ᱵᱟᱹᱛᱤᱞ
|
||||
name = ᱧᱩᱛᱩᱢ
|
||||
|
|
@ -113,7 +113,7 @@ split-vertical = Dela vertikalt
|
|||
pane-toggle-maximize = Växla maximerad
|
||||
clear-scrollback = Töm tillbakarullning
|
||||
menu-color-schemes = Färgscheman…
|
||||
menu-settings = Inställningar…
|
||||
menu-settings = Inställningar...
|
||||
menu-about = Om COSMIC Terminal…
|
||||
repository = Källkod
|
||||
support = Support
|
||||
|
|
@ -153,3 +153,4 @@ shortcut-group-zoom = Zooma
|
|||
copy-link = Kopiera länk
|
||||
tab-new-inherit-working-directory-description = Öppna nya flikar och fönster i den aktiva flikens arbetskatalog
|
||||
tab-new-inherit-working-directory = Nya flikar och fönster använder aktuell katalog
|
||||
show-pane-borders = Visa ram runt fält
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ new-window = Нове вікно
|
|||
profile = Профіль
|
||||
menu-profiles = Профілі...
|
||||
close-tab = Закрити вкладку
|
||||
quit = Вийти
|
||||
quit = Завершити
|
||||
|
||||
## Edit
|
||||
|
||||
|
|
@ -147,5 +147,6 @@ focus-pane-up = Фокус на верхню панель
|
|||
comment = Емулятор терміналу для середовища COSMIC
|
||||
keywords = Команда;Оболонка;Термінал;Інтерфейс;CLI;
|
||||
copy-link = Копіювати ланку
|
||||
tab-new-inherit-working-directory = У нових вкладках використовується поточний каталог
|
||||
tab-new-inherit-working-directory-description = Відкривати нові вкладки в робочому каталозі активної вкладки
|
||||
tab-new-inherit-working-directory = Нові вкладки та вікна відкривати в поточному каталозі
|
||||
tab-new-inherit-working-directory-description = Відкривати нові вкладки та вікна в робочому каталозі активної вкладки
|
||||
show-pane-borders = Показувати межі панелей
|
||||
|
|
|
|||
|
|
@ -149,3 +149,4 @@ keywords = 指令;外壳;终端;命令行界面;
|
|||
copy-link = 复制链接
|
||||
tab-new-inherit-working-directory = 新标签和窗口使用当前目录
|
||||
tab-new-inherit-working-directory-description = 在活动标签的工作目录中打开新标签和窗口
|
||||
show-pane-borders = 显示窗格边框
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ command-line = 命令列
|
|||
tab-title = 分頁標題
|
||||
tab-title-description = 覆寫預設分頁標題
|
||||
add-profile = 新增設定檔
|
||||
new-profile = 新建設定檔
|
||||
new-profile = 新增設定檔
|
||||
make-default = 設為預設值
|
||||
working-directory = 工作目錄
|
||||
hold = 保留
|
||||
|
|
@ -79,12 +79,12 @@ find-next = 下一個
|
|||
## File
|
||||
|
||||
file = 檔案
|
||||
new-tab = 新建分頁
|
||||
new-window = 新建視窗
|
||||
new-tab = 新增分頁
|
||||
new-window = 新增視窗
|
||||
profile = 設定檔案
|
||||
menu-profiles = 設定檔案...
|
||||
close-tab = 關閉分頁
|
||||
quit = 退出
|
||||
quit = 結束
|
||||
|
||||
## Edit
|
||||
|
||||
|
|
@ -109,11 +109,11 @@ menu-color-schemes = 配色方案...
|
|||
menu-settings = 設定...
|
||||
menu-about = 關於 COSMIC 終端機…
|
||||
cancel = 取消
|
||||
repository = 軟體庫源
|
||||
repository = 軟體庫
|
||||
support = 支援
|
||||
keyboard-shortcuts = 鍵盤快速鍵
|
||||
keywords = 指令;殼層;終端;指令行介面CLI;
|
||||
add-another-keybinding = 添加另一個按鍵組合
|
||||
add-another-keybinding = 新增另一個鍵盤快速鍵
|
||||
close-window = 關閉視窗
|
||||
copy-or-sigint = 複製或 SIGINT
|
||||
disable = 停用
|
||||
|
|
@ -136,7 +136,7 @@ focus-pane-up = 聚焦上方窗格
|
|||
open-link = 開啟連結
|
||||
menu-password-manager = 密碼…
|
||||
passwords-title = 密碼
|
||||
add-password = 添增密碼
|
||||
add-password = 新增密碼
|
||||
password-input = 密碼
|
||||
password-input-description = 描述
|
||||
shortcut-replace-title = 取代快速鍵?
|
||||
|
|
@ -149,3 +149,4 @@ clear-scrollback = 清除捲動回朔
|
|||
comment = COSMIC 桌面終端機模擬器
|
||||
tab-new-inherit-working-directory = 新分頁和視窗使用目前目錄
|
||||
tab-new-inherit-working-directory-description = 在作用中分頁的工作目錄開啟新分頁和視窗
|
||||
show-pane-borders = 顯示窗格邊框
|
||||
|
|
|
|||
|
|
@ -231,6 +231,7 @@ pub struct Config {
|
|||
pub opacity: u8,
|
||||
pub profiles: BTreeMap<ProfileId, Profile>,
|
||||
pub show_headerbar: bool,
|
||||
pub show_pane_borders: bool,
|
||||
pub use_bright_bold: bool,
|
||||
pub syntax_theme_dark: String,
|
||||
pub syntax_theme_light: String,
|
||||
|
|
@ -260,6 +261,7 @@ impl Default for Config {
|
|||
opacity: 100,
|
||||
profiles: BTreeMap::new(),
|
||||
show_headerbar: true,
|
||||
show_pane_borders: false,
|
||||
syntax_theme_dark: COSMIC_THEME_DARK.to_string(),
|
||||
syntax_theme_light: COSMIC_THEME_LIGHT.to_string(),
|
||||
use_bright_bold: false,
|
||||
|
|
|
|||
148
src/main.rs
148
src/main.rs
|
|
@ -571,6 +571,8 @@ pub enum Message {
|
|||
ShowAdvancedFontSettings(bool),
|
||||
ShowHeaderBar(bool),
|
||||
SshConnect(usize),
|
||||
ShowPaneBorders(bool),
|
||||
|
||||
SyntaxTheme(ColorSchemeKind, usize),
|
||||
SystemThemeChange,
|
||||
TabNewInheritWorkingDirectory(bool),
|
||||
|
|
@ -833,7 +835,7 @@ impl App {
|
|||
|
||||
// Update terminal window background color
|
||||
{
|
||||
let color = Color::from(theme.cosmic().background(false).base);
|
||||
let color = Color::from(theme.cosmic().background(theme.transparent).base);
|
||||
let bytes = color.into_rgba8();
|
||||
let data = u32::from(bytes[2])
|
||||
| (u32::from(bytes[1]) << 8)
|
||||
|
|
@ -1483,6 +1485,7 @@ impl App {
|
|||
}
|
||||
|
||||
fn settings(&self) -> Element<'_, Message> {
|
||||
let t = self.core().system_theme();
|
||||
let app_theme_selected = match self.config.app_theme {
|
||||
AppTheme::Dark => 1,
|
||||
AppTheme::Light => 2,
|
||||
|
|
@ -1566,13 +1569,13 @@ impl App {
|
|||
}),
|
||||
),
|
||||
)
|
||||
.add(
|
||||
.add_maybe((!t.transparent).then(|| {
|
||||
widget::settings::item::builder(fl!("opacity"))
|
||||
.description(format!("{}%", self.config.opacity))
|
||||
.control(widget::slider(0..=100, self.config.opacity, |opacity| {
|
||||
Message::Opacity(opacity)
|
||||
})),
|
||||
);
|
||||
}))
|
||||
}));
|
||||
|
||||
let mut font_section = widget::settings::section()
|
||||
.title(fl!("font"))
|
||||
|
|
@ -1658,10 +1661,16 @@ impl App {
|
|||
font_section = font_section.add(advanced_font_settings());
|
||||
}
|
||||
|
||||
let splits_section = widget::settings::section().title(fl!("splits")).add(
|
||||
widget::settings::item::builder(fl!("focus-follow-mouse"))
|
||||
.toggler(self.config.focus_follow_mouse, Message::FocusFollowMouse),
|
||||
);
|
||||
let splits_section = widget::settings::section()
|
||||
.title(fl!("splits"))
|
||||
.add(
|
||||
widget::settings::item::builder(fl!("focus-follow-mouse"))
|
||||
.toggler(self.config.focus_follow_mouse, Message::FocusFollowMouse),
|
||||
)
|
||||
.add(
|
||||
widget::settings::item::builder(fl!("show-pane-borders"))
|
||||
.toggler(self.config.show_pane_borders, Message::ShowPaneBorders),
|
||||
);
|
||||
|
||||
let advanced_section = widget::settings::section()
|
||||
.title(fl!("advanced"))
|
||||
|
|
@ -3045,7 +3054,8 @@ impl Application for App {
|
|||
}
|
||||
Message::PaneClicked(pane) => {
|
||||
self.pane_model.set_focus(pane);
|
||||
return self.update_title(Some(pane));
|
||||
let title_task = self.update_title(Some(pane));
|
||||
return Task::batch([self.update_focus(), title_task]);
|
||||
}
|
||||
Message::PaneSplit(axis) => {
|
||||
let result = self.pane_model.panes.split(
|
||||
|
|
@ -3295,6 +3305,11 @@ impl Application for App {
|
|||
tab_new_inherit_working_directory
|
||||
);
|
||||
}
|
||||
Message::ShowPaneBorders(show_pane_borders) => {
|
||||
if show_pane_borders != self.config.show_pane_borders {
|
||||
config_set!(show_pane_borders, show_pane_borders);
|
||||
}
|
||||
}
|
||||
Message::UseBrightBold(use_bright_bold) => {
|
||||
if use_bright_bold != self.config.use_bright_bold {
|
||||
config_set!(use_bright_bold, use_bright_bold);
|
||||
|
|
@ -3503,7 +3518,7 @@ impl Application for App {
|
|||
|
||||
tasks.push(cosmic::task::message(Message::Surface(
|
||||
cosmic::surface::action::app_popup(
|
||||
|_: &Self| cosmic::surface::action::LiveSettings::default(),
|
||||
|_| Default::default(),
|
||||
move |_app: &mut Self| {
|
||||
use cosmic::cctk::wayland_protocols::xdg::shell::client::xdg_positioner::{Anchor, Gravity};
|
||||
use cosmic::iced::runtime::platform_specific::wayland::popup::{SctkPopupSettings, SctkPositioner};
|
||||
|
|
@ -4131,8 +4146,23 @@ impl Application for App {
|
|||
|
||||
/// Creates a view after each update.
|
||||
fn view(&self) -> Element<'_, Self::Message> {
|
||||
let cosmic_theme::Spacing { space_xxs, .. } = self.core().system_theme().cosmic().spacing;
|
||||
let t = self.core().system_theme();
|
||||
let cosmic = t.cosmic();
|
||||
let cosmic_theme::Spacing {
|
||||
space_xxxs,
|
||||
space_xxs,
|
||||
..
|
||||
} = cosmic.spacing;
|
||||
|
||||
let show_pane_borders =
|
||||
self.config.show_pane_borders && self.pane_model.panes.panes.len() > 1;
|
||||
let pane_corner_radius: iced::border::Radius = {
|
||||
let pad = f32::from(space_xxxs) / 2.0;
|
||||
cosmic
|
||||
.radius_s()
|
||||
.map(|r| if r > 0.0 { r + pad } else { 0.0 })
|
||||
.into()
|
||||
};
|
||||
let pane_grid = PaneGrid::new(&self.pane_model.panes, |pane, tab_model, _is_maximized| {
|
||||
let mut tab_column = widget::column::with_capacity(1);
|
||||
|
||||
|
|
@ -4181,10 +4211,16 @@ impl Application for App {
|
|||
.on_open_hyperlink(Some(Box::new(Message::LaunchUrl)))
|
||||
.on_window_focused(|| Message::WindowFocused)
|
||||
.on_window_unfocused(|| Message::WindowUnfocused)
|
||||
.opacity(self.config.opacity_ratio())
|
||||
.opacity(if t.transparent {
|
||||
t.cosmic().alpha_map.blurred_alpha(t.cosmic().frosted)
|
||||
} else {
|
||||
self.config.opacity_ratio()
|
||||
})
|
||||
.padding(space_xxs)
|
||||
.sharp_corners(self.core.window.sharp_corners)
|
||||
.show_headerbar(self.config.show_headerbar);
|
||||
.show_headerbar(self.config.show_headerbar)
|
||||
.pane_border_radius(show_pane_borders.then_some(pane_corner_radius))
|
||||
.border(pane_border(cosmic, t.transparent, show_pane_borders));
|
||||
|
||||
if self.config.focus_follow_mouse {
|
||||
terminal_box = terminal_box.on_mouse_enter(move || Message::MouseEnter(pane));
|
||||
|
|
@ -4327,7 +4363,14 @@ impl Application for App {
|
|||
.on_drag(Message::PaneDragged);
|
||||
|
||||
//TODO: apply window border radius xs at bottom of window
|
||||
pane_grid.into()
|
||||
if show_pane_borders {
|
||||
// Each pane draws its own border stroke. Painting a filled
|
||||
// container behind the grid instead would stack its alpha with the
|
||||
// translucent panes and wash out the blurred backdrop.
|
||||
pane_grid.spacing(space_xxxs).into()
|
||||
} else {
|
||||
pane_grid.into()
|
||||
}
|
||||
}
|
||||
|
||||
fn system_theme_update(
|
||||
|
|
@ -4415,3 +4458,80 @@ fn is_wayland() -> bool {
|
|||
Some(cosmic::app::cosmic::WindowingSystem::Wayland)
|
||||
)
|
||||
}
|
||||
|
||||
/// Divider color painted behind the pane grid to form pane borders.
|
||||
///
|
||||
/// When blur is active the transparent container must be used, otherwise the
|
||||
/// fill is opaque and hides the blurred desktop behind the window.
|
||||
fn pane_divider_color(
|
||||
cosmic: &cosmic_theme::Theme,
|
||||
transparent: bool,
|
||||
) -> cosmic::cosmic_theme::palette::Srgba {
|
||||
cosmic.background(transparent).divider
|
||||
}
|
||||
|
||||
/// Border stroke drawn around each terminal pane.
|
||||
///
|
||||
/// The stroke sits on the pane edge rather than behind it, so the pane
|
||||
/// interior keeps its own opacity and the blurred desktop stays visible.
|
||||
fn pane_border(cosmic: &cosmic_theme::Theme, transparent: bool, show: bool) -> iced::Border {
|
||||
if show {
|
||||
iced::Border {
|
||||
color: Color::from(pane_divider_color(cosmic, transparent)),
|
||||
width: 1.0,
|
||||
..Default::default()
|
||||
}
|
||||
} else {
|
||||
iced::Border::default()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{pane_border, pane_divider_color};
|
||||
|
||||
#[test]
|
||||
fn pane_border_is_drawn_only_when_enabled() {
|
||||
// With borders off the pane must render exactly as before, so the
|
||||
// stroke has to be zero width rather than a transparent hairline.
|
||||
let theme = cosmic::cosmic_theme::Theme::dark_default();
|
||||
assert_eq!(pane_border(&theme, true, false).width, 0.0);
|
||||
assert!(pane_border(&theme, true, true).width > 0.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pane_border_uses_the_divider_color() {
|
||||
// The stroke is the only thing marking the pane edge now that nothing
|
||||
// is painted behind the grid, so it must match the theme divider.
|
||||
let theme = cosmic::cosmic_theme::Theme::dark_default();
|
||||
let expected = cosmic::iced::Color::from(pane_divider_color(&theme, true));
|
||||
assert_eq!(pane_border(&theme, true, true).color, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pane_divider_is_translucent_when_blur_is_active() {
|
||||
// The divider is painted as a full-window container behind the pane
|
||||
// grid. With blur active it must keep alpha < 1 so the frosted
|
||||
// backdrop still shows through instead of a flat opaque fill.
|
||||
let theme = cosmic::cosmic_theme::Theme::dark_default();
|
||||
let color = pane_divider_color(&theme, true);
|
||||
assert!(
|
||||
color.alpha < 1.0,
|
||||
"expected translucent divider, got alpha {}",
|
||||
color.alpha
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pane_divider_is_opaque_without_blur() {
|
||||
// Without blur there is nothing to show through, so the divider keeps
|
||||
// the fully opaque background color.
|
||||
let theme = cosmic::cosmic_theme::Theme::dark_default();
|
||||
let color = pane_divider_color(&theme, false);
|
||||
assert!(
|
||||
(color.alpha - 1.0).abs() < f32::EPSILON,
|
||||
"expected opaque divider, got alpha {}",
|
||||
color.alpha
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
13
src/menu.rs
13
src/menu.rs
|
|
@ -3,7 +3,7 @@
|
|||
use cosmic::iced::Point;
|
||||
use cosmic::widget::menu::key_bind::KeyBind;
|
||||
use cosmic::widget::menu::{Item as MenuItem, menu_button};
|
||||
use cosmic::widget::{Column, space};
|
||||
use cosmic::widget::space;
|
||||
use cosmic::{
|
||||
Element,
|
||||
app::Core,
|
||||
|
|
@ -46,7 +46,7 @@ pub fn context_menu<'a>(
|
|||
String::new()
|
||||
};
|
||||
fn key_style(theme: &cosmic::Theme) -> TextStyle {
|
||||
let mut color = theme.cosmic().background(false).component.on;
|
||||
let mut color = theme.cosmic().background(theme.transparent).component.on;
|
||||
color.alpha *= 0.75;
|
||||
TextStyle {
|
||||
color: Some(color.into()),
|
||||
|
|
@ -143,13 +143,13 @@ pub fn context_menu<'a>(
|
|||
);
|
||||
rows.insert(2, Element::from(divider::horizontal::light()));
|
||||
}
|
||||
let content = Column::with_children(rows);
|
||||
let content = widget::menu::menu_column::MenuColumn::with_children(rows);
|
||||
widget::container(content)
|
||||
.padding(1)
|
||||
//TODO: move style to libcosmic
|
||||
.style(|theme| {
|
||||
let cosmic = theme.cosmic();
|
||||
let component = &cosmic.background(false).component;
|
||||
let component = &cosmic.background(theme.transparent).component;
|
||||
widget::container::Style {
|
||||
icon_color: Some(component.on.into()),
|
||||
text_color: Some(component.on.into()),
|
||||
|
|
@ -174,7 +174,8 @@ pub fn color_scheme_menu<'a>(
|
|||
let menu_item =
|
||||
|label, message| menu_button(vec![widget::text(label).into()]).on_press(message);
|
||||
|
||||
let mut column = widget::column::with_capacity(if id_opt.is_some() { 3 } else { 1 });
|
||||
let mut column =
|
||||
widget::menu::menu_column::MenuColumn::with_capacity(if id_opt.is_some() { 3 } else { 1 });
|
||||
if let Some(id) = id_opt {
|
||||
column = column.push(menu_item(
|
||||
fl!("rename"),
|
||||
|
|
@ -197,7 +198,7 @@ pub fn color_scheme_menu<'a>(
|
|||
//TODO: move style to libcosmic
|
||||
.style(|theme| {
|
||||
let cosmic = theme.cosmic();
|
||||
let component = &cosmic.background(false).component;
|
||||
let component = &cosmic.background(theme.transparent).component;
|
||||
widget::container::Style {
|
||||
icon_color: Some(component.on.into()),
|
||||
text_color: Some(component.on.into()),
|
||||
|
|
|
|||
|
|
@ -207,13 +207,12 @@ impl TerminalPaneGrid {
|
|||
}
|
||||
}
|
||||
pub fn unfocus_all_terminals(&self) {
|
||||
for (_pane, tab_model) in self.panes.panes.iter() {
|
||||
for entity in tab_model.iter() {
|
||||
if let Some(terminal) = tab_model.data::<Mutex<Terminal>>(entity) {
|
||||
let mut terminal = terminal.lock().unwrap();
|
||||
terminal.set_focused(false);
|
||||
terminal.update();
|
||||
}
|
||||
for tab_model in self.panes.panes.values() {
|
||||
let entity = tab_model.active();
|
||||
if let Some(terminal) = tab_model.data::<Mutex<Terminal>>(entity) {
|
||||
let mut terminal = terminal.lock().unwrap();
|
||||
terminal.set_focused(false);
|
||||
terminal.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ use cosmic::{
|
|||
cosmic_theme::palette::{WithAlpha, blend::Compose},
|
||||
iced::core::{
|
||||
Border, Shell,
|
||||
border::Radius,
|
||||
clipboard::Clipboard,
|
||||
input_method::{self, InputMethod},
|
||||
keyboard::key::Named,
|
||||
|
|
@ -109,6 +110,7 @@ pub struct TerminalBox<'a, Message> {
|
|||
border: Border,
|
||||
padding: Padding,
|
||||
show_headerbar: bool,
|
||||
pane_border_radius: Option<Radius>,
|
||||
click_timing: Duration,
|
||||
context_menu: Option<Point>,
|
||||
on_context_menu: Option<Box<dyn Fn(Option<MenuState>) -> Message + 'a>>,
|
||||
|
|
@ -135,6 +137,7 @@ where
|
|||
border: Border::default(),
|
||||
padding: Padding::new(0.0),
|
||||
show_headerbar: true,
|
||||
pane_border_radius: None,
|
||||
click_timing: Duration::from_millis(500),
|
||||
context_menu: None,
|
||||
on_context_menu: None,
|
||||
|
|
@ -171,6 +174,11 @@ where
|
|||
self
|
||||
}
|
||||
|
||||
pub fn pane_border_radius(mut self, pane_border_radius: Option<Radius>) -> Self {
|
||||
self.pane_border_radius = pane_border_radius;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn click_timing(mut self, click_timing: Duration) -> Self {
|
||||
self.click_timing = click_timing;
|
||||
self
|
||||
|
|
@ -409,13 +417,22 @@ where
|
|||
let state = tree.state.downcast_ref::<State>();
|
||||
|
||||
let cosmic_theme = theme.cosmic();
|
||||
// matches the corners to the window border
|
||||
let corner_radius = if self.sharp_corners {
|
||||
let corner_radius = if let Some(r) = self.pane_border_radius {
|
||||
r.into()
|
||||
} else if self.sharp_corners {
|
||||
// matches the corners to the window border
|
||||
cosmic_theme.radius_0()
|
||||
} else {
|
||||
cosmic_theme.radius_s()
|
||||
}
|
||||
.map(|x| if x < 4.0 { x - 1.0 } else { x + 3.0 });
|
||||
cosmic_theme
|
||||
.radius_s()
|
||||
.map(|x| if x < 4.0 { x - 1.0 } else { x + 3.0 })
|
||||
};
|
||||
// When there's a headerbar and no pane border, only round the bottom corners
|
||||
let border_radius: Radius = if self.show_headerbar && self.pane_border_radius.is_none() {
|
||||
[0.0, 0.0, corner_radius[2], corner_radius[3]].into()
|
||||
} else {
|
||||
corner_radius.into()
|
||||
};
|
||||
let scrollbar_w = f32::from(cosmic_theme.spacing.space_xxs);
|
||||
|
||||
let view_position = layout.position() + [self.padding.left, self.padding.top].into();
|
||||
|
|
@ -429,16 +446,11 @@ where
|
|||
// Pane too small for content, but still fill background
|
||||
let terminal = self.terminal.lock().unwrap();
|
||||
let meta = &terminal.metadata_set[terminal.default_attrs().metadata];
|
||||
let background_color = shade(meta.bg, state.is_focused && !self.disabled);
|
||||
renderer.fill_quad(
|
||||
Quad {
|
||||
bounds: layout.bounds(),
|
||||
border: Border {
|
||||
radius: if self.show_headerbar {
|
||||
[0.0, 0.0, corner_radius[2], corner_radius[3]].into()
|
||||
} else {
|
||||
corner_radius.into()
|
||||
},
|
||||
radius: border_radius,
|
||||
width: self.border.width,
|
||||
color: self.border.color,
|
||||
},
|
||||
|
|
@ -446,12 +458,12 @@ where
|
|||
..Default::default()
|
||||
},
|
||||
Color::from_rgba(
|
||||
f32::from(background_color.r()) / 255.0,
|
||||
f32::from(background_color.g()) / 255.0,
|
||||
f32::from(background_color.b()) / 255.0,
|
||||
f32::from(meta.bg.r()) / 255.0,
|
||||
f32::from(meta.bg.g()) / 255.0,
|
||||
f32::from(meta.bg.b()) / 255.0,
|
||||
match self.opacity {
|
||||
Some(opacity) => opacity,
|
||||
None => f32::from(background_color.a()) / 255.0,
|
||||
None => f32::from(meta.bg.a()) / 255.0,
|
||||
},
|
||||
),
|
||||
);
|
||||
|
|
@ -472,17 +484,11 @@ where
|
|||
// Render default background
|
||||
{
|
||||
let meta = &terminal.metadata_set[terminal.default_attrs().metadata];
|
||||
let background_color = shade(meta.bg, state.is_focused && !self.disabled);
|
||||
|
||||
renderer.fill_quad(
|
||||
Quad {
|
||||
bounds: layout.bounds(),
|
||||
border: Border {
|
||||
radius: if self.show_headerbar {
|
||||
[0.0, 0.0, corner_radius[2], corner_radius[3]].into()
|
||||
} else {
|
||||
corner_radius.into()
|
||||
},
|
||||
radius: border_radius,
|
||||
width: self.border.width,
|
||||
color: self.border.color,
|
||||
},
|
||||
|
|
@ -490,12 +496,12 @@ where
|
|||
..Default::default()
|
||||
},
|
||||
Color::from_rgba(
|
||||
f32::from(background_color.r()) / 255.0,
|
||||
f32::from(background_color.g()) / 255.0,
|
||||
f32::from(background_color.b()) / 255.0,
|
||||
f32::from(meta.bg.r()) / 255.0,
|
||||
f32::from(meta.bg.g()) / 255.0,
|
||||
f32::from(meta.bg.b()) / 255.0,
|
||||
match self.opacity {
|
||||
Some(opacity) => opacity,
|
||||
None => f32::from(background_color.a()) / 255.0,
|
||||
None => f32::from(meta.bg.a()) / 255.0,
|
||||
},
|
||||
),
|
||||
);
|
||||
|
|
@ -537,7 +543,7 @@ where
|
|||
fn fill<Renderer: renderer::Renderer>(
|
||||
&mut self,
|
||||
renderer: &mut Renderer,
|
||||
is_focused: bool,
|
||||
_is_focused: bool,
|
||||
) {
|
||||
let cosmic_text_to_iced_color = |color: cosmic_text::Color| {
|
||||
Color::from_rgba(
|
||||
|
|
@ -551,7 +557,7 @@ where
|
|||
macro_rules! mk_pos_offset {
|
||||
($x_offset:expr, $bottom_offset:expr) => {
|
||||
Vector::new(
|
||||
self.start_x + $x_offset,
|
||||
(self.start_x + $x_offset).floor(),
|
||||
self.line_top + self.line_height - $bottom_offset,
|
||||
)
|
||||
};
|
||||
|
|
@ -568,16 +574,19 @@ where
|
|||
}
|
||||
};
|
||||
($pos_offset:expr, $style_line_height:expr) => {
|
||||
mk_quad!($pos_offset, $style_line_height, self.end_x - self.start_x)
|
||||
mk_quad!(
|
||||
$pos_offset,
|
||||
$style_line_height,
|
||||
(self.end_x - self.start_x).ceil()
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
let metadata = &self.metadata_set[self.metadata];
|
||||
if metadata.bg != self.metadata_set[self.default_metadata].bg {
|
||||
let color = shade(metadata.bg, is_focused);
|
||||
renderer.fill_quad(
|
||||
mk_quad!(mk_pos_offset!(0.0, self.line_height), self.line_height),
|
||||
cosmic_text_to_iced_color(color),
|
||||
cosmic_text_to_iced_color(metadata.bg),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -756,7 +765,7 @@ where
|
|||
let scrollbar_color: Color = if pressed {
|
||||
// pressed_state_color, 0.5
|
||||
cosmic_theme
|
||||
.background(false)
|
||||
.background(theme.transparent)
|
||||
.component
|
||||
.pressed
|
||||
.without_alpha()
|
||||
|
|
@ -766,7 +775,7 @@ where
|
|||
} else if hover {
|
||||
// hover_state_color, 0.2
|
||||
cosmic_theme
|
||||
.background(false)
|
||||
.background(theme.transparent)
|
||||
.component
|
||||
.hover
|
||||
.without_alpha()
|
||||
|
|
@ -1381,8 +1390,6 @@ where
|
|||
}
|
||||
shell.capture_event();
|
||||
}
|
||||
} else {
|
||||
state.is_focused = false;
|
||||
}
|
||||
}
|
||||
Event::Mouse(MouseEvent::ButtonReleased(Button::Left)) => {
|
||||
|
|
@ -1608,6 +1615,10 @@ where
|
|||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
if terminal.needs_update {
|
||||
shell.request_redraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1754,20 +1765,6 @@ fn accumulate_wheel_lines(y: f32, accumulator: f32) -> (i32, f32) {
|
|||
(lines, total - lines as f32)
|
||||
}
|
||||
|
||||
fn shade(color: cosmic_text::Color, is_focused: bool) -> cosmic_text::Color {
|
||||
if is_focused {
|
||||
color
|
||||
} else {
|
||||
let shade = 0.92;
|
||||
cosmic_text::Color::rgba(
|
||||
(f32::from(color.r()) * shade) as u8,
|
||||
(f32::from(color.g()) * shade) as u8,
|
||||
(f32::from(color.b()) * shade) as u8,
|
||||
color.a(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, Message> From<TerminalBox<'a, Message>> for Element<'a, Message, cosmic::Theme, Renderer>
|
||||
where
|
||||
Message: Clone + 'a,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue