DtkDeclarative  5.6.10
DTK Declarative module
WindowButton类 参考

一种专门用于 TitleBar 上的窗口按钮. 更多...

类 WindowButton 继承关系图:
Control

信号

void clicked ()
 

属性

alias icon
 icon 属性控制 WindowButton 的图标。
 
bool pressed
 pressed 属性表示 WindowButton 是否处于按下的状态。 更多...
 
DPalette textColor
 textColor 属性控制 WindowButton 的前景色颜色,包含图标和文本的颜色。
 
DPalette backgroundColor
 textColor 属性控制 WindowButton 的背景色颜色。
 

详细描述

一种专门用于 TitleBar 上的窗口按钮.

WindowButton 是专门用于 TitleBar 上窗口按钮,是 TitleBar 和 DialogTitleBar的通用窗口按钮,通常情况下 WindowButton 被添加到 WindowButtonGroup 中, 包含最大化、最小化、关闭按钮。菜单按钮默认不添加到 WindowButtonGroup 中。
TitleBar 中默认就添加了上述窗口,因此 WindowButton 在需要自定义标题栏按钮时才会被使用。
WindowButton 的默认样式如下所示:

WindowButton 的 Hovered 样式如下所示:

WindowButton 的 Pressed 样式如下所示:

属性说明

◆ pressed

bool WindowButton::pressed
read

pressed 属性表示 WindowButton 是否处于按下的状态。

备注
This property is read-only

@signal WindowButton::clicked()

clicked 信号当 WindowButton 点击后发送。


该类的文档由以下文件生成: