| 293 | } |
| 294 | |
| 295 | int 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 | |
| 307 | int CodeEditor::debugInfoWidth() |
| 308 | { |