feat: Comprehensive Theming#341
Open
devnullvoid wants to merge 7 commits intoBrowsers-software:mainfrom
Open
Conversation
- Introduce an Appearance tab in the settings window allowing users to select theme mode and customize colors. - Replace the old ConfiguredTheme with a new ThemeMode enum that includes a Custom option. - Add a CustomTheme struct to store hex color values and provide default theme colors. - Extend UIVisualSettings and UIState to hold theme_mode and custom_theme data. - Update theme initialization to apply custom colors when ThemeMode::Custom is selected, including a color parser. - Modify settings UI to include radio buttons for theme selection and text boxes for custom color inputs, with automatic save handling.
- Add `hover_background` to `CustomTheme` with default RGBA value - Extend `MainWindowTheme` with `hover_background_color` and ENV key - Parse and apply the custom hover color when building the theme - Introduce a color input in the Appearance settings to let users edit the hover background - Update main window widget rendering to use the new env color for hover/selected states - Minor cleanup of imports and minor UI adjustments related to the new feature
- Introduce `FocusWidget::with_env_on_focus` to apply a custom `Env` when the widget gains focus, affecting event, lifecycle, update, layout, and paint handling. - Extend `MainWindowTheme` with new keys `ENV_HOVER_TEXT_COLOR` and `ENV_HOVER_SECONDARY_TEXT_COLOR` and propagate them through theme initialization and environment setup. - Add corresponding fields (`hover_text_color`, `hover_secondary_text_color`) to the theme struct and default values in `CustomTheme`. - Update UI settings view to expose color inputs for hover text, secondary text, and hover secondary text, enabling user customization. - Adjust theme parsing to read the new color values from `CustomTheme` and apply them to the main window theme.
…t browser focus state.
…over states, to appearance settings and apply them to hotkey labels.
- Replace hardcoded font size and color with `MainWindowTheme::ENV_PROFILE_LABEL_FONT` and `ENV_PROFILE_LABEL_COLOR`. - Aligns label appearance with the app's theming system for consistent UI. - Simplifies future theme customizations and reduces duplicated style values.
Contributor
|
Thank you - awesome job, Jon! It will take me some time to get to this, but letting you know I will look it through one day. |
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.
This PR introduces comprehensive theming customization.
Custom Theme Settings: