MCPcopy Create free account
hub / github.com/SpartanJ/eepp / onAutoSize

Method onAutoSize

src/eepp/ui/uicodeeditor.cpp:5747–5755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5745}
5746
5747void UICodeEditor::onAutoSize() {
5748 if ( mHeightPolicy == SizePolicy::WrapContent ) {
5749 auto visibleLineCount = getDocumentView().getVisibleLinesCount();
5750 Float lineHeight = getLineHeight();
5751 Float height = lineHeight * visibleLineCount + getPixelsPadding().Top +
5752 getPixelsPadding().Bottom + getTotalTopSpace();
5753 setPixelsSize( getPixelsSize().getWidth(), height );
5754 }
5755}
5756
5757void UICodeEditor::onClassChange() {
5758 for ( const auto& name : mClasses ) {

Callers

nothing calls this directly

Calls 2

getVisibleLinesCountMethod · 0.45
getWidthMethod · 0.45

Tested by

no test coverage detected