WSL/SLF GitLab Repository

Commit 20431e70 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

minor optimization

parent 5bec22a8
......@@ -178,7 +178,6 @@ int PreviewEdit::getSidePanelWidth()
void PreviewEdit::updateSidePanelWidth()
{
//we add a small margin between the line number and the line itself
const int margin_width = fontMetrics().boundingRect(QLatin1Char('M')).width() / 2;
setViewportMargins(getSidePanelWidth()+margin_width, 0, 0, 0);
}
......
......@@ -61,6 +61,7 @@ class PreviewEdit : public QPlainTextEdit
QString file_path_; //file path without name
QString file_name_;
INISyntaxHighlighter *highlighter_ = nullptr;
const int margin_width = fontMetrics().boundingRect(QLatin1Char('M')).width();
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment