[Bugfix] Fix light theme to roll messages (#1066)

* fix light theme to roll messages

* fix light theme issues

* finally fix issues

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
Murilo Brito 2025-08-23 21:52:18 -03:00 committed by GitHub
parent 661808b5f1
commit 2a0d748b5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 523 additions and 423 deletions

View file

@ -11,19 +11,19 @@ export default class DhMeasuredTemplate extends foundry.canvas.placeables.Measur
if (splitRulerText.length > 0) { if (splitRulerText.length > 0) {
const rulerValue = Number(splitRulerText[0]); const rulerValue = Number(splitRulerText[0]);
const result = DhMeasuredTemplate.getRangeLabels(rulerValue, rangeMeasurementSettings); const result = DhMeasuredTemplate.getRangeLabels(rulerValue, rangeMeasurementSettings);
this.ruler.text = result.distance + (result.units ? (' ' + result.units) : ''); this.ruler.text = result.distance + (result.units ? ' ' + result.units : '');
} }
} }
} }
static getRangeLabels(distanceValue, settings) { static getRangeLabels(distanceValue, settings) {
let result = { distance: distanceValue, units: '' } let result = { distance: distanceValue, units: '' };
const rangeMeasurementOverride = canvas.scene.flags.daggerheart?.rangeMeasurementOverride; const rangeMeasurementOverride = canvas.scene.flags.daggerheart?.rangeMeasurementOverride;
if (rangeMeasurementOverride === true) { if (rangeMeasurementOverride === true) {
result.distance = distanceValue; result.distance = distanceValue;
result.units = canvas.scene?.grid?.units; result.units = canvas.scene?.grid?.units;
return result return result;
} }
if (distanceValue <= settings.melee) { if (distanceValue <= settings.melee) {
result.distance = game.i18n.localize('DAGGERHEART.CONFIG.Range.melee.name'); result.distance = game.i18n.localize('DAGGERHEART.CONFIG.Range.melee.name');

View file

@ -23,14 +23,22 @@ export class DHActionDiceData extends foundry.abstract.DataModel {
multiplier: new fields.StringField({ multiplier: new fields.StringField({
choices: CONFIG.DH.GENERAL.multiplierTypes, choices: CONFIG.DH.GENERAL.multiplierTypes,
initial: 'prof', initial: 'prof',
label: "DAGGERHEART.ACTIONS.Config.damage.multiplier" label: 'DAGGERHEART.ACTIONS.Config.damage.multiplier'
}), }),
flatMultiplier: new fields.NumberField({ nullable: true, initial: 1, label: "DAGGERHEART.ACTIONS.Config.damage.flatMultiplier" }), flatMultiplier: new fields.NumberField({
dice: new fields.StringField({ choices: CONFIG.DH.GENERAL.diceTypes, initial: 'd6', label: "DAGGERHEART.GENERAL.Dice.single" }), nullable: true,
bonus: new fields.NumberField({ nullable: true, initial: null, label: "DAGGERHEART.GENERAL.bonus" }), initial: 1,
label: 'DAGGERHEART.ACTIONS.Config.damage.flatMultiplier'
}),
dice: new fields.StringField({
choices: CONFIG.DH.GENERAL.diceTypes,
initial: 'd6',
label: 'DAGGERHEART.GENERAL.Dice.single'
}),
bonus: new fields.NumberField({ nullable: true, initial: null, label: 'DAGGERHEART.GENERAL.bonus' }),
custom: new fields.SchemaField({ custom: new fields.SchemaField({
enabled: new fields.BooleanField({ label: "DAGGERHEART.ACTIONS.Config.general.customFormula" }), enabled: new fields.BooleanField({ label: 'DAGGERHEART.ACTIONS.Config.general.customFormula' }),
formula: new FormulaField({ label: "DAGGERHEART.ACTIONS.Config.general.formula", initial: '' }) formula: new FormulaField({ label: 'DAGGERHEART.ACTIONS.Config.general.formula', initial: '' })
}) })
}; };
} }

View file

@ -199,7 +199,7 @@ export default class DHWeapon extends AttachableItem {
]; ];
for (const { value, type } of attack.damage.parts) { for (const { value, type } of attack.damage.parts) {
const parts = value.custom.enabled ? [game.i18n.localize("DAGGERHEART.GENERAL.custom")] : [value.dice]; const parts = value.custom.enabled ? [game.i18n.localize('DAGGERHEART.GENERAL.custom')] : [value.dice];
if (!value.custom.enabled && value.bonus) parts.push(value.bonus.signedString()); if (!value.custom.enabled && value.bonus) parts.push(value.bonus.signedString());
if (type.size > 0) { if (type.size > 0) {

View file

@ -35,7 +35,7 @@
gap: 4px; gap: 4px;
.activity-marker { .activity-marker {
font-size: .5rem; font-size: 0.5rem;
flex: none; flex: none;
color: light-dark(@dark-blue, @golden); color: light-dark(@dark-blue, @golden);
margin-right: 4px; margin-right: 4px;

View file

@ -2,7 +2,7 @@
@import '../../utils/fonts.less'; @import '../../utils/fonts.less';
@import '../../utils/spacing.less'; @import '../../utils/spacing.less';
.theme-light { #interface.theme-light {
.daggerheart.chat.domain-card { .daggerheart.chat.domain-card {
.domain-card-move .domain-card-header { .domain-card-move .domain-card-header {
border-bottom: 1px solid @dark-blue; border-bottom: 1px solid @dark-blue;

View file

@ -2,7 +2,7 @@
@import '../../utils/fonts.less'; @import '../../utils/fonts.less';
@import '../../utils/spacing.less'; @import '../../utils/spacing.less';
.theme-light { #interface.theme-light {
.daggerheart.chat.action { .daggerheart.chat.action {
.action-move .action-section { .action-move .action-section {
border-bottom: 1px solid @dark-blue; border-bottom: 1px solid @dark-blue;
@ -79,6 +79,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 5px; gap: 5px;
color: @beige;
.title { .title {
font-size: var(--font-size-20); font-size: var(--font-size-20);

View file

@ -2,52 +2,137 @@
@import '../../utils/fonts.less'; @import '../../utils/fonts.less';
@import '../../utils/spacing.less'; @import '../../utils/spacing.less';
.theme-light { #interface.theme-light {
.daggerheart, .daggerheart.chat-sidebar .chat-log,
#chat-notifications { #chat-notifications .chat-log {
--text-color: @dark-blue; --text-color: @dark-blue;
--bg-color: @dark-blue-40; --bg-color: @dark-blue-40;
.message-content .chat-roll { .chat-message {
.roll-part-header { .roll-formula {
span, background: @dark-15;
span:before, color: @dark;
span:after {
color: @dark-blue;
}
&:before {
background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, @dark-blue 100%);
color: @dark-blue;
} }
&:after { &.duality {
background: linear-gradient(90deg, @dark-blue 0%, rgba(0, 0, 0, 0) 100%); background-image: url(../assets/parchments/dh-parchment-dark.png);
color: @dark-blue;
} .message-content {
} color: @beige;
.roll-section {
.roll-part-content {
.roll-result-value {
color: @dark-blue;
} }
.dice-tooltip .wrapper .roll-die { .roll-formula {
background: @dark-15;
color: @dark;
}
.message-header {
.message-sub-header-container {
color: @beige;
h4 {
color: @golden;
}
}
.message-header-metadata {
.message-metadata {
color: @beige; color: @beige;
} }
} }
} }
&.hope {
--text-color: @golden;
--bg-color: @golden-40;
.message-header,
.message-content {
background-color: @golden-bg;
}
.roll-formula {
background: var(--bg-color);
color: var(--text-color);
}
} }
.chat-message .roll-formula { &.fear {
background: @dark-15; --text-color: @chat-blue;
--bg-color: @chat-blue-40;
.message-header,
.message-content {
background-color: @chat-blue-bg;
}
.roll-formula {
background: var(--bg-color);
color: var(--text-color);
}
}
&.critical {
--text-color: @chat-purple;
--bg-color: @chat-purple-40;
.message-header,
.message-content {
background-color: @chat-purple-bg;
}
.roll-formula {
background: var(--bg-color);
color: var(--text-color);
}
}
}
&:not(.duality) {
.font-20 {
color: @dark; color: @dark;
} }
.roll-die {
color: @beige;
}
fieldset {
color: @dark-blue;
border-color: @dark-blue;
legend {
color: @dark-blue;
}
}
.chat-roll {
.roll-part-header {
color: @dark-blue;
span::before,
span::after {
color: @dark-blue;
}
&:before {
background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, @dark-blue 100%);
}
&:after {
background: linear-gradient(90deg, @dark-blue 0%, rgba(0, 0, 0, 0) 100%);
}
}
.roll-part-content {
&.dice-result {
color: @dark;
}
.roll-result-container {
color: @dark-blue;
}
}
}
}
}
} }
} }
.daggerheart.chat { .daggerheart.chat {
&.resource-roll { &.resource-roll {
.reroll-message { .reroll-message {
color: @beige;
text-align: center; text-align: center;
font-size: var(--font-size-18); font-size: var(--font-size-18);
margin-bottom: 0; margin-bottom: 0;

View file

@ -2,7 +2,7 @@
@import '../../utils/fonts.less'; @import '../../utils/fonts.less';
@import '../../utils/spacing.less'; @import '../../utils/spacing.less';
.theme-light { #interface.theme-light {
.daggerheart.chat.downtime { .daggerheart.chat.downtime {
.downtime-moves-list .downtime-move { .downtime-moves-list .downtime-move {
&:hover { &:hover {

View file

@ -1,8 +1,8 @@
@import '../../utils/colors.less'; @import '../../utils/colors.less';
@import '../../utils/fonts.less'; @import '../../utils/fonts.less';
.theme-light { #interface.theme-light {
.chat-message .message-content { .chat-message:not(.duality) .message-content {
color: @dark; color: @dark;
blockquote { blockquote {
@ -58,6 +58,12 @@
font-family: @font-body; font-family: @font-body;
font-weight: bold; font-weight: bold;
} }
.dice-roll .dice-formula,
.dice-roll .dice-total {
background: @dark-blue-40;
color: @dark-blue;
}
} }
} }
@ -158,8 +164,8 @@
.dice-roll .dice-total { .dice-roll .dice-total {
box-shadow: none; box-shadow: none;
border: none; border: none;
background: light-dark(@dark-blue-40, @golden-40); background: @golden-10;
color: light-dark(@dark-blue, @golden); color: @golden;
font-weight: 600; font-weight: 600;
align-content: center; align-content: center;
} }

View file

@ -1,3 +1,3 @@
<div class="daggerheart chat resource-roll"> <ul class="daggerheart chat resource-roll">
<h5 class="reroll-message">{{localize "DAGGERHEART.UI.Chat.resourceRoll.playerMessage" user=user name=name }}</h5> <li class="reroll-message">{{localize "DAGGERHEART.UI.Chat.resourceRoll.playerMessage" user=user name=name }}</li>
</div> </ul>