MCPcopy Create free account
hub / github.com/KDE/kdevelop / lineHeight

Function lineHeight

kdevplatform/util/texteditorhelpers.cpp:20–29  ·  view source on GitHub ↗

TODO: this is a hack, but Kate does not provide interface for this

Source from the content-addressed store, hash-verified

18
19// TODO: this is a hack, but Kate does not provide interface for this
20int lineHeight(const KTextEditor::View* view, int curLine)
21{
22 KTextEditor::Cursor c(curLine, 0);
23 int currentHeight = view->cursorToCoordinate(c).y();
24 c.setLine(curLine + 1);
25 if (view->cursorToCoordinate(c).y() < 0) {
26 c.setLine(curLine - 1);
27 }
28 return std::abs(view->cursorToCoordinate(c).y() - currentHeight);
29}
30
31}
32

Callers 1

itemBoundingRectMethod · 0.85

Calls 1

setLineMethod · 0.45

Tested by

no test coverage detected