| 63 | } |
| 64 | |
| 65 | void NeuralNoteLNF::drawTooltip(Graphics& g, const String& text, int width, int height) |
| 66 | { |
| 67 | g.setColour(WHITE_SOLID.darker(0.0f)); |
| 68 | g.fillRoundedRectangle(0.0f, 0.0f, static_cast<float>(width), static_cast<float>(height), 5.0f); |
| 69 | |
| 70 | g.setColour(BLACK); |
| 71 | g.setFont(UIDefines::LABEL_FONT()); |
| 72 | |
| 73 | auto text_std = text.toStdString(); |
| 74 | int num_line_breaks = static_cast<int>(std::count(text_std.begin(), text_std.end(), '\n')); |
| 75 | |
| 76 | g.drawFittedText(text, 0, 0, width, height, Justification::centred, num_line_breaks + 1); |
| 77 | } |
nothing calls this directly
no test coverage detected