From 6bdd7868157e7931a1603ef50acbdb9b970a0911 Mon Sep 17 00:00:00 2001 From: piexel Date: Wed, 25 Nov 2026 19:18:19 +0100 Subject: [PATCH] Tint the title bar with the open pack colour - Fade the pack badge colour out from behind the pack name, as IntelliJ tints its toolbar --- .../src/renderer/src/studio/StudioToolbar.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/studio/src/renderer/src/studio/StudioToolbar.tsx b/studio/src/renderer/src/studio/StudioToolbar.tsx index ab73dcc08..39e654f27 100644 --- a/studio/src/renderer/src/studio/StudioToolbar.tsx +++ b/studio/src/renderer/src/studio/StudioToolbar.tsx @@ -12,6 +12,10 @@ import type { ShortcutAction } from './shortcuts' import { useKeyText } from './useBindings' import { IrisLogo } from './IrisLogo' import { PackSwitcher } from './PackSwitcher' +import { badgeColour } from './packBadges' + +/** How strongly the open pack's colour tints the bar behind its name, as IntelliJ tints its toolbar with the project colour. */ +const PACK_TINT_PERCENT = 28 interface StudioToolbarProps { world: WorldInfo @@ -26,7 +30,8 @@ interface StudioToolbarProps { /** The window's bar: the pack the studio is on, which switches to another, and the studio's own buttons. */ export function StudioToolbar({ world, openingPack, loadPacks, onOpenPack, onHelp, onSettings }: StudioToolbarProps): React.JSX.Element { return ( -
+
+
@@ -40,6 +45,16 @@ export function StudioToolbar({ world, openingPack, loadPacks, onOpenPack, onHel ) } +function PackTint({ colour }: { colour: string }): React.JSX.Element { + return ( + + ) +} + interface MapToolsProps { toggles: StudioToggles hasPlayers: boolean