Apply dark mode in many files#859
Conversation
SeanFeldman
left a comment
There was a problem hiding this comment.
@awilliansd there are a few comments that apply to multiple places.
Also, the screenshots are missing.
The AI-generated documentation has the "Build script" section, mentioning a build script build-dark-theme.ps1, but that's not in the PR. Nor should there be, as it should work with the existing build infrastructure.
| // ThemeManager.cs | ||
| // Caminho: src/ServiceBusExplorer/Helpers/ThemeManager.cs | ||
| // | ||
| // Gerencia tema Dark/Light com persistência no app.config do usuário. | ||
| // Uso: | ||
| // ThemeManager.Apply(form) — aplica o tema atual ao form | ||
| // ThemeManager.Toggle(form) — alterna dark/light e reaaplica | ||
| // ThemeManager.IsDark — true se tema escuro ativo | ||
| // ThemeManager.CurrentTheme — "Dark" ou "Light" |
There was a problem hiding this comment.
Comments should be in English and applied to the class using XML doc.
There was a problem hiding this comment.
I've reformulated the comments. Sorry for the mistake. Thanks for the feedback.
There was a problem hiding this comment.
There are no comments in portuguese anymore. This is a old commit.
|
|
||
| public static class ThemeManager | ||
| { | ||
| // ── Chave no app.config ─────────────────────────────────────────────── |
There was a problem hiding this comment.
Please re-work the AI comments to adhere to the comment above. Thank you.
There was a problem hiding this comment.
I've reformulated the comments. Sorry for the mistake. Thanks for the feedback.
There was a problem hiding this comment.
The comments still appear to be in Portuguese.
Also, the standard comments in the repo are in the following format.
// CommentThere was a problem hiding this comment.
There are no comments in portuguese anymore. This is a old commit.
|
I've fixed the comments, added the script I used, and refactored several times. I've also added screenshots in the folder. Sorry for my mistake. Thanks for the feedback. |
scripts/build-dark-theme.ps1
Outdated
| @@ -0,0 +1,449 @@ | |||
| # build-dark-theme.ps1 | |||
There was a problem hiding this comment.
What's the purpose of this script after this PR is merged?
There was a problem hiding this comment.
I put the script just for understanding and the work that was done and tested, I removed the script, left the PR clean and fixed the PR documentation.
Add Dark/Light Theme Toggle
Summary
Adds a runtime dark/light theme toggle to Service Bus Explorer.
Default is dark, switchable via View → Theme → Dark / Light, with persistence across sessions.
Changes
New
Helpers/ThemeManager.cs— theming engine (recursive apply, persistence, custom control support)Helpers/MainFormThemeExtension.cs— menu injection + native dark title barUpdated
MainForm.cs— initializes themingFormsandUserControls— apply theme afterInitializeComponent().Designer.cs— neutralized hardcoded colorsTechnical Overview
ThemeManager.Apply(Control)SetTheme/ToggleConfigurationManagerToolStrip,MenuStrip,TabControlThemes
Dark
#212121#2A2A2A#484848#ECECEC#007ACCLight
SystemColors(native Windows appearance)Notes
AboutFormexcluded due to custom backgroundTesting