NCToolTip.qml 991 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (C) 2022 by Claudio Cambra <claudio.cambra@nextcloud.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11. * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  12. * for more details.
  13. */
  14. import QtQml 2.15
  15. import QtQuick 2.15
  16. import QtQuick.Controls 2.15
  17. import Style 1.0
  18. ToolTip {
  19. id: toolTip
  20. clip: true
  21. delay: Qt.styleHints.mousePressAndHoldInterval
  22. contentItem: Label {
  23. text: toolTip.text
  24. color: Style.ncTextColor
  25. wrapMode: Text.Wrap
  26. }
  27. background: Rectangle {
  28. border.color: Style.menuBorder
  29. color: Style.backgroundColor
  30. }
  31. }