MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / lineNumbersWidth

Method lineNumbersWidth

MiniZincIDE/codeeditor.cpp:295–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295int CodeEditor::lineNumbersWidth()
296{
297 int width = 1;
298 int bc = blockCount();
299 while (bc >= 10) {
300 bc /= 10;
301 ++width;
302 }
303 width = std::max(width,3);
304 return 3 + fontMetrics().boundingRect(QLatin1Char('9')).width() * width;
305}
306
307int CodeEditor::debugInfoWidth()
308{

Callers 1

sizeHintMethod · 0.80

Calls 1

widthMethod · 0.45

Tested by

no test coverage detected