Skip to content

Commit

Permalink
3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorako committed Nov 25, 2023
1 parent c2daae1 commit 7c20270
Show file tree
Hide file tree
Showing 14 changed files with 167 additions and 88 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 3.1.1

- (New) Added compatibility with ripper's Taskbar module, courtesy of Kali.
- (Fix) Fixed the disabled chat message header setting resulting in poor contrast text.
- (Fix) Fixed the colored chat message header settings being less colorful than desired for CRB chat messages.
- (Fix) Fixed the foundry 2 theme having illegible text in gm-vis spans.
- (Fix) Added Levels to exclusion list.
- (Fix) Added FX Master to exclusion list.
- (Fix) Fixed button text color in CRB light theme.

# 3.1.0

- (New) Massive refactor. There's a high risk style issues, but once fixed it will apply to all themes.
Expand Down
5 changes: 5 additions & 0 deletions esmodules/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ export const themedApps = [...coreApps, ...systemApps, ...moduleApps];
/* ----------------------------------------- */
export const systemSheets = ["CreatureSheetPF2e","PartySheetPF2e","SpellPreparationSheet","ItemSheet","NPCSheetPF2e","VehicleSheetPf2e","FamiliarSheetPF2e","HazardSheetPF2e", "CharacterSheetPF2e","LootSheetPF2e"]; //|| "ItemSheet","ActorSheet", "KingdomSheetPF2e"
export const limitedScopeApplications = ["KingdomSheetPF2e","CreatureSheetPF2e", "CharacterSheetPF2e", "PartySheetPF2e", "NPCSheetPF2e", "VehicleSheetPF2e", "HUD"];

/* ----------------------------------------- */
/* Excluded */
/* ----------------------------------------- */
export const excludedApplications = ["LevelsUI", "SpecialEffectsManagement", "ParticleEffectsManagement", "FilterEffectsManagementConfig"]
13 changes: 8 additions & 5 deletions esmodules/message-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,12 @@ function getHeaderColor(html, message) {

function calcHeaderTextColor(html, message) {
const headerStyle = game.settings.get("pf2e-dorako-ui", "theme.chat-message-header-style");
const chatTheme = game.settings.get("pf2e-dorako-ui", "theme.chat-message-theme");
const defaultColorScheme = getDefaultColorScheme(chatTheme);
const inverse = inverse(defaultColorScheme);
const messageHeader = html.find(".message-header")[0];
if (headerStyle === "none") {
if (html[0].classList.contains("dark-theme") || html[0].classList.contains("foundry2")) {
return "light-header-text";
} else {
return "dark-header-text";
}
return inverse;
}

// let bgCol = messageHeader.style.backgroundColor;
Expand All @@ -122,3 +121,7 @@ function calcHeaderTextColor(html, message) {
return "light-header-text";
}
}

function inverse(color) {
return color === "dark" ? "light" : "dark";
}
4 changes: 3 additions & 1 deletion esmodules/ui-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
MODULE_NAME,
themedApps,
systemSheets,
excludedApplications,
} from "./consts.js";
import { isPremiumApplication } from "./premium-module-hooks.js";

