Merge branch 'fix/inventory-scroll' of https://github.com/Foundryborne/daggerheart into fix/inventory-scroll

This commit is contained in:
WBHarry 2025-07-25 00:02:37 +02:00
commit 034a9dcb18
9 changed files with 146 additions and 114 deletions

View file

@ -0,0 +1,19 @@
@import '../../../utils/colors.less';
@import '../../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character {
.tab.effects {
.effects-sections {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
padding: 20px 0;
padding-top: 10px;
scrollbar-width: thin;
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
}
}
}

View file

@ -11,7 +11,6 @@
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%); mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
padding: 20px 0; padding: 20px 0;
padding-top: 10px; padding-top: 10px;
height: 84%;
scrollbar-width: thin; scrollbar-width: thin;
scrollbar-color: light-dark(@dark-blue, @golden) transparent; scrollbar-color: light-dark(@dark-blue, @golden) transparent;

View file

@ -97,7 +97,6 @@
overflow-y: auto; overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 10%, black 98%, transparent 100%); mask-image: linear-gradient(0deg, transparent 0%, black 10%, black 98%, transparent 100%);
padding: 20px 0; padding: 20px 0;
height: 84%;
scrollbar-width: thin; scrollbar-width: thin;
scrollbar-color: light-dark(@dark-blue, @golden) transparent; scrollbar-color: light-dark(@dark-blue, @golden) transparent;

View file

@ -63,7 +63,7 @@
flex-direction: column; flex-direction: column;
top: -20px; top: -20px;
gap: 30px; gap: 30px;
margin-bottom: -10px; margin-bottom: -16px;
.resources-section { .resources-section {
display: flex; display: flex;
@ -357,54 +357,39 @@
} }
} }
.shortcut-items-section {
overflow-y: hidden;
max-height: 56%;
padding-top: 16px;
padding-bottom: 20px;
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
&:hover {
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
}
}
.equipment-section,
.loadout-section,
.experience-section {
.title {
.section-title();
}
}
.equipment-section { .equipment-section {
.title {
display: flex;
gap: 15px;
align-items: center;
h3 {
font-size: 20px;
}
}
.items-list { .items-list {
display: flex; .column-list(10px);
flex-direction: column;
gap: 10px;
align-items: center;
}
}
.loadout-section {
.title {
display: flex;
gap: 15px;
align-items: center;
h3 {
font-size: 20px;
}
} }
} }
.experience-section { .experience-section {
.title {
display: flex;
gap: 15px;
align-items: center;
h3 {
font-size: 20px;
}
}
.experience-list { .experience-list {
display: flex; .column-list(5px);
flex-direction: column;
gap: 5px;
width: 100%; width: 100%;
margin-top: 10px; margin-top: 10px;
align-items: center;
.experience-row { .experience-row {
display: flex; display: flex;

View file

@ -4,6 +4,7 @@
@import './actors/adversary/sidebar.less'; @import './actors/adversary/sidebar.less';
@import './actors/character/biography.less'; @import './actors/character/biography.less';
@import './actors/character/effects.less';
@import './actors/character/features.less'; @import './actors/character/features.less';
@import './actors/character/header.less'; @import './actors/character/header.less';
@import './actors/character/inventory.less'; @import './actors/character/inventory.less';

View file

@ -20,3 +20,27 @@
@lightRules(); @lightRules();
} }
} }
/**
* Apply a style to sidebar titles.
*/
.section-title() {
display: flex;
gap: 15px;
align-items: center;
h3 {
font-size: 20px;
}
}
/**
* Apply default item list style.
* @param {Length} @gap - The vertical spacing between elements (e.g., 10px, 1rem)
*/
.column-list(@gap: 10px) {
display: flex;
flex-direction: column;
gap: @gap;
align-items: center;
}

View file

@ -1,6 +1,7 @@
<section class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}' data-tab='{{tabs.effects.id}}' <section class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}' data-tab='{{tabs.effects.id}}'
data-group='{{tabs.effects.group}}'> data-group='{{tabs.effects.group}}'>
<div class="effects-sections">
{{> 'daggerheart.inventory-items' {{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.activeEffects' title='DAGGERHEART.GENERAL.activeEffects'
type='effect' type='effect'
@ -18,4 +19,5 @@
canCreate=true canCreate=true
hideResources=true hideResources=true
}} }}
</div>
</section> </section>

View file

@ -88,6 +88,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="shortcut-items-section">
<div class="equipment-section"> <div class="equipment-section">
<div class="title"> <div class="title">
<side-line-div class="invert"></side-line-div> <side-line-div class="invert"></side-line-div>
@ -155,4 +157,5 @@
{{/each}} {{/each}}
</div> </div>
</div> </div>
</div>
</aside> </aside>

View file

@ -221,7 +221,7 @@ Parameters:
{{else if (eq type 'effect')}} {{else if (eq type 'effect')}}
<a data-action="toggleEffect" <a data-action="toggleEffect"
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.disabled 'enableEffect' 'disableEffect' }}"> data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.disabled 'enableEffect' 'disableEffect' }}">
<i class="{{ifThen item.disabled 'fa-regular fa-lightbulb' 'fa-solid fa-lightbulb'}}"></i> <i class="{{ifThen item.disabled 'fa-solid fa-toggle-off' 'fa-solid fa-toggle-on'}}"></i>
</a> </a>
{{/if}} {{/if}}
{{#if (hasProperty item "toChat")}} {{#if (hasProperty item "toChat")}}