mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-25 23:22:06 -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";
|
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>
|
||||||
|
|
Loading…
Reference in a new issue