feat(dashboard): improve mood widget readability with balanced two-line layout

- Increase conditions font size from 0.45rem to 0.6rem (33% larger)
- Reduce mood emoji size from 1rem to 0.9rem for better proportion
- Add font-weight: 600 to mood for better hierarchy
- Improve line-height from 1 to 1.2 for readability
- Reduce -webkit-line-clamp from 3 to 2 lines for conditions
- Add slight opacity (0.9) to conditions for visual separation
- Update onResize scaling to maintain balanced proportions (1.4rem / 0.9rem for larger widgets)
- Increase mobile conditions size to 0.7rem with 1.3 line-height

Result: Conditions text is now much more readable while maintaining good visual balance
with the mood emoji in the compact 1x1 widget.
This commit is contained in:
Lucas 'Paperboy' Rose-Winters
2025-10-26 21:23:11 +11:00
parent bd56f24c45
commit 04bb52ed71
2 changed files with 18 additions and 16 deletions
@@ -103,15 +103,15 @@ export function registerUserMoodWidget(registry, dependencies) {
const conditions = container.querySelector('.rpg-mood-conditions'); const conditions = container.querySelector('.rpg-mood-conditions');
if (!mood || !emoji || !conditions) return; if (!mood || !emoji || !conditions) return;
// Scale based on widget size // Scale based on widget size with balanced proportions
if (newW >= 2 && newH >= 2) { if (newW >= 2 && newH >= 2) {
// Larger widget: bigger text // Larger widget: scale up proportionally
emoji.style.fontSize = '2rem'; emoji.style.fontSize = '1.4rem';
conditions.style.fontSize = '0.75rem'; conditions.style.fontSize = '0.9rem';
} else { } else {
// Compact 1x1: tight spacing // Compact 1x1: use CSS defaults (0.9rem / 0.6rem)
emoji.style.fontSize = '1rem'; emoji.style.fontSize = '';
conditions.style.fontSize = '0.45rem'; conditions.style.fontSize = '';
} }
} }
}); });
+11 -9
View File
@@ -1376,30 +1376,32 @@ body:has(.rpg-panel.rpg-position-left) #sheld {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 0.1rem; gap: 0.15rem;
height: 100%; height: 100%;
width: 100%; width: 100%;
padding: 0.25rem; padding: 0.25rem;
} }
.rpg-widget .rpg-mood-emoji { .rpg-widget .rpg-mood-emoji {
font-size: 1rem; font-size: 0.9rem;
flex-shrink: 0; flex-shrink: 0;
cursor: text; cursor: text;
line-height: 1; line-height: 1.2;
font-weight: 600;
} }
.rpg-widget .rpg-mood-conditions { .rpg-widget .rpg-mood-conditions {
font-size: 0.45rem; font-size: 0.6rem;
line-height: 1; line-height: 1.2;
text-align: center; text-align: center;
word-break: break-word; word-break: break-word;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 3; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
max-width: 100%; max-width: 100%;
opacity: 0.9;
} }
/* Progress bars - rem for spacing */ /* Progress bars - rem for spacing */
@@ -4344,10 +4346,10 @@ body:has(.rpg-panel.rpg-position-left) #sheld {
padding-bottom: 0.5rem !important; padding-bottom: 0.5rem !important;
} }
/* Mood Widget - increase conditions text size for readability */ /* Mood Widget - increase conditions text size for mobile readability */
.rpg-widget .rpg-mood-conditions { .rpg-widget .rpg-mood-conditions {
font-size: 0.6rem !important; font-size: 0.7rem !important;
line-height: 1.2 !important; line-height: 1.3 !important;
} }
/* ======================================== /* ========================================