From 6b311a0b9429e71f305b0288d5acaaf91eb03374 Mon Sep 17 00:00:00 2001 From: Matt Potts Date: Tue, 20 Feb 2024 11:25:41 +0000 Subject: [PATCH] Fix: header button click error and scrollbar rendering (#283) Co-authored-by: Matt Potts --- docs/_config.yml | 2 +- package.json | 2 +- src/scripts/module.ts | 2 +- src/styles/module.less | 35 ++++++++++++++++++++++++++++------- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/docs/_config.yml b/docs/_config.yml index 3c3f6ed4..693821f3 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,4 +1,4 @@ -title: Fabricate 0.10.19 +title: Fabricate 0.10.20 email: matt@misterpotts.uk description: >- End user documentation for the Foundry Virtual Tabletop (VTT) Module, "Fabricate". diff --git a/package.json b/package.json index 1c1e71c8..b9808b05 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fabricate", - "version": "0.10.19", + "version": "0.10.20", "description": "A system-agnostic, flexible crafting module for FoundryVT", "main": "index.js", "type": "module", diff --git a/src/scripts/module.ts b/src/scripts/module.ts index 76e5f0dd..8e78d73a 100644 --- a/src/scripts/module.ts +++ b/src/scripts/module.ts @@ -134,7 +134,7 @@ Hooks.on("renderActorSheet", async (actorSheet: ActorSheet, html: any) => { const headerButton = { label: "Crafting", tooltip: "Fabricate Crafting", - class: "fab-actor-sheet-header-button header-button", + class: "fab-actor-sheet-header-button", icon: "fas fabricate-icon-logo", onclick: async () => { await fabricateUserInterfaceAPI.renderActorCraftingApp({ diff --git a/src/styles/module.less b/src/styles/module.less index 26edf80b..591b28d3 100644 --- a/src/styles/module.less +++ b/src/styles/module.less @@ -1293,6 +1293,7 @@ END COMMON STRUCTURAL STYLES .dnd5e2 { .fab-actor-sheet-header-button { + margin-top: 4px !important; .fab-button-text { display: none; } @@ -1347,9 +1348,22 @@ END COMMON STRUCTURAL STYLES ===================================================================== */ +.scrollbar-reset { + * { + scrollbar-color: initial; + scrollbar-width: initial; + } +} + +.fab-application-container { + .scrollbar-reset(); +} + #fab-tw-application-container { @import (inline) "preflight-reset.css"; + .scrollbar-reset(); + a { &:hover { text-shadow: none; @@ -1379,7 +1393,7 @@ END COMMON STRUCTURAL STYLES } .scroll-track { - border-radius: 3px; + border-radius: 6px; box-shadow: 0 0 1px #999 inset; } @@ -1390,16 +1404,23 @@ END COMMON STRUCTURAL STYLES &::-webkit-scrollbar-thumb { .scroll-thumb(); } + &::-webkit-scrollbar { + width: 6px; + } } - .scroll-primary::-webkit-scrollbar-thumb { - .scroll-thumb(); - background: #ac9e6c; + .scroll-primary { + &::-webkit-scrollbar-thumb { + .scroll-thumb(); + background: #ac9e6c; + } } - .scroll-secondary::-webkit-scrollbar-thumb { - .scroll-thumb(); - background: #bc9276; + .scroll-secondary { + &::-webkit-scrollbar-thumb { + .scroll-thumb(); + background: #bc9276; + } } img.avatar-image {