yubioath-flutter/qml/StyledButton.qml
Dag Heyman 94edf799b6 New UI based on Quick Controls 2
- New design based on Material Style
- Light mode and Dark mode
- Add support for custom CCID readers
- New tray functionality
- Support for favorite credentials

Co-authored-by: Rikard <rikard@yubico.com>
2019-09-11 10:30:37 +02:00

33 lines
864 B
QML

import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtQuick.Controls.Material 2.2
import QtGraphicalEffects 1.0
Button {
property alias toolTipText: buttonToolTip.text
id: button
font.capitalization: Font.capitalization
font.weight: Font.Medium
Material.foreground: button.flat ? Material.primary : yubicoWhite
Material.background: button.flat ? "transparent" : Material.primary
Material.elevation: button.flat ? 0 : 1
ToolTip {
id: buttonToolTip
text: ""
delay: 1000
parent: button
visible: buttonToolTip.text.length > 0 && parent.hovered
Material.foreground: toolTipForeground
Material.background: toolTipBackground
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
enabled: false
}
}