forked from abner/for-legacy-web
Added fixes to electron titlebar
This commit is contained in:
2
external/lang
vendored
2
external/lang
vendored
Submodule external/lang updated: e03c9f3a9e...8a9c21da85
@@ -1,11 +1,11 @@
|
|||||||
import { X, Minus, Square, Wrench } from "@styled-icons/boxicons-regular";
|
import { X, Minus, Square } from "@styled-icons/boxicons-regular";
|
||||||
|
import { Wrench } from "@styled-icons/boxicons-solid";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
|
|
||||||
export const USE_TITLEBAR = window.isNative && !window.native.getConfig().frame;
|
export const USE_TITLEBAR = window.isNative && !window.native.getConfig().frame;
|
||||||
|
|
||||||
const TitlebarBase = styled.div`
|
const TitlebarBase = styled.div`
|
||||||
height: var(--titlebar-height);
|
height: var(--titlebar-height);
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -13,18 +13,19 @@ const TitlebarBase = styled.div`
|
|||||||
.title {
|
.title {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
|
height: var(--titlebar-height);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin-left: 8px;
|
margin-inline-start: 10px;
|
||||||
|
margin-top: 4px;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
height: calc(var(--titlebar-height) / 2);
|
height: calc(var(--titlebar-height) / 3);
|
||||||
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +58,7 @@ const TitlebarBase = styled.div`
|
|||||||
export function Titlebar() {
|
export function Titlebar() {
|
||||||
return (
|
return (
|
||||||
<TitlebarBase>
|
<TitlebarBase>
|
||||||
<span class="title">
|
<div class="title">
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 193.733 37.438">
|
viewBox="0 0 193.733 37.438">
|
||||||
@@ -70,7 +71,7 @@ export function Titlebar() {
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
{window.native.getConfig().build === "dev" && <Wrench />}
|
{window.native.getConfig().build === "dev" && <Wrench />}
|
||||||
</span>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div onClick={window.native.min}>
|
<div onClick={window.native.min}>
|
||||||
<Minus size={20} />
|
<Minus size={20} />
|
||||||
@@ -79,7 +80,7 @@ export function Titlebar() {
|
|||||||
<Square size={14} />
|
<Square size={14} />
|
||||||
</div>
|
</div>
|
||||||
<div onClick={window.native.close} class="error">
|
<div onClick={window.native.close} class="error">
|
||||||
<X size={20} />
|
<X size={24} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</TitlebarBase>
|
</TitlebarBase>
|
||||||
|
|||||||
Reference in New Issue
Block a user