Mercurial > hg > octave-nkf
diff libgui/src/m-editor/file-editor-tab.cc @ 16693:e9d0b8252a0a
make color of current line marker in the editor configurable
* settings-dailog.ui: add dummy for color picker
* settings-dialog.h: add pointer to color picker as class variable
* settings-dialog.cc(constructor): add color picker with color from settings
(write_changed_settings): store color from color picker in settings file
* file-editor-tab.cc(constructor): remove setting the color of the marker here
(notice_settings): load color for the marker from the settings file
author | Torsten <ttl@justmail.de> |
---|---|
date | Tue, 21 May 2013 20:08:22 +0200 |
parents | cf939872811c |
children | ccfbc767ff5a |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -99,9 +99,6 @@ _edit_area->setMarginType (3, QsciScintilla::SymbolMargin); _edit_area->setFolding (QsciScintilla::BoxedTreeFoldStyle , 3); - //highlight current line color - _edit_area->setCaretLineBackgroundColor (QColor (245, 245, 245)); - // other features _edit_area->setBraceMatching (QsciScintilla::StrictBraceMatch); _edit_area->setAutoIndent (true); @@ -1090,6 +1087,11 @@ QFontMetrics lexer_font_metrics (_edit_area->lexer ()->defaultFont (0)); + //highlight current line color + QVariant default_var = QColor (240, 240, 240); + QColor setting_color = settings->value ("editor/highlight_current_line_color", + default_var).value<QColor> (); + _edit_area->setCaretLineBackgroundColor (setting_color); _edit_area->setCaretLineVisible (settings->value ("editor/highlightCurrentLine", true).toBool ());