mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-25 07:02:10 -05:00
Added fixes to electron titlebar
This commit is contained in:
parent
4ae0dc6935
commit
f1626b9c99
2 changed files with 11 additions and 10 deletions
2
external/lang
vendored
2
external/lang
vendored
|
@ -1 +1 @@
|
|||
Subproject commit e03c9f3a9ef39b6d93a5890a3ee1a64cfb1ffec4
|
||||
Subproject commit 8a9c21da8527b9609404ad64205f6b876c9f53d2
|
|
@ -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";
|
||||
|
||||
export const USE_TITLEBAR = window.isNative && !window.native.getConfig().frame;
|
||||
|
||||
const TitlebarBase = styled.div`
|
||||
height: var(--titlebar-height);
|
||||
|
||||
display: flex;
|
||||
user-select: none;
|
||||
align-items: center;
|
||||
|
@ -13,18 +13,19 @@ const TitlebarBase = styled.div`
|
|||
.title {
|
||||
flex-grow: 1;
|
||||
-webkit-app-region: drag;
|
||||
|
||||
height: var(--titlebar-height);
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
margin-left: 8px;
|
||||
|
||||
margin-inline-start: 10px;
|
||||
margin-top: 4px;
|
||||
gap: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
|
||||
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() {
|
||||
return (
|
||||
<TitlebarBase>
|
||||
<span class="title">
|
||||
<div class="title">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 193.733 37.438">
|
||||
|
@ -70,7 +71,7 @@ export function Titlebar() {
|
|||
/>
|
||||
</svg>
|
||||
{window.native.getConfig().build === "dev" && <Wrench />}
|
||||
</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div onClick={window.native.min}>
|
||||
<Minus size={20} />
|
||||
|
@ -79,7 +80,7 @@ export function Titlebar() {
|
|||
<Square size={14} />
|
||||
</div>
|
||||
<div onClick={window.native.close} class="error">
|
||||
<X size={20} />
|
||||
<X size={24} />
|
||||
</div>
|
||||
</div>
|
||||
</TitlebarBase>
|
||||
|
|
Loading…
Reference in a new issue