| 87 | |
| 88 | protected: |
| 89 | void timerEvent(QTimerEvent*) override |
| 90 | { |
| 91 | if (autoHide && geometry().contains(QCursor::pos())) |
| 92 | { |
| 93 | if (!hidden) |
| 94 | { |
| 95 | if (backgroundColor.alphaF() > 0.05) backgroundColor.setAlphaF(0.05); |
| 96 | if (outliner->color.alphaF() > 0.05) outliner->color.setAlphaF(0.05); |
| 97 | QColor hiddenTextColor = TextColor(); |
| 98 | if (hiddenTextColor.alphaF() > 0.05) hiddenTextColor.setAlphaF(0.05); |
| 99 | ui.display->setPalette(QPalette(hiddenTextColor, {}, {}, {}, {}, {}, {})); |
| 100 | hidden = true; |
| 101 | repaint(); |
| 102 | } |
| 103 | } |
| 104 | else if (hidden) |
| 105 | { |
| 106 | backgroundColor.setAlpha(settings.value(BG_COLOR).value<QColor>().alpha()); |
| 107 | outliner->color.setAlpha(settings.value(OUTLINE_COLOR).value<QColor>().alpha()); |
| 108 | ui.display->setPalette(QPalette(settings.value(TEXT_COLOR).value<QColor>(), {}, {}, {}, {}, {}, {})); |
| 109 | hidden = false; |
| 110 | repaint(); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | QMenu menu{ ui.display }; |
| 115 | Settings settings{ this }; |
nothing calls this directly
no outgoing calls
no test coverage detected