diff --git a/TODO.md b/TODO.md index df236486..16eea2d7 100644 --- a/TODO.md +++ b/TODO.md @@ -1,4 +1,3 @@ -- HTextField focus effect - Devices and client settings in edit account page - If avatar is set, name color from average color? - Accent color from background diff --git a/src/qml/Base/HHighlightRectangle.qml b/src/qml/Base/HInteractiveRectangle.qml similarity index 61% rename from src/qml/Base/HHighlightRectangle.qml rename to src/qml/Base/HInteractiveRectangle.qml index 424012bf..43d44136 100644 --- a/src/qml/Base/HHighlightRectangle.qml +++ b/src/qml/Base/HInteractiveRectangle.qml @@ -7,10 +7,12 @@ HRectangle { property bool checkable: false // TODO property bool checked: false - property color normalColor: theme.controls.listEntry.background - property color hoveredColor: theme.controls.listEntry.hoveredBackground - property color pressedColor: theme.controls.listEntry.pressedBackground - property color checkedColor: theme.controls.listEntry.checkedBackground + readonly property QtObject _ir: theme.controls.interactiveRectangle + + property color normalColor: _ir.background + property color hoveredColor: _ir.hoveredBackground + property color pressedColor: _ir.pressedBackground + property color checkedColor: _ir.checkedBackground color: checked ? checkedColor : // tap.pressed ? pressedColor : diff --git a/src/qml/Chat/RoomSidePane/MemberDelegate.qml b/src/qml/Chat/RoomSidePane/MemberDelegate.qml index 41ec882f..d450bb8e 100644 --- a/src/qml/Chat/RoomSidePane/MemberDelegate.qml +++ b/src/qml/Chat/RoomSidePane/MemberDelegate.qml @@ -5,7 +5,7 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import "../../Base" -HHighlightRectangle { +HInteractiveRectangle { id: memberDelegate width: memberList.width height: childrenRect.height diff --git a/src/qml/SidePane/AccountDelegate.qml b/src/qml/SidePane/AccountDelegate.qml index a648cd6c..896383f3 100644 --- a/src/qml/SidePane/AccountDelegate.qml +++ b/src/qml/SidePane/AccountDelegate.qml @@ -12,7 +12,7 @@ Column { property var userInfo: users.find(model.userId) property bool expanded: true - HHighlightRectangle { + HInteractiveRectangle { width: parent.width height: childrenRect.height diff --git a/src/qml/SidePane/RoomDelegate.qml b/src/qml/SidePane/RoomDelegate.qml index 378ccfb9..00a65aa4 100644 --- a/src/qml/SidePane/RoomDelegate.qml +++ b/src/qml/SidePane/RoomDelegate.qml @@ -6,7 +6,7 @@ import QtQuick.Layouts 1.12 import "../Base" import "../utils.js" as Utils -HHighlightRectangle { +HInteractiveRectangle { id: roomDelegate width: roomList.width height: childrenRect.height diff --git a/src/qml/Theme.qml b/src/qml/Theme.qml index 214a514b..a4e6f219 100644 --- a/src/qml/Theme.qml +++ b/src/qml/Theme.qml @@ -53,7 +53,7 @@ QtObject { property color background: colors.background2 } - property QtObject listEntry: QtObject { + property QtObject interactiveRectangle: QtObject { property color background: "transparent" property color hoveredBackground: Ut.hsla(0, 0, 0, 0.2) property color pressedBackground: Ut.hsla(0, 0, 0, 0.4)