fix: Issue #2 - [BUG] Sidebar header text unreadable with certain theme lightness settings #21
+16
−4
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 PR fixes sidebar text contrast issues in the
Explorer
when users adjust theme lightness settings. Sidebar header and item text colors are now dynamic and adapt to the current theme lightness, ensuring readability across all configurations.Before
After
Implementation
Related Issue
Closes Issue #2 - [BUG] Sidebar header text unreadable with certain theme lightness settings #6
Core Functionality
CSS Variables
--primary-color-sidebar
variable for future extensibility--primary-color-sidebar-item
variable for active item backgrounds--window-sidebar-active-bg
variable to link active items to theme--window-action-btn-filter
variable for window control buttonsTheme Service
reload_()
method to dynamically set colors based on lightnesslight_text
threshold (< 60) for consistencyImplementation Details
light_text ? 'white' : '#373e44'
light_text ? '#5a5d61aa' : '#fefeff'
light_text ? 'invert(1) brightness(2)' : 'none'
Testing Performed
Files Modified
src/gui/src/css/style.css
- CSS variables and styling for sidebar and window controlssrc/gui/src/services/ThemeService.js
- Dynamic color switching logic and initialization fix