| 44 | namespace |
| 45 | { |
| 46 | class PerformanceSplitterHandle : public QSplitterHandle |
| 47 | { |
| 48 | public: |
| 49 | explicit PerformanceSplitterHandle(Qt::Orientation orientation, QSplitter *parent) |
| 50 | : QSplitterHandle(orientation, parent) |
| 51 | {} |
| 52 | |
| 53 | protected: |
| 54 | void paintEvent(QPaintEvent *) override |
| 55 | { |
| 56 | // This brings back the line effect that we lost when we moved to a splitter |
| 57 | QPainter painter(this); |
| 58 | const QColor lineColor = ColorScheme::DetectDarkMode() |
| 59 | ? QColor(0x55, 0x55, 0x55) |
| 60 | : QColor(0xb8, 0xb8, 0xb8); |
| 61 | painter.setPen(lineColor); |
| 62 | |
| 63 | // The splitter handle is wider than the visible separator so it remains |
| 64 | // easy to grab. Draw only a single centered pixel column; painting at x=0 |
| 65 | // can disappear after Qt clips/repositions the handle during resizing. |
| 66 | const int x = this->width() / 2; |
| 67 | painter.drawLine(x, 0, x, this->height()); |
| 68 | } |
| 69 | }; |
| 70 | |
| 71 | class PerformanceSplitter : public QSplitter |
| 72 | { |
nothing calls this directly
no outgoing calls
no test coverage detected