12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- import QtQuick
- import QtQuick.Controls.impl
- import QtQuick.NativeStyle as NativeStyle
- NativeStyle.DefaultButton {
- id: control
- background: NativeStyle.Button {
- control: control
- contentWidth: contentItem.implicitWidth
- contentHeight: contentItem.implicitHeight
- useNinePatchImage: false
- overrideState: NativeStyle.StyleItem.NeverHovered
- }
- NativeStyle.Button {
- id: hoverButton
- control: control
- x: background.x
- y: background.y
- width: background.width
- height: background.height
- useNinePatchImage: false
- overrideState: NativeStyle.StyleItem.AlwaysHovered
- opacity: control.hovered ? 1 : 0
- visible: opacity !== 0
- Behavior on opacity { NumberAnimation { duration: hoverButton.transitionDuration } }
- }
- contentItem: IconLabel {
- spacing: control.spacing
- mirrored: control.mirrored
- display: control.display
- icon: control.icon
- text: control.text
- font: control.font
- color: control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText
- }
- }
|