Apply full dark theme to floating windows (#2094)#2096
Merged
Conversation
Extract the dark-theme stylesheet into a shared Theme.h header and apply it to FloatingContainerWindow and PanFloatingWindow so pop-out panels inherit the complete theme instead of falling back to the Windows system palette. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
There was a problem hiding this comment.
Looks good. Clean refactor that extracts the duplicated dark-theme stylesheet into a shared inline function in Theme.h, then applies it to PanFloatingWindow and FloatingContainerWindow so pop-out panels no longer fall back to the system palette. A few observations:
What works well:
- The extraction into
AetherSDR::darkThemeStylesheet()is the right approach — single source of truth, and theinline+QStringLiteralcombination avoids both ODR issues and repeated heap allocations. - All call sites are inside
namespace AetherSDR, so unqualified lookup resolves correctly (confirmed by CI build passing). - The stylesheet content is byte-for-byte identical to what
MainWindow::applyDarkTheme()had before — no accidental style changes. - Scope is tight: only the four files stated in the PR description are touched.
One thing to consider (non-blocking):
PanFloatingWindowapplies the stylesheet unconditionally in its constructor. If the project ever adds a light theme or a user-selectable theme, these floating windows won't pick up theme changes after construction. The currentMainWindow::applyDarkTheme()is called explicitly (presumably on theme change), so MainWindow would update but floating windows wouldn't. This matches the existing behavior forFloatingContainerWindowwhich also set its stylesheet in the constructor, so it's not a regression — just something to keep in mind for future theme work.
CI is green (build + CodeQL pass). No bugs, no resource leaks, no scope creep. Thanks for the contribution!
5 tasks
ten9876
pushed a commit
that referenced
this pull request
May 1, 2026
…ound (#2190) On macOS, QWidget top-level windows require WA_StyledBackground=true for stylesheet background-color rules to paint. Without it Qt defers to the native macOS window background (white), even when setStyleSheet() is called explicitly. PR #2096 added darkThemeStylesheet() to FloatingContainerWindow and PanFloatingWindow but omitted this attribute. The stylesheet is confirmed present in the binary (verified via strings) — the attribute was the missing piece. Also adds the stylesheet and attribute to the inline QWidget created in MainWindow::floatAppletPanel(), which is a third floating window not covered by the previous fix. The issue only manifests with the CI-built libqcocoa.dylib bundled in official DMG releases (~969KB vs Homebrew's ~1.2MB for the same Qt 6.11.0), which handles stylesheet inheritance more strictly. Local builds against Homebrew Qt work without this fix, which is why it was not caught earlier. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2 tasks
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.
Summary
Fixes #2094
What was changed
Apply full dark theme to floating windows (#2094)
Files modified
src/gui/MainWindow.cppsrc/gui/PanFloatingWindow.cppsrc/gui/Theme.hsrc/gui/containers/FloatingContainerWindow.cppGenerated by AetherClaude (automated agent for AetherSDR)