Skip to content

SARibbon v2.0.2

Compare
Choose a tag to compare
@czyt1988 czyt1988 released this 28 Jan 02:01
· 91 commits to master since this release

cn:

相比v1.x,v2.x的第三方无边框方案由frameless改为qwindowkit,qwindowkit是frameless作者发起的版本,旧的frameless已经不维护,qwindowkit最大的优势是无需暴露头文件接口,这样SARibbon在依赖qwindowkit时无需提供qwindowkit的头文件,qwindowkit作为SARibbon的编译依赖选项,是可选择,默认不开启

2.0 做了以下调整:

  • SARibbonCategorySARibbonPannel可以通过qss定制
  • SARibbonPannel的文字使用SARibbonPannelLabel(QLabel)显示,可以通过qss进行自定义
  • SARibbonSeparatorWidget分割线也支持qss定制
  • SARibbonBar的样式RibbonStyle改为QFlags
  • SARibbonBar添加了相关的迭代函数,可快速遍历所有的category和pannel
  • 尺寸的计算重新进行了调整
  • 默认的qss进行了重新调整,适用更多的屏幕尺寸
  • SARibbonBar添加了如下接口:
    1.SARibbonBar::setCornerWidgetVisible 可以设置cornerwidget的显示隐藏与否
    2.属性enableShowPannelTitle,控制是否显示pannel的标题
    3.属性pannelTitleHeight,控制pannel标题栏高度
    4.属性pannelLayoutMode,可控制pannel的布局方式
    5.属性tabOnTitle,可控制tab放置在title栏上
    6.titleBarHeighttabBarHeightcategoryHeight这三个高度支持用户自定义,默认会根据字体大小计算
    7.setTabBarBaseLineColor控制tabbar下基线颜色,某些主题需要设置颜色(窗口标题栏和category区域颜色一样的情况下如office 2013主题)可通过此函数设置,传入QColor()取消颜色
  • 添加了SARibbonBar::initHighDpi()静态函数,方便开启高分屏设置
  • 【注意】frameless库更换为qwindowkit ,qwindowkit源码不作为项目一部分,使用git submodule管理,因此,项目clone下来后,需要执行git submodule update --init --recursive
  • 【注意】如果开启SARIBBON_USE_FRAMELESS_LIB(默认开启),需要先构建qwindowkit,目前qwindowkit不提供qmake,只提供cmake,编译完qwindowkit后,SARibbon支持qmake和cmake
  • SARibbonMainWindow支持非ribbon模式
  • SAWindowButtonGroup改名为SARibbonSystemButtonGroupBar,同时支持添加action
  • SARibbonApplicationButton的qss去掉了下箭头

en:

  • SARibbonCategory and SARibbonPannel can be customized through QSS
  • The text of SARibbonPanel is displayed using SARibbonPannelLabel (QLabel) and can be customized through QSS
  • SARibbonSeparatorWidget also supports QSS customization for split lines
  • Change the style of SARibbonBar from RibbonStyle to QFlags
  • SARibbonBar has added relevant iterative functions, which can quickly traverse all categories and panels
  • The size calculation has been adjusted again
  • The default QSS has been readjusted to accommodate more screen sizes
  • SARibbonBar has added the following interface:
  1. SARibbonBar::setCornerWidgetVisible can be set to display or hide the Cornerwidget
  2. Attribute enableShowPannelTitle controls whether the title of the panel is displayed
  3. Attribute pannelTitleHeight controls the height of the pannel title bar
  4. Attribute pannelLayoutMode, which can control the layout of the panel
  5. Attribute tabOnTitle, which controls the placement of tabs in the title bar
  6. The three heights of titleBarHeight, tabBarHeight, and categoryHeight are highly customizable by users and will be calculated based on font size by default
  7. setTabBarBaseLineColor controls the baseline color of the tab bar, and certain themes require color settings (such as the Office 2013 theme when the window title bar and category area colors are the same). This function can be used to set the color by passing in QColor() to cancel the color
  • Added static function SARibbonBar::initHighDpi() to facilitate enabling high resolution screen settings
  • [Note] Replace the frameless library with qwindowkit ,The qwindowkit source code is not part of the project and is managed using git submodule. Therefore, after the project is cloned, it is necessary to execute git submodule update -- init -- recursive
  • [Note] If SARIBBON_USE_FRAMELESS_LIB is enabled, needs to first build qwindowkit. qwindowkit does not provide qmake, only cmake. After compilingqwindowkit, SARibbon supports qmake and cmake
  • SARibbonMainWindow supports non ribbon modes
  • SAWindowButtonGroup has been renamed to SARibbonSystemButton Group Bar and supports adding actions