ukui-menu/qml/AppControls2/RoundButton.qml

26 lines
686 B
QML
Raw Normal View History

import QtQuick 2.0
import org.ukui.menu.core 1.0
MouseArea {
id: buttonMouseArea
hoverEnabled: true
property string buttonIcon: ""
property alias highlight: themeIcon.highLight
property alias autoHighLight: themeIcon.autoHighLight
StyleBackground {
useStyleTransparent: false
2023-03-22 16:42:06 +08:00
paletteRole: mainWindow.isFullScreen ? Palette.Light : Palette.Text
anchors.fill: parent
radius: height / 2
2023-03-22 16:42:06 +08:00
alpha: buttonMouseArea.containsPress ? 0.20 : buttonMouseArea.containsMouse ? 0.16 : 0.10
}
2023-03-17 16:37:09 +08:00
ThemeIcon {
id: themeIcon
anchors.centerIn: parent
width: 16; height: width
source: buttonIcon
}
}