<file>src/gui/tray/TalkReplyTextField.qml</file>
<file>src/gui/tray/CallNotificationDialog.qml</file>
<file>src/gui/tray/NCBusyIndicator.qml</file>
+ <file>src/gui/tray/NCToolTip.qml</file>
</qresource>
</RCC>
color: (parent.containsMouse ? Style.lightHover : "transparent")
}
- ToolTip {
- id: activityMouseAreaTooltip
- visible: containsMouse && !activityContent.childHovered && model.displayLocation !== ""
- delay: Qt.styleHints.mousePressAndHoldInterval
+ NCToolTip {
+ visible: root.containsMouse && !activityContent.childHovered && model.displayLocation !== ""
text: qsTr("In %1").arg(model.displayLocation)
- contentItem: Label {
- text: activityMouseAreaTooltip.text
- color: Style.ncTextColor
- }
- background: Rectangle {
- border.color: Style.menuBorder
- color: Style.backgroundColor
- }
}
ColumnLayout {
radius: width / 2
}
- ToolTip {
- id: moreActionsButtonTooltip
+ NCToolTip {
visible: parent.hovered
- delay: Qt.styleHints.mousePressAndHoldInterval
text: qsTr("Show more actions")
- contentItem: Label {
- text: moreActionsButtonTooltip.text
- color: Style.ncTextColor
- }
- background: Rectangle {
- border.color: Style.menuBorder
- color: Style.backgroundColor
- }
}
Accessible.name: qsTr("Show more actions")
Layout.margins: Style.roundButtonBackgroundVerticalMargins
- ToolTip {
- id: dismissActionButtonTooltip
+ NCToolTip {
visible: parent.hovered
- delay: Qt.styleHints.mousePressAndHoldInterval
text: qsTr("Dismiss")
- contentItem: Label {
- text: dismissActionButtonTooltip.text
- color: Style.ncTextColor
- }
- background: Rectangle {
- border.color: Style.menuBorder
- color: Style.backgroundColor
- }
}
Accessible.name: qsTr("Dismiss")
leftPadding: root.text === "" ? 5 : 10
rightPadding: root.text === "" ? 5 : 10
- ToolTip {
- id: customButtonTooltip
+ NCToolTip {
text: root.toolTipText
- delay: Qt.styleHints.mousePressAndHoldInterval
visible: root.toolTipText !== "" && root.hovered
- contentItem: Label {
- text: customButtonTooltip.text
- color: Style.ncTextColor
- }
- background: Rectangle {
- border.color: Style.menuBorder
- color: Style.backgroundColor
- }
}
contentItem: RowLayout {
signal pressed(QtObject mouse)
signal clicked(QtObject mouse)
- ToolTip {
- id: customTextButtonTooltip
+ NCToolTip {
text: root.toolTipText
- delay: Qt.styleHints.mousePressAndHoldInterval
visible: root.toolTipText !== "" && root.hovered
- contentItem: Label {
- text: customTextButtonTooltip.text
- color: Style.ncTextColor
- }
- background: Rectangle {
- border.color: Style.menuBorder
- color: Style.backgroundColor
- }
}
MouseArea {
--- /dev/null
+/*
+ * Copyright (C) 2022 by Claudio Cambra <claudio.cambra@nextcloud.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+import QtQml 2.15
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+
+import Style 1.0
+
+ToolTip {
+ id: toolTip
+ clip: true
+ delay: Qt.styleHints.mousePressAndHoldInterval
+ contentItem: Label {
+ text: toolTip.text
+ color: Style.ncTextColor
+ wrapMode: Text.Wrap
+ }
+ background: Rectangle {
+ border.color: Style.menuBorder
+ color: Style.backgroundColor
+ }
+}
top: replyMessageTextField.top
}
- ToolTip {
+ NCToolTip {
visible: sendReplyMessageButton.hovered
- delay: Qt.styleHints.mousePressAndHoldInterval
text: qsTr("Send reply to chat message")
}
}
height: Style.unifiedSearchItemHeight
- ToolTip {
- id: unifiedSearchResultMouseAreaTooltip
+ NCToolTip {
visible: unifiedSearchResultMouseArea.containsMouse
text: isFetchMoreTrigger ? qsTr("Load more results") : model.resultTitle + "\n\n" + model.subline
- delay: Qt.styleHints.mousePressAndHoldInterval
- contentItem: Label {
- text: unifiedSearchResultMouseAreaTooltip.text
- color: Style.ncTextColor
- }
- background: Rectangle {
- border.color: Style.menuBorder
- color: Style.backgroundColor
- }
}
Rectangle {