Changeset View
Changeset View
Standalone View
Standalone View
src/apps/qml/qml/messages/MessageBase.qml
Show All 20 Lines | |||||
21 | import QtQuick 2.9 | 21 | import QtQuick 2.9 | ||
22 | import QtQuick.Controls 2.5 as QQC2 | 22 | import QtQuick.Controls 2.5 as QQC2 | ||
23 | 23 | | |||
24 | import QtQuick.Layouts 1.12 | 24 | import QtQuick.Layouts 1.12 | ||
25 | 25 | | |||
26 | QQC2.Button { | 26 | QQC2.Button { | ||
27 | id: main | 27 | id: main | ||
28 | 28 | | |||
29 | property alias backgroundColor: background.color | ||||
30 | | ||||
29 | property var messageMain: undefined | 31 | property var messageMain: undefined | ||
32 | | ||||
33 | background: Rectangle { | ||||
34 | id: background | ||||
35 | | ||||
kfunk: Just `color: root.hovered ? RuqolaSingleton.alternateBackgroundColor : RuqolaSingleton. | |||||
36 | anchors.fill: parent | ||||
37 | } | ||||
30 | } | 38 | } |
Just color: root.hovered ? RuqolaSingleton.alternateBackgroundColor : RuqolaSingleton.backgroundColor here instead of the onItemChanged handler, etc.? Seems simpler.
Side note: I think FancyMessageDelegate could be a plain Item now, now that MessageBase is a Button. Or?