Auf Transparenz effect gewechselt
This commit is contained in:
@@ -585,10 +585,10 @@ function applyCompletionStyling(element, currentCount, targetCount, color) {
|
||||
// Fully completed - solid color
|
||||
element.classList.add('completed');
|
||||
} else {
|
||||
// Partially completed - gradient
|
||||
// Partially completed - transparency overlay
|
||||
element.classList.add('partial');
|
||||
const percentage = Math.round((currentCount / targetCount) * 100);
|
||||
element.style.setProperty('--completion-percentage', `${percentage}%`);
|
||||
const opacity = currentCount / targetCount; // 0.0 to 1.0
|
||||
element.style.setProperty('--completion-opacity', opacity);
|
||||
element.style.setProperty('--habit-color', color);
|
||||
}
|
||||
}
|
||||
@@ -607,14 +607,14 @@ function applyModalCompletionStyling(element, currentCount, targetCount, color)
|
||||
const contrastColor = getContrastColor(color);
|
||||
element.style.setProperty('color', contrastColor);
|
||||
} else {
|
||||
// Partially completed - gradient with smart text color
|
||||
// Partially completed - transparency overlay with smart text color
|
||||
element.classList.add('partial');
|
||||
const percentage = Math.round((currentCount / targetCount) * 100);
|
||||
element.style.setProperty('--completion-percentage', `${percentage}%`);
|
||||
const opacity = currentCount / targetCount; // 0.0 to 1.0
|
||||
element.style.setProperty('--completion-opacity', opacity);
|
||||
element.style.setProperty('--current-habit-color', color);
|
||||
|
||||
// For partial completion, use contrast color if more than 50% completed
|
||||
if (percentage > 50) {
|
||||
if (opacity > 0.5) {
|
||||
const contrastColor = getContrastColor(color);
|
||||
element.style.setProperty('color', contrastColor);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user