31 lines
766 B
QML
31 lines
766 B
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
|
|
Button {
|
|
property int iconSize: 20
|
|
property int iconSource
|
|
property int radius:4
|
|
property color color: {
|
|
if(!enabled){
|
|
return disableColor
|
|
}
|
|
if(pressed){
|
|
return pressedColor
|
|
}
|
|
return hovered ? hoverColor : normalColor
|
|
}
|
|
property color iconColor: {
|
|
if (FluTheme.dark) {
|
|
if (!enabled) {
|
|
return Qt.rgba(130 / 255, 130 / 255, 130 / 255, 1)
|
|
}
|
|
return Qt.rgba(1, 1, 1, 1)
|
|
} else {
|
|
if (!enabled) {
|
|
return Qt.rgba(161 / 255, 161 / 255, 161 / 255, 1)
|
|
}
|
|
return Qt.rgba(0, 0, 0, 1)
|
|
}
|
|
}
|
|
}
|