feat(ui): implement adaptive system theme preferences with live AppKi…#4
Open
kerem0x wants to merge 1 commit into
Open
feat(ui): implement adaptive system theme preferences with live AppKi…#4kerem0x wants to merge 1 commit into
kerem0x wants to merge 1 commit into
Conversation
…t hot-reloading
- Core/Config: Expanded 'core.GlobalPreferences' to support an explicit 'Theme' parameter string with fallbacks ('system', 'light', 'dark') and added a state normalizer helper.
- Configuration Management: Updated config store parsing, backwards-compatible migration schemas, and backfill routines. Implemented automated integration tests verifying profile default rules.
- UI Coordination: Registered theme tokens inside preference logic handlers to seamlessly translate string values.
- Native macOS Bridge: Updated Objective-C AppKit canvas surfaces, button cells, process items, and graph lines to listen to adaptive runtime look contexts dynamically. Linked the QuartzCore framework for building stability.
- UI Polish: Restructured drawing frames to guarantee pixel-perfect vertical centering for row typography (+2 origin offset) and status circles (+6 origin offset).
- UX Redesign: Tailored persistent menu boundaries to automatically dissolve dropdown items on theme swap selections, clearing AppKit animation drawing locks for instant live updates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces comprehensive native theme configuration support (System Theme, Light, Dark) to OpenTamer. It transitions the utility's surface design from a hardcoded Aqua configuration to a fully dynamic, adaptive workspace interface that seamlessly handles dark environment canvases under professional macOS AppKit standards.
Additionally, this PR addresses micro-alignment styling imbalances inside process dashboard lists and introduces interactive theme hot-reloading.
Key Changes
🛠️ 1. Core Logic & Schema Layer (
internal/core/,internal/config/)Themeparameter tocore.GlobalPreferencesstruct with defensive input string text validation.internal/config/config.goconfiguration loaders to automatically inject"system"defaults into clean application profiles.LoadConfig()to backfill legacy configuration configurations safely without erasing user settings.config_test.go.⚙️ 2. UI Coordination (
internal/ui/)PreferenceThemeidentifiers within the interface controller routing.setStringPreferencemap handlers to cleanly forward string changes to state engines.🍏 3. Native macOS Presentation Bridge (
internal/macos/)menu_bar_bridge.mto pull adaptive semantic assets (like[NSColor labelColor]) dynamically. Restructured custom canvas surfaces (OpenTamerPanelView,OpenTamerCPUGraphView) and action buttons to alter frame tones depending on the OS container state context.menu_bar_darwin.goto pull Apple's nativeQuartzCorelibrary during assembly runs.menu_bar_preferences_test.goto cleanly add the"theme"element key safely inside the dashboard's alphabetized whitelist checks.🎨 Visual Polish & UI/UX Optimizations
📐 Pixel-Perfect Vertical Centering
drawProcessActionfrom a+6vertical offset down to+2, preventing text labels from crowding or clipping row lines.+8down to+6vertical origin coordinates to ensure indicator symbols rest symmetrically.⚡ Instant Live Hot-Reloading
OpenTamerCommandShouldKeepMenuOpenbounds to drop selection tracking loops immediately when changing app themes.Status Checklist
go test ./...).Verification Steps
OPENTAMER_ALLOW_DIRECT_LAUNCH=1 ./opentamerPreferences➡️General➡️Theme.