From 1e433b17663974ba828e61731302e082f48a22c6 Mon Sep 17 00:00:00 2001 From: sawka Date: Sat, 24 Feb 2024 12:10:15 -0800 Subject: [PATCH] fix default font --- src/app/app.less | 7 ++++++- src/app/appconst.ts | 2 ++ src/app/sidebar/sidebar.less | 4 ++-- src/app/workspace/cmdinput/cmdinput.less | 2 ++ src/app/workspace/screen/tabs.less | 7 ------- src/models/model.ts | 4 ++-- src/util/util.ts | 5 +---- 7 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/app/app.less b/src/app/app.less index 3cdf3051f..99aa44aff 100644 --- a/src/app/app.less +++ b/src/app/app.less @@ -23,7 +23,7 @@ body { body { &.is-dev .sidebar { - background-color: @base-background-dev; + // background-color: @base-background-dev; } } @@ -197,6 +197,11 @@ svg.icon { position: absolute; top: 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"] { diff --git a/src/app/appconst.ts b/src/app/appconst.ts index d8b05e742..98a34282b 100644 --- a/src/app/appconst.ts +++ b/src/app/appconst.ts @@ -16,6 +16,8 @@ export const LineContainer_Sidebar = "sidebar"; export const ConfirmKey_HideShellPrompt = "hideshellprompt"; +export const DefaultTermFontFamily = "JetBrains Mono"; + export const NoStrPos = -1; export const RemotePtyRows = 8; diff --git a/src/app/sidebar/sidebar.less b/src/app/sidebar/sidebar.less index 7f20918f2..ccdf274e2 100644 --- a/src/app/sidebar/sidebar.less +++ b/src/app/sidebar/sidebar.less @@ -8,11 +8,11 @@ position: relative; font-size: 12.5px; line-height: 20px; - backdrop-filter: blur(4px); z-index: 20; - border-radius: 10px; + border-radius: 0 0 10px 10px; border-left: 1px solid @thin-border-color; border-bottom: 1px solid @thin-border-color; + background-color: @base-background; .title-bar-drag { -webkit-app-region: drag; diff --git a/src/app/workspace/cmdinput/cmdinput.less b/src/app/workspace/cmdinput/cmdinput.less index e30be2e5b..b591d9369 100644 --- a/src/app/workspace/cmdinput/cmdinput.less +++ b/src/app/workspace/cmdinput/cmdinput.less @@ -10,8 +10,10 @@ padding: var(--termfontsize); z-index: 100; border-top: 1px solid @thin-border-color; + opacity: 0.65; &.active { + opacity: 1; } &.has-info { diff --git a/src/app/workspace/screen/tabs.less b/src/app/workspace/screen/tabs.less index ba951dc90..0e203aec0 100644 --- a/src/app/workspace/screen/tabs.less +++ b/src/app/workspace/screen/tabs.less @@ -5,10 +5,6 @@ border-top: 1px solid transparent; font-size: 12.5px; - &:first-child { - border-radius: 8px 0px 0px 0px; - } - &.color-green, &.color-default { svg.svg-icon-inner path { @@ -291,9 +287,6 @@ } &:hover { - .screen-tab:not(:hover) .tab-index { - .positional-icon-visible; - } .screen-tab:hover .actions { .positional-icon-visible; } diff --git a/src/models/model.ts b/src/models/model.ts index 32ebbd106..435493a16 100644 --- a/src/models/model.ts +++ b/src/models/model.ts @@ -329,7 +329,7 @@ class Model { let cdata = this.clientData.get(); let ff = cdata?.feopts?.termfontfamily; if (ff == null) { - ff = "JetBrains Mono, monospace"; + ff = appconst.DefaultTermFontFamily; } return ff; } @@ -1143,7 +1143,7 @@ class Model { setClientData(clientData: ClientDataType) { let newFontFamily = clientData?.feopts?.termfontfamily; if (newFontFamily == null) { - newFontFamily = "JetBrains Mono"; + newFontFamily = appconst.DefaultTermFontFamily; } let newFontSize = clientData?.feopts?.termfontsize; if (newFontSize == null) { diff --git a/src/util/util.ts b/src/util/util.ts index 33e2a863e..c459f5133 100644 --- a/src/util/util.ts +++ b/src/util/util.ts @@ -334,10 +334,7 @@ function loadFonts(termFont: string) { if (termFont == "Hack") { loadHackFont(); } - document.documentElement.style.setProperty( - "--termfontfamily", - '"' + termFont + '"' + ', "JetBrains Mono", monospace' - ); + document.documentElement.style.setProperty("--termfontfamily", '"' + termFont + '"'); } const DOW_STRS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];