Fixed titlebar

This commit is contained in:
nizune 2021-08-03 19:28:22 +02:00
parent f25dae77aa
commit 85879faf7b

View file

@ -1,4 +1,4 @@
import { Wrench } from "@styled-icons/boxicons-solid"; import { Wrench, Microphone, VolumeFull } from "@styled-icons/boxicons-solid";
import styled from "styled-components"; import styled from "styled-components";
import Tooltip from "../common/Tooltip"; import Tooltip from "../common/Tooltip";
@ -11,15 +11,36 @@ const TitlebarBase = styled.div`
user-select: none; user-select: none;
align-items: center; align-items: center;
.drag {
.title {
flex-grow: 1; flex-grow: 1;
-webkit-app-region: drag; -webkit-app-region: drag;
height: var(--titlebar-height); margin-top: 10px;
height: 100%;
}
.quick {
color: var(--secondary-foreground);
> div, > div > div {
width: var(--titlebar-height) !important;
}
&.disabled {
color: var(--error);
}
&.unavailable {
background: var(--error);
}
}
.title {
-webkit-app-region: drag;
/*height: var(--titlebar-height);*/
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
margin-inline-start: 10px; margin-inline-start: 10px;
margin-top: 4px; margin-top: 10px;
gap: 6px; gap: 6px;
display: flex; display: flex;
align-items: center; align-items: center;
@ -28,7 +49,7 @@ const TitlebarBase = styled.div`
color: var(--titlebar-logo-color); color: var(--titlebar-logo-color);
svg { svg {
margin-bottom: 4px; margin-bottom: 10px;
} }
svg:first-child { svg:first-child {
@ -80,6 +101,23 @@ export function Titlebar() {
</svg> </svg>
{window.native.getConfig().build === "dev" && <Wrench size="12.5"/>} {window.native.getConfig().build === "dev" && <Wrench size="12.5"/>}
</div> </div>
{/*<div class="actions quick">
<Tooltip
content="Mute"
placement="bottom">
<div onClick={window.native.min}>
<Microphone size={15}/>
</div>
</Tooltip>
<Tooltip
content="Deafen"
placement="bottom">
<div onClick={window.native.min}>
<VolumeFull size={15}/>
</div>
</Tooltip>
</div>*/}
<div class="drag" />
<UpdateIndicator style="titlebar" /> <UpdateIndicator style="titlebar" />
<div class="actions"> <div class="actions">
<div onClick={window.native.min}> <div onClick={window.native.min}>