Skip to content

Remove Qt-Frameless-Window-DarkStyle#200

Merged
vaibhavpandeyvpz merged 1 commit into
masterfrom
VPZ/replace-deprecated-lib
Dec 3, 2025
Merged

Remove Qt-Frameless-Window-DarkStyle#200
vaibhavpandeyvpz merged 1 commit into
masterfrom
VPZ/replace-deprecated-lib

Conversation

@vaibhavpandeyvpz
Copy link
Copy Markdown
Owner

Replace Qt-Frameless-Window-DarkStyle with Integrated Dark/Light Styles

Summary

This PR removes the Qt-Frameless-Window-DarkStyle submodule dependency and integrates the dark and light style implementations directly into the project. The styles are now applied using Qt's QProxyStyle API instead of external dependencies.

Changes

Removed

  • Qt-Frameless-Window-DarkStyle submodule: Removed from .gitmodules and repository
  • QSS-based styling: Removed QSS file loading from mainwindow.cpp
  • External style dependency: No longer depends on external theming libraries

Added

  • Dark/Light Style Implementation:
    • sources/darkstyle.cpp and sources/darkstyle.h - Dark theme style
    • sources/lightstyle.cpp and sources/lightstyle.h - Light theme style
    • sources/stylecommon.cpp and sources/stylecommon.h - Shared style utilities
  • Style Integration: Updated main.cpp to apply styles using QApplication::setStyle()

Modified

  • CMakeLists.txt:
    • Added new style source files to build configuration
    • Added QT_VERSION_QT6 compile definition for Qt6 compatibility
    • Removed Qt-Frameless-Window-DarkStyle submodule reference
  • main.cpp:
    • Replaced QSS file-based styling with DarkStyle and LightStyle classes
    • Style selection based on dark_theme setting from QSettings
  • mainwindow.cpp:
    • Removed QSS file loading code (previously loaded dark.qss or light.qss)

Technical Details

Style Implementation

The dark and light styles are implemented as QProxyStyle subclasses, providing:

  • Native platform integration (Windows standard icons)
  • Consistent theming across all Qt widgets
  • Better performance compared to QSS-based styling
  • Full Qt6 compatibility

Build System

  • All style files are properly integrated into CMake build
  • Windows-specific code paths use QT_VERSION_QT6 for proper icon handling
  • No external dependencies required

Benefits

  1. Reduced Dependencies: Removed external submodule dependency (Qt-Frameless-Window-DarkStyle)
  2. Simplified Build: No need to manage external style submodule
  3. Better Integration: Styles are now part of the main codebase
  4. Qt6 Compatible: All code paths updated for Qt6
  5. Maintainability: Easier to customize and maintain styles

Testing

  • ✅ Builds successfully on Windows with MSVC
  • ✅ Application launches and runs correctly
  • ✅ Dark and light themes apply based on settings
  • ✅ No compilation errors or warnings (only existing warnings)

Migration Notes

The application now uses QProxyStyle-based theming instead of QSS files. The dark_theme setting in QSettings continues to work as before, but the underlying implementation has changed from QSS to native Qt styles.

Related

  • Replaces the Qt-Frameless-Window-DarkStyle submodule that was removed in commit d13843d
  • Part of the ongoing effort to reduce external dependencies and simplify the build process
  • Follows up on the Qt6 migration PR (Migrate to Qt6, Cmake & GitHub workflows #199)

@vaibhavpandeyvpz vaibhavpandeyvpz merged commit dedc87a into master Dec 3, 2025
3 checks passed
@vaibhavpandeyvpz vaibhavpandeyvpz deleted the VPZ/replace-deprecated-lib branch December 3, 2025 10:07
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.

1 participant