diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2019-09-07 12:35:44 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2019-11-23 20:06:14 +0100 |
commit | 7947ba57cc941c7af1f9b59796180df9b2fc60a0 (patch) | |
tree | 4ab896ce2f640603ba3365588f09aa0ae98e059e /resources | |
parent | 8727831de7308ee5cf202c9b20a7bbf916405b2a (diff) |
Make reply and options buttons smaller
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/TimelineView.qml | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 76e728c3..5f068e57 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -73,11 +73,14 @@ Rectangle { Layout.alignment: Qt.AlignRight | Qt.AlignTop id: replyButton flat: true - height: 32 - width: 32 + Layout.preferredHeight: 16 ToolTip.visible: hovered ToolTip.text: qsTr("Reply") + // disable background, because we don't want a border on hover + background: Item { + } + Image { id: replyButtonImg // Workaround, can't get icon.source working for now... @@ -87,17 +90,21 @@ Rectangle { ColorOverlay { anchors.fill: replyButtonImg source: replyButtonImg - color: colors.buttonText + color: replyButton.hovered ? colors.highlight : colors.buttonText } } Button { Layout.alignment: Qt.AlignRight | Qt.AlignTop id: optionsButton flat: true - height: optionsButtonImg.contentHeight - width: optionsButtonImg.contentWidth + Layout.preferredHeight: 16 ToolTip.visible: hovered ToolTip.text: qsTr("Options") + + // disable background, because we don't want a border on hover + background: Item { + } + Image { id: optionsButtonImg // Workaround, can't get icon.source working for now... @@ -107,7 +114,7 @@ Rectangle { ColorOverlay { anchors.fill: optionsButtonImg source: optionsButtonImg - color: colors.buttonText + color: optionsButton.hovered ? colors.highlight : colors.buttonText } onClicked: contextMenu.open() @@ -135,6 +142,15 @@ Rectangle { Layout.alignment: Qt.AlignRight | Qt.AlignTop text: model.timestamp.toLocaleTimeString("HH:mm") color: inactiveColors.text + + ToolTip.visible: ma.containsMouse + ToolTip.text: Qt.formatDateTime(model.timestamp, Qt.DefaultLocaleLongDate) + + MouseArea{ + id: ma + anchors.fill: parent + hoverEnabled: true + } } } |