Skip to content

Commit

Permalink
Consistent grid size
Browse files Browse the repository at this point in the history
  • Loading branch information
spaaaacccee committed Oct 26, 2023
1 parent 97e48f2 commit 825d449
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
13 changes: 8 additions & 5 deletions client/src/hooks/useTitleBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useEffect } from "react";
import { name } from "public/manifest.json";
import { getContrastRatio } from "@mui/material";
import { defer } from "lodash";
import { name } from "public/manifest.json";
import { useEffect } from "react";

const getForegroundColor = (bg: string) =>
getContrastRatio(bg, "#ffffff") > getContrastRatio(bg, "#000000")
Expand All @@ -9,9 +10,11 @@ const getForegroundColor = (bg: string) =>

export function useTitleBar(color: string) {
useEffect(() => {
document
.querySelector('meta[name="theme-color"]')!
.setAttribute("content", color);
defer(() =>
document
.querySelector('meta[name="theme-color"]')!
.setAttribute("content", color)
);
document.title = name;
if ("electron" in window) {
(window.electron as any).invoke(
Expand Down
2 changes: 1 addition & 1 deletion client/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
html,
body,
#root {
background-color: #1c2128;
background-color: #1c2128 !important;
width: 100%;
height: 100%;
user-select: none;
Expand Down
2 changes: 1 addition & 1 deletion client/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta name="description" content="Debugger and Visualiser for Pathfinding Algorithms" />
<link rel="apple-touch-icon" href="/logo192.png" />
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#edf0ef" />
<meta name="theme-color" content="#1c2128" />
<title></title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions client/src/public-dev/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
],
"start_url": "./",
"display": "standalone",
"theme_color": "#607d8b",
"theme_color": "#1c2128",
"scope": ".",
"background_color": "#546e7a",
"background_color": "#1c2128",
"display_override": ["window-controls-overlay"]
}
4 changes: 2 additions & 2 deletions client/src/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
],
"start_url": "./",
"display": "standalone",
"theme_color": "#607d8b",
"theme_color": "#1c2128",
"scope": ".",
"background_color": "#546e7a",
"background_color": "#1c2128",
"display_override": ["window-controls-overlay"],
"screenshots": [
{
Expand Down
2 changes: 1 addition & 1 deletion internal-renderers/src/d2-renderer/D2RendererWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class D2RendererWorker extends EventEmitter<
ctx.fillStyle = this.#options.backgroundColor;
ctx.fillRect(0, 0, tile.width, tile.height);

const length = 16;
const length = tile.width * 0.05;
const thickness = 1;
ctx.fillStyle = `rgba(127,127,127,0.36)`;
ctx.fillRect(
Expand Down

0 comments on commit 825d449

Please sign in to comment.