SARibbon v2.0.2
cn:
相比v1.x,v2.x的第三方无边框方案由frameless改为qwindowkit,qwindowkit是frameless作者发起的版本,旧的frameless已经不维护,qwindowkit最大的优势是无需暴露头文件接口,这样SARibbon在依赖qwindowkit时无需提供qwindowkit的头文件,qwindowkit作为SARibbon的编译依赖选项,是可选择,默认不开启
2.0 做了以下调整:
SARibbonCategory
和SARibbonPannel
可以通过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.titleBarHeight
,tabBarHeight
,categoryHeight
这三个高度支持用户自定义,默认会根据字体大小计算
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
andSARibbonPannel
can be customized through QSS- The text of
SARibbonPanel
is displayed usingSARibbonPannelLabel (QLabel)
and can be customized through QSS SARibbonSeparatorWidget
also supports QSS customization for split lines- Change the style of
SARibbonBar
from RibbonStyle toQFlags
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:
SARibbonBar::setCornerWidgetVisible
can be set to display or hide theCornerwidget
- Attribute
enableShowPannelTitle
controls whether the title of the panel is displayed - Attribute
pannelTitleHeight
controls the height of the pannel title bar - Attribute
pannelLayoutMode
, which can control the layout of the panel - Attribute
tabOnTitle
, which controls the placement of tabs in the title bar - The three heights of
titleBarHeight
,tabBarHeight
, andcategoryHeight
are highly customizable by users and will be calculated based on font size by default 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 inQColor()
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 executegit submodule update -- init -- recursive
- [Note] If
SARIBBON_USE_FRAMELESS_LIB
is enabled, needs to first buildqwindowkit
.qwindowkit
does not provide qmake, only cmake. After compilingqwindowkit
,SARibbon
supports qmake and cmake SARibbonMainWindow
supports non ribbon modesSAWindowButtonGroup
has been renamed toSARibbonSystemButton Group Bar
and supports adding actions