Skip to content

Commit

Permalink
Bug Fix: Themes were not activating properly.
Browse files Browse the repository at this point in the history
OceanBlues: Improved application of background colors and images.
OceanBlues: Improved compatibility with dnd5e default sheets and tidy5e sheets.
Version 1.1.3 push
  • Loading branch information
MajorVictory committed Oct 14, 2020
1 parent 1310093 commit a960e2b
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Version 1.1.3

* Bug Fix: Themes were not activating properly.
* OceanBlues: Improved application of background colors and images.
* OceanBlues: Improved compatibility with dnd5e default sheets and tidy5e sheets.

## Version 1.1.2

* Bug Fix: All theme variables and shades are now written properly on activation. (Fixes #9)
Expand Down
19 changes: 19 additions & 0 deletions Whetstone.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,29 @@ Hooks.on('onThemeActivated', (themeData) => {

customStyle.html(`
.app {
color: var(--OceanBlues-text-light-color);
background: url('/${windowImage}') repeat;
background-color: var(--OceanBlues-bg-color);
background-blend-mode: var(--OceanBlues-bg-window-blendmode);
}
.window-app .window-content, .dnd5e.sheet .window-content {
color: var(--OceanBlues-text-dark-color);
background: url('/${sheetImage}') repeat;
background-color: var(--OceanBlues-bg-color);
background-blend-mode: var(--OceanBlues-bg-sheet-blendmode);
}
.tidy5e.sheet.actor.npc .spellcasting-ability {
background: url('/${sheetImage}') repeat;
background-color: var(--OceanBlues-bg-color);
background-blend-mode: var(--OceanBlues-bg-sheet-blendmode);
}`);

Hooks.on('onThemeDeactivated', (themeData) => {
if(themeData.id !== 'OceanBlues') return;

let customStyle = $('#OceanBluesCustomStyle');
if (customStyle.length) customStyle.remove();
});

});
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Whetstone",
"title": "Whetstone - Foundry Theme Manager",
"description": "A robust theme manager for Foundry, designed to make applying and customizing themes easier for users and theme authors.",
"version": "1.1.2",
"version": "1.1.3",
"author": "MajorVictory",
"esmodules": [
"Whetstone.js"
Expand All @@ -19,7 +19,7 @@
"packs": [],
"url": "https://github.com/MajorVictory/Whetstone",
"manifest": "https://raw.githubusercontent.com/MajorVictory/Whetstone/master/module.json",
"download": "https://github.com/MajorVictory/Whetstone/releases/download/v1.1.2/Whetstone.zip",
"download": "https://github.com/MajorVictory/Whetstone/releases/download/v1.1.3/Whetstone.zip",
"compatibleCoreVersion": "0.6.6",
"minimumCoreVersion": "0.6.6"
}
2 changes: 1 addition & 1 deletion modules/WhetstoneCoreConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class WhetstoneCoreConfig {

// activate all active themes
for (let i = 0, len = activate.length; i < len; ++i) {
game.Whetstone.themes.get(deactivate[i]).activate();
game.Whetstone.themes.get(activate[i].name).activate();
}
}
}
101 changes: 99 additions & 2 deletions styles/OceanBlues.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ a:hover,
.tabs .item.active,
.dnd5e.chat-card .card-header h3:hover,
.filepicker .directory > li:hover {
color: var(--OceanBlues-text-highlight-color);
color: var(--OceanBlues-highlight-color);
text-shadow: 0 0 8px var(--OceanBlues-highlight-color);
}

Expand Down Expand Up @@ -171,6 +171,12 @@ input[type="datetime-local"],
border: 1px solid var(--OceanBlues-border-color);
}

.dnd5e input[type="text"],
.dnd5e input[type="number"],
.dnd5e select {
color: var(--OceanBlues-text-dark-color);
}

select:hover,
select:focus,
input[type="text"]:hover,
Expand All @@ -185,6 +191,7 @@ input[type="range"]:focus,
0px 0px 5px var(--OceanBlues-highlight-color);
}

/*
.app {
color: var(--OceanBlues-text-light-color);
background-color: var(--OceanBlues-bg-color);
Expand All @@ -197,6 +204,7 @@ input[type="range"]:focus,
background-color: var(--OceanBlues-bg-color);
background-blend-mode: var(--OceanBlues-bg-sheet-blendmode);
}
*/

