app border fixup (no transparency), terminal background image POC (#378)

* use native border (remove transparency from app window), remove css borders, remove default --term variables, force setClientData to set --term font variables on first set.

* terminal background images
This commit is contained in:
Mike Sawka
2024-03-04 23:33:54 -08:00
committed by GitHub
parent 4ef921bdd1
commit 93d46cca80
9 changed files with 27 additions and 39 deletions
+5 -3
View File
@@ -7,12 +7,14 @@
--fa-style-family: "Font Awesome 6 Sharp"; --fa-style-family: "Font Awesome 6 Sharp";
/* these variables are overridden by user settings */ /* these variables are overridden by user settings */
/*
--termfontfamily: "Hack"; --termfontfamily: "Hack";
--termfontsize: 13px; --termfontsize: 13px;
--termlineheight: 18px; --termlineheight: 15px;
--termpad: 9px; /* padding value (scaled to termfontsize) */ --termpad: 7px;
--termfontsize-sm: 11px; --termfontsize-sm: 11px;
--termlineheight-sm: 15px; --termlineheight-sm: 13px;
*/
/* base fonts */ /* base fonts */
--base-font: normal 15px "Lato", sans-serif; --base-font: normal 15px "Lato", sans-serif;
+1 -1
View File
@@ -23,5 +23,5 @@
--term-gray: #8b918a; --term-gray: #8b918a;
--term-cmdtext: #f0f0f0; --term-cmdtext: #f0f0f0;
--term-foreground: #c1c1c1; --term-foreground: #c1c1c1;
--term-background: #000000; --term-background: #00000000;
} }
+4 -22
View File
@@ -28,6 +28,10 @@ body textarea.textarea {
color: var(--app-text-color); color: var(--app-text-color);
background-color: var(--input-bg-color); background-color: var(--input-bg-color);
&:focus {
box-shadow: none;
}
&::placeholder { &::placeholder {
color: var(--input-placeholder-color); color: var(--input-placeholder-color);
} }
@@ -47,27 +51,6 @@ body input.input {
// platform overrides // platform overrides
.platform-darwin { .platform-darwin {
border-radius: var(--app-border-radius-darwin);
.main-content {
border-radius: var(--app-border-radius-darwin);
}
.main-content > :first-child {
border-top-left-radius: var(--app-border-radius-darwin);
border-bottom-left-radius: var(--app-border-radius-darwin);
}
.main-content > .collapsed:first-child + div {
border-top-left-radius: var(--app-border-radius-darwin);
border-bottom-left-radius: var(--app-border-radius-darwin);
}
.main-content > :last-child {
border-top-right-radius: var(--app-border-radius-darwin);
border-bottom-right-radius: var(--app-border-radius-darwin);
}
.logo-button-container { .logo-button-container {
width: var(--floating-logo-width-darwin); width: var(--floating-logo-width-darwin);
} }
@@ -279,7 +262,6 @@ a.a-block {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: var(--app-maincontent-bg-color); background-color: var(--app-maincontent-bg-color);
border-top: 1px solid var(--app-border-color);
.main-content { .main-content {
display: flex; display: flex;
-8
View File
@@ -3,9 +3,6 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
border-bottom: 1px solid var(--app-border-color);
border-right: 1px solid var(--app-border-color);
border-left: 1px solid var(--app-border-color);
background-color: var(--app-bg-color); background-color: var(--app-bg-color);
&.is-hidden { &.is-hidden {
@@ -36,11 +33,6 @@
font-size: var(--title-font-size); font-size: var(--title-font-size);
} }
} }
.bottom-border {
border-bottom: 1px solid var(--app-border-color);
margin-bottom: 10px;
}
} }
// This ensures the tab bar does not collide with the floating logo. The floating logo sits above the sidebar when it is not collapsed, so no additional margin is needed in that case. // This ensures the tab bar does not collide with the floating logo. The floating logo sits above the sidebar when it is not collapsed, so no additional margin is needed in that case.
-2
View File
@@ -8,8 +8,6 @@
line-height: 20px; line-height: 20px;
backdrop-filter: blur(4px); backdrop-filter: blur(4px);
z-index: 20; z-index: 20;
border-left: 1px solid var(--app-border-color);
border-bottom: 1px solid var(--app-border-color);
font-size: var(--sidebar-font-size); font-size: var(--sidebar-font-size);
font-family: var(--base-font-family); font-family: var(--base-font-family);
font-weight: var(--sidebar-font-weight); font-weight: var(--sidebar-font-weight);
+1 -1
View File
@@ -581,7 +581,7 @@ class TextAreaInput extends React.Component<{ screen: Screen; onHeightChange: ()
} }
let termFontSize = GlobalModel.getTermFontSize(); let termFontSize = GlobalModel.getTermFontSize();
let fontSize = getMonoFontSize(termFontSize); let fontSize = getMonoFontSize(termFontSize);
let termPad = Math.floor(fontSize.height / 2); let termPad = fontSize.pad;
let computedInnerHeight = displayLines * fontSize.height + 2 * termPad; let computedInnerHeight = displayLines * fontSize.height + 2 * termPad;
let computedOuterHeight = computedInnerHeight + 2 * termPad; let computedOuterHeight = computedInnerHeight + 2 * termPad;
let shellType: string = ""; let shellType: string = "";
+14
View File
@@ -1,5 +1,19 @@
.session-view { .session-view {
overflow: hidden; overflow: hidden;
position: relative;
&:before {
content: " ";
display: block;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: var(--tab-bg-image-opacity, 0.5);
background-image: var(--tab-bg-image-url, none);
background-size: cover;
}
.center-message { .center-message {
display: flex; display: flex;
-1
View File
@@ -322,7 +322,6 @@ function createMainWindow(clientData: ClientDataType | null): Electron.BrowserWi
height: bounds.height, height: bounds.height,
minWidth: 800, minWidth: 800,
minHeight: 600, minHeight: 600,
transparent: true,
icon: unamePlatform == "linux" ? "public/logos/wave-logo-dark.png" : undefined, icon: unamePlatform == "linux" ? "public/logos/wave-logo-dark.png" : undefined,
webPreferences: { webPreferences: {
preload: path.join(getElectronAppBasePath(), DistDir, "preload.js"), preload: path.join(getElectronAppBasePath(), DistDir, "preload.js"),
+2 -1
View File
@@ -1181,6 +1181,7 @@ class Model {
} }
setClientData(clientData: ClientDataType) { setClientData(clientData: ClientDataType) {
let curClientDataIsNull = this.clientData.get() == null;
let newFontFamily = clientData?.feopts?.termfontfamily; let newFontFamily = clientData?.feopts?.termfontfamily;
if (newFontFamily == null) { if (newFontFamily == null) {
newFontFamily = appconst.DefaultTermFontFamily; newFontFamily = appconst.DefaultTermFontFamily;
@@ -1189,7 +1190,7 @@ class Model {
if (newFontSize == null) { if (newFontSize == null) {
newFontSize = appconst.DefaultTermFontSize; newFontSize = appconst.DefaultTermFontSize;
} }
const ffUpdated = newFontFamily != this.getTermFontFamily(); const ffUpdated = curClientDataIsNull || newFontFamily != this.getTermFontFamily();
const fsUpdated = newFontSize != this.getTermFontSize(); const fsUpdated = newFontSize != this.getTermFontSize();
let newTheme = clientData?.feopts?.theme; let newTheme = clientData?.feopts?.theme;