ukui-menu/qml/AppControls2/RoundButton.qml

25 lines
636 B
QML

import QtQuick 2.0
import org.ukui.menu.core 1.0
MouseArea {
id: buttonMouseArea
hoverEnabled: true
property string buttonIcon: ""
property bool highlight: false
StyleBackground {
useStyleTransparent: false
paletteRole: mainWindow.isFullScreen ? Palette.Light : Palette.Text
anchors.fill: parent
radius: height / 2
alpha: buttonMouseArea.containsPress ? 0.20 : buttonMouseArea.containsMouse ? 0.16 : 0.10
}
ThemeIcon {
anchors.centerIn: parent
width: 16; height: width
source: buttonIcon
highLight: buttonMouseArea.highlight
}
}