.app.sidebar-popout .window-content,
#module-management .package-list .package-title,
Expand All @@ -216,7 +224,7 @@ input[type="range"]:focus,
}

#context-menu li.context-item:hover {
color: var(--OceanBlues-text-highlight-color-color);
color: var(--OceanBlues-highlight-color);
text-shadow: 0 0 4px var(--OceanBlues-highlight-color);
}

Expand All @@ -235,6 +243,14 @@ input[type="range"]:focus,
color: var(--OceanBlues-text-dark-color-darker);
}

.dnd5e.sheet.actor .proficiency-toggle {
color: var(--OceanBlues-text-highlight-color);
}

.dnd5e.sheet.actor .proficient .proficiency-toggle {
color: var(--OceanBlues-highlight-color);
}

.tabs .item.active {
text-shadow: 0 0 10px var(--OceanBlues-highlight-color);
}
Expand All @@ -256,4 +272,85 @@ form .hint {
.filepicker .display-modes a.active {
background: var(--OceanBlues-highlight-color);
color: var(--OceanBlues-text-highlight-color);
}

.tidy5e.sheet.actor ul.attributes li.attribute .attribute-header .res-options {
color: var(--OceanBlues-text-highlight-color);
}

.tidy5e.sheet.actor .traits label,
.tidy5e.sheet.actor .traits .senses div[contenteditable]:before {
color: var(--OceanBlues-text-light-color);
}

.tidy5e.sheet.actor .inventory-filters h3,
.tidy5e.sheet.actor .inventory-filters .filter-title {
color: var(--OceanBlues-text-dark-color);
}

.dnd5e.sheet.actor .inventory-list .item-name {
color: var(--OceanBlues-text-dark-color);
}

.dnd5e.sheet .editable .rollable:hover {
color: var(--OceanBlues-highlight-color);
text-shadow: 0 0 10px var(--OceanBlues-highlight-color);
}

.dnd5e.sheet .filter-list .filter-item {
border-bottom: 3px solid var(--OceanBlues-border-color);
}

.dnd5e.sheet .filter-list .filter-item.active {
border-bottom: 3px solid var(--OceanBlues-highlight-color);
}

.dnd5e.sheet .filter-list .filter-item:hover {
text-shadow: 0 0 4px var(--OceanBlues-highlight-color);
border-bottom: 3px solid var(--OceanBlues-highlight-color);
}

.dnd5e.sheet span.sep,
.dnd5e.sheet.actor .spell-school,
.dnd5e.sheet.actor .spell-action,
.dnd5e.sheet.actor .spell-target,
.dnd5e.sheet.actor .spell-slots,
.dnd5e.sheet.actor .spell-comps,
.dnd5e.sheet.actor .inventory-list .item-detail,
.dnd5e.sheet.actor .inventory-list .item-controls a,
.dnd5e.sheet.actor .inventory-filters .currency label,
.dnd5e.sheet.actor.character .inventory .item-controls .item-toggle,
.dnd5e.sheet.actor.character .spellbook .item-controls .item-toggle,
.tidy5e.sheet.actor .inventory-list .item-detail,
.tidy5e.sheet.actor .inventory-list .item-controls,
.tidy5e.sheet.actor .inventory-list .spell-detail,
.tidy5e.sheet.actor .traits .tag {
color: var(--OceanBlues-text-dark-color);
}

.dnd5e.sheet.actor.character .resource .attribute-value label.recharge {
color: var(--OceanBlues-text-light-color);
}

.dnd5e.sheet.actor .inventory-list .item-controls a:hover,
.dnd5e.sheet.actor.character .inventory .item-controls .item-toggle.active,
.dnd5e.sheet.actor.character .spellbook .item-controls .item-toggle.active {
color: var(--OceanBlues-highlight-color);
}

.dnd5e.sheet input[type="text"]:hover,
.dnd5e.sheet input[type="number"]:hover,
.dnd5e.sheet input[type="text"]:focus,
.dnd5e.sheet input[type="number"]:focus {
border: 1px solid var(--OceanBlues-highlight-color);
}

.dnd5e.sheet.actor .spell-component.C,
.dnd5e.sheet.actor .spell-component.R {
color: var(--OceanBlues-text-highlight-color);
background: var(--OceanBlues-fg-color);
}

.dnd5e.sheet.actor ul.skills-list li.skill .skill-passive {
color: var(--OceanBlues-text-dark-color-darker);
}

0 comments on commit a960e2b

Please sign in to comment.