fix default font

This commit is contained in:
sawka 2024-02-24 12:10:15 -08:00
parent f2790d0472
commit 1e433b1766
7 changed files with 15 additions and 16 deletions

View File

@ -23,7 +23,7 @@ body {
body { body {
&.is-dev .sidebar { &.is-dev .sidebar {
background-color: @base-background-dev; // background-color: @base-background-dev;
} }
} }
@ -197,6 +197,11 @@ svg.icon {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
background-color: @base-background;
border-top: 1px solid @thin-border-color;
border-right: 1px solid @thin-border-color;
border-left: 1px solid @thin-border-color;
border-radius: 10px 10px 0 0;
} }
input[type="checkbox"] { input[type="checkbox"] {

View File

@ -16,6 +16,8 @@ export const LineContainer_Sidebar = "sidebar";
export const ConfirmKey_HideShellPrompt = "hideshellprompt"; export const ConfirmKey_HideShellPrompt = "hideshellprompt";
export const DefaultTermFontFamily = "JetBrains Mono";
export const NoStrPos = -1; export const NoStrPos = -1;
export const RemotePtyRows = 8; export const RemotePtyRows = 8;

View File

@ -8,11 +8,11 @@
position: relative; position: relative;
font-size: 12.5px; font-size: 12.5px;
line-height: 20px; line-height: 20px;
backdrop-filter: blur(4px);
z-index: 20; z-index: 20;
border-radius: 10px; border-radius: 0 0 10px 10px;
border-left: 1px solid @thin-border-color; border-left: 1px solid @thin-border-color;
border-bottom: 1px solid @thin-border-color; border-bottom: 1px solid @thin-border-color;
background-color: @base-background;
.title-bar-drag { .title-bar-drag {
-webkit-app-region: drag; -webkit-app-region: drag;

View File

@ -10,8 +10,10 @@
padding: var(--termfontsize); padding: var(--termfontsize);
z-index: 100; z-index: 100;
border-top: 1px solid @thin-border-color; border-top: 1px solid @thin-border-color;
opacity: 0.65;
&.active { &.active {
opacity: 1;
} }
&.has-info { &.has-info {

View File

@ -5,10 +5,6 @@
border-top: 1px solid transparent; border-top: 1px solid transparent;
font-size: 12.5px; font-size: 12.5px;
&:first-child {
border-radius: 8px 0px 0px 0px;
}
&.color-green, &.color-green,
&.color-default { &.color-default {
svg.svg-icon-inner path { svg.svg-icon-inner path {
@ -291,9 +287,6 @@
} }
&:hover { &:hover {
.screen-tab:not(:hover) .tab-index {
.positional-icon-visible;
}
.screen-tab:hover .actions { .screen-tab:hover .actions {
.positional-icon-visible; .positional-icon-visible;
} }

View File

@ -329,7 +329,7 @@ class Model {
let cdata = this.clientData.get(); let cdata = this.clientData.get();
let ff = cdata?.feopts?.termfontfamily; let ff = cdata?.feopts?.termfontfamily;
if (ff == null) { if (ff == null) {
ff = "JetBrains Mono, monospace"; ff = appconst.DefaultTermFontFamily;
} }
return ff; return ff;
} }
@ -1143,7 +1143,7 @@ class Model {
setClientData(clientData: ClientDataType) { setClientData(clientData: ClientDataType) {
let newFontFamily = clientData?.feopts?.termfontfamily; let newFontFamily = clientData?.feopts?.termfontfamily;
if (newFontFamily == null) { if (newFontFamily == null) {
newFontFamily = "JetBrains Mono"; newFontFamily = appconst.DefaultTermFontFamily;
} }
let newFontSize = clientData?.feopts?.termfontsize; let newFontSize = clientData?.feopts?.termfontsize;
if (newFontSize == null) { if (newFontSize == null) {

View File

@ -334,10 +334,7 @@ function loadFonts(termFont: string) {
if (termFont == "Hack") { if (termFont == "Hack") {
loadHackFont(); loadHackFont();
} }
document.documentElement.style.setProperty( document.documentElement.style.setProperty("--termfontfamily", '"' + termFont + '"');
"--termfontfamily",
'"' + termFont + '"' + ', "JetBrains Mono", monospace'
);
} }
const DOW_STRS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; const DOW_STRS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];