Compare commits
2 Commits
1e9bd0fd05
...
2ead64e9b5
Author | SHA1 | Date |
---|---|---|
|
2ead64e9b5 | |
|
fc99c19479 |
|
@ -167,16 +167,26 @@ FluScrollablePage{
|
||||||
height: 68
|
height: 68
|
||||||
paddings: 10
|
paddings: 10
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
FluIconButton{
|
Row{
|
||||||
iconSource:FluentIcons.ChromeCloseContrast
|
spacing: 20
|
||||||
disabled:icon_button_switch.checked
|
|
||||||
iconSize: 15
|
|
||||||
anchors{
|
anchors{
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
left: parent.left
|
left: parent.left
|
||||||
}
|
}
|
||||||
onClicked:{
|
FluIconButton{
|
||||||
showSuccess("点击IconButton")
|
iconSource:FluentIcons.ChromeCloseContrast
|
||||||
|
disabled:icon_button_switch.checked
|
||||||
|
iconSize: 15
|
||||||
|
onClicked:{
|
||||||
|
showSuccess("点击IconButton")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluIconButton{
|
||||||
|
disabled:icon_button_switch.checked
|
||||||
|
iconDelegate: Image{ width: 20; height: 20; source: "qrc:/example/res/image/ic_home_github.png" }
|
||||||
|
onClicked:{
|
||||||
|
showSuccess("点击IconButton")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluToggleSwitch{
|
FluToggleSwitch{
|
||||||
|
|
|
@ -44,10 +44,10 @@ ScreenshotBackground::ScreenshotBackground(QQuickItem* parent) : QQuickPaintedIt
|
||||||
void ScreenshotBackground::paint(QPainter* painter)
|
void ScreenshotBackground::paint(QPainter* painter)
|
||||||
{
|
{
|
||||||
painter->save();
|
painter->save();
|
||||||
_sourcePixmap = QPixmap(QSize(_desktopGeometry.width(),_desktopGeometry.height()));
|
_sourcePixmap = QPixmap(QSize(_desktopPixmap.width(),_desktopPixmap.height()));
|
||||||
QPainter p(&_sourcePixmap);
|
QPainter p(&_sourcePixmap);
|
||||||
p.drawPixmap(_desktopGeometry,_desktopPixmap);
|
p.drawPixmap(_desktopGeometry,_desktopPixmap);
|
||||||
painter->drawPixmap(_desktopGeometry,_sourcePixmap);
|
painter->drawPixmap(_desktopGeometry,_desktopPixmap);
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ Button {
|
||||||
property color pressedColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06)
|
property color pressedColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06)
|
||||||
property color normalColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
|
property color normalColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
|
||||||
property color disableColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
|
property color disableColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
|
||||||
|
property Component iconDelegate: com_icon
|
||||||
property color color: {
|
property color color: {
|
||||||
if(!enabled){
|
if(!enabled){
|
||||||
return disableColor
|
return disableColor
|
||||||
|
@ -54,16 +55,22 @@ Button {
|
||||||
visible: control.activeFocus
|
visible: control.activeFocus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
contentItem: Item{
|
Component{
|
||||||
|
id:com_icon
|
||||||
FluIcon {
|
FluIcon {
|
||||||
id:text_icon
|
id:text_icon
|
||||||
font.pixelSize: iconSize
|
font.pixelSize: iconSize
|
||||||
iconSize: control.iconSize
|
iconSize: control.iconSize
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
anchors.centerIn: parent
|
|
||||||
iconColor: control.iconColor
|
iconColor: control.iconColor
|
||||||
iconSource: control.iconSource;
|
iconSource: control.iconSource
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentItem: Item{
|
||||||
|
Loader{
|
||||||
|
anchors.centerIn: parent
|
||||||
|
sourceComponent: iconDelegate
|
||||||
}
|
}
|
||||||
FluTooltip{
|
FluTooltip{
|
||||||
id:tool_tip
|
id:tool_tip
|
||||||
|
|
Loading…
Reference in New Issue