|
|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
import QtQuick 2.12
|
|
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
|
import MeuiKit 1.0 as Meui
|
|
|
|
|
import FishUI 1.0 as FishUI
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
id: control
|
|
|
|
|
@ -16,17 +16,17 @@ Item {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.fillHeight: true
|
|
|
|
|
|
|
|
|
|
property color backgroundColor: Meui.Theme.backgroundColor
|
|
|
|
|
property color hoveredColor: Meui.Theme.darkMode ? Qt.lighter(Meui.Theme.backgroundColor, 1.1)
|
|
|
|
|
: Qt.darker(Meui.Theme.backgroundColor, 1.1)
|
|
|
|
|
property color pressedColor: Meui.Theme.darkMode ? Qt.darker(Meui.Theme.backgroundColor, 1.05)
|
|
|
|
|
: Qt.darker(Meui.Theme.backgroundColor, 1.3)
|
|
|
|
|
property color backgroundColor: FishUI.Theme.backgroundColor
|
|
|
|
|
property color hoveredColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.1)
|
|
|
|
|
: Qt.darker(FishUI.Theme.backgroundColor, 1.1)
|
|
|
|
|
property color pressedColor: FishUI.Theme.darkMode ? Qt.darker(FishUI.Theme.backgroundColor, 1.05)
|
|
|
|
|
: Qt.darker(FishUI.Theme.backgroundColor, 1.3)
|
|
|
|
|
|
|
|
|
|
property color flatBg: Meui.Theme.highlightColor
|
|
|
|
|
property color flatHoveredBg: Meui.Theme.darkMode ? Qt.lighter(Meui.Theme.highlightColor, 1.1)
|
|
|
|
|
: Qt.darker(Meui.Theme.highlightColor, 1.1)
|
|
|
|
|
property color flatPressedBg: Meui.Theme.darkMode ? Qt.lighter(Meui.Theme.highlightColor, 1.05)
|
|
|
|
|
: Qt.darker(Meui.Theme.highlightColor, 1.3)
|
|
|
|
|
property color flatBg: FishUI.Theme.highlightColor
|
|
|
|
|
property color flatHoveredBg: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.highlightColor, 1.1)
|
|
|
|
|
: Qt.darker(FishUI.Theme.highlightColor, 1.1)
|
|
|
|
|
property color flatPressedBg: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.highlightColor, 1.05)
|
|
|
|
|
: Qt.darker(FishUI.Theme.highlightColor, 1.3)
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: _background
|
|
|
|
|
@ -62,7 +62,7 @@ Item {
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
Layout.minimumWidth: parent.width
|
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
|
color: !flat ? Meui.Theme.textColor : Meui.Theme.highlightedTextColor
|
|
|
|
|
color: !flat ? FishUI.Theme.textColor : FishUI.Theme.highlightedTextColor
|
|
|
|
|
text: control.text
|
|
|
|
|
visible: !_icon.visible
|
|
|
|
|
minimumPointSize: Math.round(control.height / 5)
|
|
|
|
|
|