Expand Down Expand Up @@ -144,7 +145,7 @@ Hooks.on("renderApplication", (app, html, data) => {
", SmallTimeApp" +
", SceneDarknessAdjuster";
const excludeList = excludeString.split(/[\s,]+/);
if (excludeList.includes(app.constructor.name)) {
if (excludeList.includes(app.constructor.name) || excludedApplications.includes(app.constructor.name)) {
console.debug(
`${MODULE_NAME} | render${app.constructor.name} | is included in excluded applications string ${excludeString} => do not set dorako-ui-theme to ${dorakoUiTheme}`
);
Expand All @@ -165,6 +166,7 @@ Hooks.on("renderApplication", (app, html, data) => {
app.element[0].dataset.dorakoUiScope = "unlimited";
html.find("form button[type='submit']").addClass("bright");
html.find(".item-controls button[data-action='apply']").addClass("bright");
html.find("button[data-action='accept']").addClass("bright");
html.find("form button[data-action='save']").addClass("bright");
});

Expand Down
2 changes: 1 addition & 1 deletion sass/dorako-ui/_dorako-ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ i[data-pf2-repost] {
gap: 1px;

.tag {
height: auto;
// height: auto;
}

tag,
Expand Down
1 change: 1 addition & 0 deletions sass/module-support/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
@import "pf2e-utility-buttons";
@import "pinned-chatlog";
@import "polyglot";
@import "ripper-taskbar";
@import "quick-insert";
@import "scene-preview";
@import "smalltime";
Expand Down
3 changes: 3 additions & 0 deletions sass/module-support/_monks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@
font-family: var(--sans-serif);
font-weight: unset;
}
.request-roll {
padding-left: 2px;
}
}

/* ----------------------------------------- */
Expand Down
3 changes: 3 additions & 0 deletions sass/module-support/_ripper-taskbar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#taskbar.taskbar {
width: calc((100vw - var(--sidebar-width)) / var(--ft-scale));
}
3 changes: 2 additions & 1 deletion sass/ui-theme/foundry-core/_app-ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
[data-dorako-ui-theme] {
--color-shadow-primary: transparent;
--color-shadow-highlight: transparent;
--color-bg-option: var(--input-background-color); // select dropdown
}

/* ----------------------------------------- */
Expand Down Expand Up @@ -607,7 +608,7 @@
}
select.tag {
border-width: 1px 1px 1px 1px;
height: var(--font-size-23);
// height: var(--font-size-23);
}

tag {
Expand Down
21 changes: 19 additions & 2 deletions sass/ui-theme/themes/_crb-light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
/* ----------------------------------------- */
/* PF2e sheets */
/* ----------------------------------------- */
[data-dorako-ui-theme^="crb"][data-color-scheme="light"] {
[data-dorako-ui-theme="crb"][data-color-scheme="light"] {
--sheet: var(--sheet-light);
--ornamentation: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33' height='33' overflow='scroll'%3E%3Cstyle%3E.st1%7Bstroke:%23231f20;stroke-miterlimit:10%7D.st1,.st2%7Bfill:none%7D%3C/style%3E%3Cg opacity='.25'%3E%3Cpath class='st1' d='M.5 20v-7'/%3E%3Cpath class='st2' d='M13 20v-7'/%3E%3Cpath class='st1' d='M13 .5h7'/%3E%3Cpath class='st2' d='M13 13h7'/%3E%3Cpath class='st1' d='M32.5 13v7'/%3E%3Cpath class='st2' d='M20 13v7'/%3E%3Cpath class='st1' d='M20 32.5h-7'/%3E%3Cpath class='st2' d='M20 20h-7'/%3E%3Cg%3E%3Cpath class='st1' d='M.5.5h3.1v3.1H.5zM3.6 3.6h3.1v3.1H3.6zM6.8 3.6h3.1v3.1H6.8zM3.6 6.8h3.1v3.1H3.6zM3.6 6.8H.5V13M13 .5H6.8v3.1'/%3E%3C/g%3E%3Cg%3E%3Cpath class='st1' d='M29.4.5h3.1v3.1h-3.1zM26.3 3.6h3.1v3.1h-3.1zM26.3 6.8h3.1v3.1h-3.1zM23.1 3.6h3.1v3.1h-3.1zM26.3 3.6V.5H20'/%3E%3Cpath class='st1' d='M32.5 13V6.8h-3.1'/%3E%3C/g%3E%3Cg%3E%3Cpath class='st1' d='M29.4 29.4h3.1v3.1h-3.1z'/%3E%3Cpath class='st1' d='M26.3 26.3h3.1v3.1h-3.1zM23.1 26.3h3.1v3.1h-3.1zM26.3 23.1h3.1v3.1h-3.1z'/%3E%3Cpath class='st1' d='M29.4 26.3h3.1V20M20 32.5h6.3v-3.1'/%3E%3C/g%3E%3Cg%3E%3Cpath class='st1' d='M.5 29.4h3.1v3.1H.5zM3.6 26.3h3.1v3.1H3.6zM3.6 23.1h3.1v3.1H3.6zM6.8 26.3h3.1v3.1H6.8z'/%3E%3Cpath class='st1' d='M6.8 29.4v3.1H13M.5 20v6.3h3.1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
--ornamentation: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33' height='33' overflow='scroll'%3E%3Cstyle%3E.st1{stroke:wheat;stroke-miterlimit:10}.st1,.st2{fill:none}%3C/style%3E%3Cg opacity='1'%3E%3Cpath class='st1' d='M.5 20v-7'/%3E%3Cpath class='st2' d='M13 20v-7'/%3E%3Cpath class='st1' d='M13 .5h7'/%3E%3Cpath class='st2' d='M13 13h7'/%3E%3Cpath class='st1' d='M32.5 13v7'/%3E%3Cpath class='st2' d='M20 13v7'/%3E%3Cpath class='st1' d='M20 32.5h-7'/%3E%3Cpath class='st2' d='M20 20h-7'/%3E%3Cpath class='st1' d='M.5.5h3.1v3.1H.5zm3.1 3.1h3.1v3.1H3.6zm3.2 0h3.1v3.1H6.8zM3.6 6.8h3.1v3.1H3.6zm0 0H.5V13M13 .5H6.8v3.1M29.4.5h3.1v3.1h-3.1zm-3.1 3.1h3.1v3.1h-3.1zm0 3.2h3.1v3.1h-3.1zm-3.2-3.2h3.1v3.1h-3.1zm3.2 0V.5H20M32.5 13V6.8h-3.1M29.4 29.4h3.1v3.1h-3.1z'/%3E%3Cpath class='st1' d='M26.3 26.3h3.1v3.1h-3.1zm-3.2 0h3.1v3.1h-3.1zm3.2-3.2h3.1v3.1h-3.1z'/%3E%3Cpath class='st1' d='M29.4 26.3h3.1V20M20 32.5h6.3v-3.1'/%3E%3Cg%3E%3Cpath class='st1' d='M.5 29.4h3.1v3.1H.5zm3.1-3.1h3.1v3.1H3.6zm0-3.2h3.1v3.1H3.6zm3.2 3.2h3.1v3.1H6.8zM6.8 29.4v3.1H13M.5 20v6.3h3.1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
// --ornamentation: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33' height='33' overflow='scroll'%3E%3Cstyle%3E.st1{stroke:wheat;stroke-miterlimit:10}.st1,.st2{fill:none}%3C/style%3E%3Cg opacity='1'%3E%3Cpath class='st1' d='M.5 20v-7'/%3E%3Cpath class='st2' d='M13 20v-7'/%3E%3Cpath class='st1' d='M13 .5h7'/%3E%3Cpath class='st2' d='M13 13h7'/%3E%3Cpath class='st1' d='M32.5 13v7'/%3E%3Cpath class='st2' d='M20 13v7'/%3E%3Cpath class='st1' d='M20 32.5h-7'/%3E%3Cpath class='st2' d='M20 20h-7'/%3E%3Cpath class='st1' d='M.5.5h3.1v3.1H.5zm3.1 3.1h3.1v3.1H3.6zm3.2 0h3.1v3.1H6.8zM3.6 6.8h3.1v3.1H3.6zm0 0H.5V13M13 .5H6.8v3.1M29.4.5h3.1v3.1h-3.1zm-3.1 3.1h3.1v3.1h-3.1zm0 3.2h3.1v3.1h-3.1zm-3.2-3.2h3.1v3.1h-3.1zm3.2 0V.5H20M32.5 13V6.8h-3.1M29.4 29.4h3.1v3.1h-3.1z'/%3E%3Cpath class='st1' d='M26.3 26.3h3.1v3.1h-3.1zm-3.2 0h3.1v3.1h-3.1zm3.2-3.2h3.1v3.1h-3.1z'/%3E%3Cpath class='st1' d='M29.4 26.3h3.1V20M20 32.5h6.3v-3.1'/%3E%3Cg%3E%3Cpath class='st1' d='M.5 29.4h3.1v3.1H.5zm3.1-3.1h3.1v3.1H3.6zm0-3.2h3.1v3.1H3.6zm3.2 3.2h3.1v3.1H6.8zM6.8 29.4v3.1H13M.5 20v6.3h3.1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
--window-app-background: var(--sheet);
--window-app-border-color: var(--tertiary);
--window-app-border-style: 1px solid;
Expand All @@ -49,6 +49,7 @@
--app-border-color: transparent;
--app-border-style: none;
--app-text-shadow: none;
--button-text-color: black;
--box-shadow: var(--gold-and-glow);

--button-focus-outline-color: var(--gold-brown);
Expand Down Expand Up @@ -157,6 +158,22 @@
text-shadow: none;
}

nav.sheet-tabs {
a.item,
.tab {
--box-shadow: none;
--app-border-style: 1px solid;
--button-border-color: var(--color-text-light-5);
--button-background-color: rgba(255, 255, 255, 0.5);
text-shadow: none;

&:hover,
&.active {
text-shadow: 0px 1px 2px black;
}
}
}

/* ----------------------------------------- */
/* Familiar sheet */
/* ----------------------------------------- */
Expand Down
19 changes: 14 additions & 5 deletions sass/ui-theme/themes/_crb.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
[data-dorako-ui-theme^="crb"]:not([data-color-scheme]) {
[data-dorako-ui-theme="crb"]:not([data-color-scheme]) {
--color-light-2: var(--color-text-light-highlight);
--color-light-3: var(--color-text-light-heading);
--button-background-color: var(--glass-bg-light);
--app-background: var(--glass-bg);
--app-border-color: transparent;
--app-border-style: none;
--input-text-color: var(--color-light-2);

&#token-hud,
&#tile-hud {
--button-background-color: var(--glass-bg);
}
}

[data-dorako-ui-theme^="crb"] {
[data-dorako-ui-theme="crb"] {
--icon-border-color: var(--tertiary);
--color-scrollbar: var(--tertiary);
--color-scrollbar-border: color-mix(in srgb, var(--tertiary) 50%, black);
Expand Down Expand Up @@ -91,15 +97,18 @@
}

&.chat-message .message-header.dorako-header {
background-image: var(--sheet);
background-image: var(--sheet-light);
background-size: cover;
background-color: var(--header-color);
background-blend-mode: screen;
background-blend-mode: multiply;
border-bottom: 1px solid var(--tertiary);
box-shadow: 0px 1px 0px 0px var(--gold-brown);

margin-bottom: 5px;

&.light-header-text {
--color-text-dark-secondary: var(--color-light-1);
}

.message-timestamp,
.header-meta {
border: none;
Expand Down
9 changes: 7 additions & 2 deletions sass/ui-theme/themes/_foundry2.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@
[data-dorako-ui-theme="foundry2"],
[data-dorako-ui-theme="foundry2"][data-dorako-ui-scope="unlimited"] {
--bg: var(--color-warm-3);
--visibility-gm-bg: var(--color-warm-3);
--blind-roll: var(--color-warm-3);
// --visibility-gm-bg: var(--color-warm-3);
// --blind-roll: var(--color-warm-3);
--icon-border-color: var(--color-warm-1);

--input-disabled-background-color: var(--color-cool-5);
--input-disabled-border-color: var(--color-cool-4);
Expand All @@ -122,6 +123,10 @@
--button-disabled-background-color: var(--color-warm-5);
--button-disabled-border-color: var(--color-warm-4);

&.chat-message {
border: 1px solid var(--border-tint);
}

&.actor.sheet .crb-style .sheet-body {
--primary: var(--color-warm-2);
--secondary: var(--color-cool-3);
Expand Down
Loading

0 comments on commit 7c20270

Please sign in to comment.