MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / updateZoomValue

Method updateZoomValue

src/plugins/codeeditor/gui/tabwidget.cpp:943–960  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

941}
942
943void TabWidget::updateZoomValue(int value)
944{
945 auto editor = d->currentTextEditor();
946 if (editor->hasFocus())
947 editor->updateLineNumberWidth(false);
948
949 // update other editor
950 for (auto other : d->editorMng.values()) {
951 if (editor == other && editor->hasFocus())
952 continue;
953
954 // Disconnect first to prevent loop triggering
955 disconnect(other, &TextEditor::zoomValueChanged, this, &TabWidget::zoomValueChanged);
956 other->zoomTo(value);
957 other->updateLineNumberWidth(false);
958 connect(other, &TextEditor::zoomValueChanged, this, &TabWidget::zoomValueChanged);
959 }
960}
961
962int TabWidget::backgroundMarkerDefine(const QString &fileName, const QColor &color, int defaultMarker)
963{

Callers 1

onZoomValueChangedMethod · 0.80

Calls 6

connectFunction · 0.85
currentTextEditorMethod · 0.80
hasFocusMethod · 0.80
updateLineNumberWidthMethod · 0.80
valuesMethod · 0.80
zoomToMethod · 0.80

Tested by

no test coverage detected