issue 75: Unable to see icons in GM ToolBox and text in GM Monitor

This commit is contained in:
Litasa
2026-02-28 20:58:16 +00:00
parent 890223021a
commit f6ed462bce
6 changed files with 44 additions and 17 deletions

View File

@@ -166,6 +166,15 @@ export class GmMonitor extends HandlebarsApplicationMixin(ApplicationV2) {
}
}
);
// Apply global interface theme if it is set
if (!this.options.classes.includes("themed")) {
this.element.classList.remove("theme-light", "theme-dark");
const {colorScheme} = game.settings.get("core", "uiConfig");
if (colorScheme.interface) {
this.element.classList.add("themed", `theme-${colorScheme.interface}`);
}
}
}
/** @override ApplicationV2 */

View File

@@ -5,10 +5,11 @@ export class GmToolbox extends HandlebarsApplicationMixin(ApplicationV2) {
/** @override ApplicationV2 */
static get DEFAULT_OPTIONS() { return {
id: "l5r5e-gm-toolbox",
classes: ["faded-ui"],
window: {
contentClasses: ["l5r5e", "gm-toolbox", "faded-ui"],
contentClasses: ["l5r5e", "gm-toolbox"],
title: "l5r5e.gm.toolbox.title",
minimizable: true,
minimizable: false,
},
position: {
width: "auto",
@@ -89,6 +90,19 @@ export class GmToolbox extends HandlebarsApplicationMixin(ApplicationV2) {
options.position.left = 220; //x - 630;
}
async _onRender(context, options) {
await super._onRender(context, options);
if (this.options.classes.includes("themed")) {
return;
}
this.element.classList.remove("theme-light", "theme-dark");
const {colorScheme} = game.settings.get("core", "uiConfig");
if (colorScheme.interface) {
this.element.classList.add("themed", `theme-${colorScheme.interface}`);
}
}
/**
* The GM Toolbox should not be removed when toggling the main menu with the esc key etc.
* @override ApplicationV2