Skip to content

Apply full dark theme to floating windows (#2094)#2096

Merged
ten9876 merged 1 commit into
mainfrom
aetherclaude/issue-2094
Apr 30, 2026
Merged

Apply full dark theme to floating windows (#2094)#2096
ten9876 merged 1 commit into
mainfrom
aetherclaude/issue-2094

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #2094

What was changed

Apply full dark theme to floating windows (#2094)

Files modified

  • src/gui/MainWindow.cpp
  • src/gui/PanFloatingWindow.cpp
  • src/gui/Theme.h
  • src/gui/containers/FloatingContainerWindow.cpp
 src/gui/MainWindow.cpp                         | 65 +---------------------
 src/gui/PanFloatingWindow.cpp                  |  2 +
 src/gui/Theme.h                                | 77 ++++++++++++++++++++++++++
 src/gui/containers/FloatingContainerWindow.cpp |  3 +-
 4 files changed, 83 insertions(+), 64 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)

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>

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the inline + QStringLiteral combination 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):

  • PanFloatingWindow applies 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 current MainWindow::applyDarkTheme() is called explicitly (presumably on theme change), so MainWindow would update but floating windows wouldn't. This matches the existing behavior for FloatingContainerWindow which 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!

@ten9876 ten9876 merged commit 565bb06 into main Apr 30, 2026
5 checks passed
@ten9876 ten9876 deleted the aetherclaude/issue-2094 branch April 30, 2026 04:41
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>
@aethersdr-agent aethersdr-agent Bot mentioned this pull request May 2, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Applet Panel in reverse colors under WIN11

1 participant