Skip to content

SARibbon v2.9.0

Latest

Choose a tag to compare

@czyt1988 czyt1988 released this 13 Jun 15:40

2026-06-13 -> 2.9.0

  • Added Office 2016 Green/Dark and Office 2021 Green/Dark theme variants, expanding the number of built‑in themes to 6.
  • Added SARibbonThemePalette class supporting loading theme palettes from JSON files, enabling external configuration and dynamic loading of themes.
  • Added a template‑based QSS theme system supporting {{token}} placeholder substitution and opacity modifiers (|opacity).
  • Added SARibbonBar::loadFromFile interface to load custom themes from external files.
  • Added SA::applyRibbonTheme() unified theme application logic, integrating palettes, QSS templates, and runtime adjustments.
  • Added Office 2016 QSS template (office2016.qss) and base theme template (theme-base.qss).
  • Added smoke tests for theme overriding and JSON loading tests for SARibbonThemePalette, integrated with CTest.
  • Added ThemeDesignerExample demo program supporting theme layout switching and QSS/JSON syntax highlighting.
  • Added theme preview ComboBox to MainWindowExample for real‑time switching of built‑in themes.
  • Refactored theme architecture, unified SARibbonTheme enumeration management, and removed the obsolete SARibbonIconHelper.
  • Refactored SARibbonMainWindowStyleFlag and theme switching flow, adding automatic dark mode detection.
  • Fixed 5 critical bugs: division‑by‑zero crash in SARibbonGalleryGroup, missing signal emission in SARibbonContextCategory::takeCategory, memory leak in SARibbonCustomizeDialog destructor, missing base class call in SARibbonStackedWidget::showEvent, and an objectName error.
  • Fixed 11 medium‑severity issues covering missing signals, layout calculations, and state synchronisation.
  • Comprehensively added NOTIFY signals to Q_PROPERTY macros and corrected API spelling mistakes.
  • Optimised the CMake build system and added a PowerShell automation build script (scripts/build.ps1).
  • Enabled BUILD_TESTS and automatic ctest execution in the CI workflow.
  • Updated build documentation and coding conventions.

Example: example\ThemeDesignerExample

image
  • 新增Office 2016 Green/Dark和Office 2021 Green/Dark主题变体,内置主题总数扩展至6种
  • 新增SARibbonThemePalette类,支持从JSON文件加载主题调色板,实现主题的外部配置和动态加载
  • 新增基于模板的QSS主题系统,支持{{token}}占位符替换和透明度修饰符(|opacity
  • 新增SARibbonBar::loadFromFile接口,可从外部文件加载自定义主题
  • 新增SA::applyRibbonTheme()统一主题应用逻辑,整合调色板、QSS模板和运行时调整
  • 新增Office 2016 QSS模板(office2016.qss)和基础主题模板(theme-base.qss
  • 新增主题覆盖冒烟测试和SARibbonThemePalette JSON加载测试,集成CTest
  • 新增ThemeDesignerExample示例程序,支持主题切分布局与QSS/JSON语法高亮
  • MainWindowExample新增主题预览ComboBox,可实时切换内置主题
  • 重构主题架构,统一SARibbonTheme枚举管理,移除旧的SARibbonIconHelper
  • 重构SARibbonMainWindowStyleFlag和主题切换流程,支持深色模式自动检测
  • 修复5个严重bug:SARibbonGalleryGroup除零崩溃、SARibbonContextCategory::takeCategory未发射信号、SARibbonCustomizeDialog析构内存泄漏、SARibbonStackedWidget::showEvent未调基类、objectName错误
  • 修复11个中等严重度问题,涵盖信号缺失、布局计算和状态同步
  • Q_PROPERTY全面补充NOTIFY信号,修正API拼写错误
  • CMake构建系统优化,新增PowerShell自动化构建脚本(scripts/build.ps1
  • CI工作流启用BUILD_TESTS和ctest自动执行
  • 更新构建文档和编码规范文档

例子:example\ThemeDesignerExample
image