Commit Graph

4 Commits

Author SHA1 Message Date
mgrojo
85dbe7b016 Setting for line wrap in Scintilla editors
A new setting is added to the 'SQL' tab of the Preferences dialog. It
enables the line wrapping in the editors with none/character/word/
whitespace boundaries.

See comments in issue #1173.
2018-03-28 22:26:07 +02:00
mgrojo
379bbb81a2 Support for dark themes in default settings and restore defaults button
All the colour configurations have been reviewed under an operating-system theme
dark theme.

Some hard-coded colours in QScintilla editors and Data Browser have been
replaced by queries of the system palette or reuse of our settings.

New settings for foreground and background colours for QScintilla editors
defaulting to system colours. This is mainly needed because if the user
saves colour settings for a dark theme and then he changes the system theme
back to a light theme, then the foreground colours are preserved while the
background would fall back to the system theme leading to an incompatible
combination. This also gives more freedom to the user in defining his own
colour combinations.

Since only the default colour settings adapt to the system theme, and once
settings are saved this can no longer happen, a 'Restore Defaults' button
is added so the default adapted colour settings can be restored. This is
also useful for restoring default behaviour when wanted.

Other fixes and improvements: waiting cursor while saving; check boxes in
SQL tab for bold, italic and underline when applicable; avoid translation
of hidden colour setting names used in code.

See related issue #1324.
2018-02-25 19:13:28 +01:00
mgrojo
a0e0fc98ae XML mode for the cell editor
The new editor mode shares the same Scintilla widget as the JSON mode.
The JsonTextEdit class has been generalised. Future modes supported by
Scintilla could be added with the current pattern. As a consequence, the
EditMode is not always equal to the current stacked widget.

Some code in EditDialog has been refactored, so it is easier to understand
and modified with so many modes. textNullSet has been replaced by the use
of dataType as Null.

SVG is promoted to a new recognised data type, so it can be edited in the
XML mode.

The XML data is formatted and validated following the pattern established
by the JSON mode.

New modules are needed by the XML mode: the Qt XML module and some new
Scintilla files required by the HTML/XML lexer.

The indent_compact was incorrectly named in Setting::getDefaultValue.

See issue #1253.
2017-12-23 22:19:17 +01:00
mgrojo
8896ecca40 Refactoring and find/replace dialog in the JSON editor.
SQL and JSON text editor classes have been refactored. A new parent class
for both editors have been added for the common logic implementable without
depending on the specific lexer.

The only visible effect of this change should be that the JSON editor
(issue #1173) now has the same find/replace dialog as the SQL editor.

This prepares for the implementation of the XML editor (issue #1253).
2017-12-16 00:09:47 +01:00