WSL/SLF GitLab Repository
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
snow-models
inishell
Commits
20431e70
Commit
20431e70
authored
Mar 09, 2022
by
Mathias Bavay
Browse files
minor optimization
parent
5bec22a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/gui/PreviewEdit.cc
View file @
20431e70
...
...
@@ -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
);
}
...
...
src/gui/PreviewEdit.h
View file @
20431e70
...
...
@@ -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
();
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment