diff libgui/src/m-editor/octave-qscintilla.cc @ 29498:5384bb4efc51

rearrange default lexer settings and add second color mode to gui editor * default-qt-settings.in: remove all lexer related default settings * gui-preferences-ed.h: add constants related to the number of lexer styles, remove obsolete preference ed_highlight_current_line_color * gui-settings.cc (get_color_value): move detecting the color from the QVaraiant drom color_value into this separate function (required for reading the default lexer settings); (color_value); see get_color_value; (set_color_value): shorter access to QStringList elements * gui-settings.h: new method get_color_value, new constant for the magenta color indicating same color as the default value in the editor styles * file-editor-tab.cc (file_edito_tab): read lexer settings depending on the current color mode, determine color of current line depending on background color (no more user pref) * octave-qscintilla.cc (set_selection_marker_color): increase alpha value for highlighted occurrences of double clicked word * resource-manager.cc (get_valid_lexer_styles): moved this method from settings_dialog (static) to normal method here; (copy_font_attributes): private method for copying attributes from one font to another font (read_lexer_settings): take color mode into consideration, if lexer settings not found in settings file, take defaults from the lexer, not from octaves default settings file, and write them to the settings file related to the selected color mode * resource-manager.h: new methods get_valid_lexer_styles, copy_font_attributes and new arguments for read_lexer_settings * settings-dialog.cc (get_valid_lexer_styles) moved static method into non-static in resource_manager; (settings_dialog): remove settings for current editor line color; move lexer definition and reading related settings into separate new slot update_editor_lexers, add color mode checkbox and connect state change to update_editor_lexers; (update_editor_lexers): definition of lexers for each language and call update_lexer for the specific actions; (update_lexer): call rmgr.read_lexer_settings, i.e., read settings or get default values from lexer check whether the language tabs in the settings dialog have to be created or updated (due to color mode change), call get_lexer_settings in the first and update the color picker in the second case; (get_lexer_settings, renamed from read_lexer_settings): create the language tab and fill in the lexer values (write_lexer_settings): new argument color mode, write settings into the related section into the settings file; (write_changed_settings): write the editor color mode into the settings, remove editor current line color * settings-dialog.h: new methods update_editor_lexers, update_lexer, renamed read_lexer_settings into get_lexer_settings, new arguments for write_lexer_settings, removed class variable for editor current line color * settings-dialog.ui: added checkbox for editor color mode, removed color picker for editor current line color
author Torsten Lilge <ttl-octave@mailbox.org>
date Tue, 06 Apr 2021 21:26:52 +0200
parents 7854d5752dd2
children 3d34b70b5a49
line wrap: on
line diff
--- a/libgui/src/m-editor/octave-qscintilla.cc	Tue Apr 06 14:25:27 2021 -0400
+++ b/libgui/src/m-editor/octave-qscintilla.cc	Tue Apr 06 21:26:52 2021 +0200
@@ -235,7 +235,7 @@
   void octave_qscintilla::set_selection_marker_color (const QColor& c)
   {
     QColor ic = c;
-    ic.setAlphaF (0.25);
+    ic.setAlphaF (0.45);
     setIndicatorForegroundColor (ic, m_indicator_id);
     setIndicatorOutlineColor (ic, m_indicator_id);