Widgets: align every widget to the exact logo palette (KC-19)

WidgetTheme now uses the true brand colors — accent RGB(232,98,42) on
the logo's dark RGB(26,29,34) — replacing a near-miss orange on slate.
Bars countdown, My Tasks, and Day Progress inherit it; Task Live
Activity drops its hardcoded accent/black tint for the theme; lock
screen rings tint brand orange.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kutesir
2026-06-11 19:33:01 +03:00
parent 0606d9c3aa
commit a7639f6454
3 changed files with 30 additions and 6 deletions

View File

@@ -584,3 +584,25 @@ and the Event date / Counting from rows in the config appeared not to work.
Files: `KisaniCalWidgets/EventCountdownWidget.swift`.
Note: existing widget instances re-read their config; dates must be re-picked
once (params changed to optional).
---
## KC-19 — Widgets: exact logo palette everywhere
**Status:** In Progress (implemented & build-verified, pending device build)
**Reported by:** User
**Area:** Widgets
### Description
All widgets should match the brand orange theme of the logo exactly.
### Fix
- `WidgetTheme` now uses the precise brand palette: accent **RGB(232,98,42)**
(app `AppColors.accent`) on the logo's dark **RGB(26,29,34)** background —
previously a near-miss orange on a slate background.
- Every themed widget (Event Countdown Bars, My Tasks, Day Progress) inherits it.
- Task Live Activity: hardcoded accent → `WidgetTheme.accent`; background tint →
logo dark.
- Lock-screen ring tints → brand accent (renders in color on StandBy/home).
Files: `WidgetViews.swift`, `TaskLiveActivity.swift`.

View File

@@ -4,7 +4,7 @@ import SwiftUI
@available(iOS 16.1, *)
struct TaskLiveActivity: Widget {
private let accent = Color(red: 0.93, green: 0.42, blue: 0.20) // brand orange
private let accent = WidgetTheme.accent // brand orange
var body: some WidgetConfiguration {
ActivityConfiguration(for: TaskActivityAttributes.self) { context in
@@ -35,7 +35,7 @@ struct TaskLiveActivity: Widget {
}
.padding(.horizontal, 16)
.padding(.vertical, 12)
.activityBackgroundTint(Color.black.opacity(0.55))
.activityBackgroundTint(WidgetTheme.background.opacity(0.9))
.activitySystemActionForegroundColor(.white)
} dynamicIsland: { context in

View File

@@ -4,8 +4,10 @@ import WidgetKit
// MARK: - Shared widget theme (slate background + brand orange)
enum WidgetTheme {
static let background = Color(red: 0.224, green: 0.255, blue: 0.310) // dark slate
static let accent = Color(red: 0.93, green: 0.42, blue: 0.20) // brand orange
// Exactly the brand palette: app accent RGB(232,98,42) on the logo's
// dark RGB(26,29,34) widgets read as siblings of the app icon.
static let background = Color(red: 26/255, green: 29/255, blue: 34/255)
static let accent = Color(red: 232/255, green: 98/255, blue: 42/255)
static let text = Color.white
static let textDim = Color.white.opacity(0.55)
static let textFaint = Color.white.opacity(0.4)
@@ -209,7 +211,7 @@ struct LockScreenRectView: View {
ProgressView(value: Double(365 - days), total: 365)
.progressViewStyle(.circular)
.frame(width: 22, height: 22)
.tint(.white)
.tint(WidgetTheme.accent)
} else if task.isComplete {
Image(systemName: "checkmark.circle.fill")
.foregroundColor(.green)
@@ -229,7 +231,7 @@ struct LockScreenCircularView: View {
if !task.isComplete, let days = task.daysLeft, days <= 365 {
ProgressView(value: Double(365 - days), total: 365)
.progressViewStyle(.circular)
.tint(.white)
.tint(WidgetTheme.accent)
}
VStack(spacing: 0) {
if let days = task.daysLeft {