Changeset View
Changeset View
Standalone View
Standalone View
src/qml/FlatButtonWithToolTip.qml
Show All 20 Lines | |||||
21 | import QtQuick.Layouts 1.2 | 21 | import QtQuick.Layouts 1.2 | ||
22 | import QtGraphicalEffects 1.0 | 22 | import QtGraphicalEffects 1.0 | ||
23 | import QtQuick.Controls 2.3 | 23 | import QtQuick.Controls 2.3 | ||
24 | import org.kde.elisa 1.0 | 24 | import org.kde.elisa 1.0 | ||
25 | 25 | | |||
26 | Button { | 26 | Button { | ||
27 | id: flatButtonWithToolTip | 27 | id: flatButtonWithToolTip | ||
28 | 28 | | |||
29 | activeFocusOnTab: true | ||||
30 | | ||||
31 | Keys.onReturnPressed: action.trigger() | ||||
32 | | ||||
29 | contentItem: Image { | 33 | contentItem: Image { | ||
30 | anchors.fill: parent | 34 | anchors.fill: parent | ||
31 | 35 | | |||
32 | source: flatButtonWithToolTip.action.icon.name != "" ? ('image://icon/' + flatButtonWithToolTip.action.icon.name) : Qt.resolvedUrl(flatButtonWithToolTip.action.icon.source) | 36 | source: flatButtonWithToolTip.action.icon.name != "" ? ('image://icon/' + flatButtonWithToolTip.action.icon.name) : Qt.resolvedUrl(flatButtonWithToolTip.action.icon.source) | ||
33 | 37 | | |||
34 | sourceSize.width: flatButtonWithToolTip.width | 38 | sourceSize.width: flatButtonWithToolTip.width | ||
35 | sourceSize.height: flatButtonWithToolTip.height | 39 | sourceSize.height: flatButtonWithToolTip.height | ||
36 | 40 | | |||
Show All 14 Lines |