Make reply and options buttons smaller
This commit is contained in:
parent
8727831de7
commit
7947ba57cc
@ -73,11 +73,14 @@ Rectangle {
|
|||||||
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
||||||
id: replyButton
|
id: replyButton
|
||||||
flat: true
|
flat: true
|
||||||
height: 32
|
Layout.preferredHeight: 16
|
||||||
width: 32
|
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
ToolTip.text: qsTr("Reply")
|
ToolTip.text: qsTr("Reply")
|
||||||
|
|
||||||
|
// disable background, because we don't want a border on hover
|
||||||
|
background: Item {
|
||||||
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: replyButtonImg
|
id: replyButtonImg
|
||||||
// Workaround, can't get icon.source working for now...
|
// Workaround, can't get icon.source working for now...
|
||||||
@ -87,17 +90,21 @@ Rectangle {
|
|||||||
ColorOverlay {
|
ColorOverlay {
|
||||||
anchors.fill: replyButtonImg
|
anchors.fill: replyButtonImg
|
||||||
source: replyButtonImg
|
source: replyButtonImg
|
||||||
color: colors.buttonText
|
color: replyButton.hovered ? colors.highlight : colors.buttonText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
||||||
id: optionsButton
|
id: optionsButton
|
||||||
flat: true
|
flat: true
|
||||||
height: optionsButtonImg.contentHeight
|
Layout.preferredHeight: 16
|
||||||
width: optionsButtonImg.contentWidth
|
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
ToolTip.text: qsTr("Options")
|
ToolTip.text: qsTr("Options")
|
||||||
|
|
||||||
|
// disable background, because we don't want a border on hover
|
||||||
|
background: Item {
|
||||||
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: optionsButtonImg
|
id: optionsButtonImg
|
||||||
// Workaround, can't get icon.source working for now...
|
// Workaround, can't get icon.source working for now...
|
||||||
@ -107,7 +114,7 @@ Rectangle {
|
|||||||
ColorOverlay {
|
ColorOverlay {
|
||||||
anchors.fill: optionsButtonImg
|
anchors.fill: optionsButtonImg
|
||||||
source: optionsButtonImg
|
source: optionsButtonImg
|
||||||
color: colors.buttonText
|
color: optionsButton.hovered ? colors.highlight : colors.buttonText
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: contextMenu.open()
|
onClicked: contextMenu.open()
|
||||||
@ -135,6 +142,15 @@ Rectangle {
|
|||||||
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
||||||
text: model.timestamp.toLocaleTimeString("HH:mm")
|
text: model.timestamp.toLocaleTimeString("HH:mm")
|
||||||
color: inactiveColors.text
|
color: inactiveColors.text
|
||||||
|
|
||||||
|
ToolTip.visible: ma.containsMouse
|
||||||
|
ToolTip.text: Qt.formatDateTime(model.timestamp, Qt.DefaultLocaleLongDate)
|
||||||
|
|
||||||
|
MouseArea{
|
||||||
|
id: ma
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user