CodeEditor Widget Styling#1874
Conversation
With profileration of Qt5 styling methods, problems with presentation can occur when using cppcheck-gui and user choosen themes. With a dark theme, a highlighted line in the CodeEditor appears with white text on a light background or dark colors on a dark background. Commit makes changes to enforce a default style on the Code Editor widget. Mechanism is provided, if desired, where a user defined styling can be provided to CodeEditor widget.
|
lgtm. I'm not sure how this works but I'm all for following the theme. I'm rerunning the appveyor right now, maybe the fail was interrmittent.. |
|
I didn't get any warnings/errors during build on Linux. However, thinking about this, I wonder if there might be an issue on Windows platform and the usage of rule-of-five language used in This isn't any real magic. The style applied for CodeEditor widget is still as originally coded. It's just encapsulated in a class with public access. The next step would be populating the CodeEditorStyle class with either a dark theme or user choices. I didn't think it was appropriate to over-think/over-work styling. There are choices that need to be made about level of effort and implementation. |
With profileration of Qt5 styling methods, problems with presentation can occur when using cppcheck-gui and user choosen themes. With a dark theme, a highlighted line in the CodeEditor appears with white text on a light background or dark colors on a dark background. Commit makes changes to enforce a default style on the Code Editor widget. Mechanism is provided, if desired, where a user defined styling can be provided to CodeEditor widget. 2nd commit - remove declarations in gui/codeeditorstyle.h to possibly resolve appveyor window builds.
I like it. But well.. I have a very little knowledge about how this should be implemented. I don't want that we "over-work" the styling. And some quick and ugly hack is not wanted neither. If you are willing to work on this I would like to give you freedom to make the choices that you think are appropriate. |
Building on #1874, commit adds user controls to choose or edit style in cppcheck-gui ONLY. Commit does not address CodeEditor style usage in triage app at this time. Code Editor style can be altered from the added "Code Editor" tab in the user preferences. The user has the option to select default light, default dark, or to customize. If user leaves the style set to light or dark defaults, this will be reflected in the choices shown in the preferences dialog. User choice for Code Editor Style is saved in the cppcheck-gui preferences under the heading "EditorStyle".
…-opensource#1913) Building on cppcheck-opensource#1874, commit adds user controls to choose or edit style in cppcheck-gui ONLY. Commit does not address CodeEditor style usage in triage app at this time. Code Editor style can be altered from the added "Code Editor" tab in the user preferences. The user has the option to select default light, default dark, or to customize. If user leaves the style set to light or dark defaults, this will be reflected in the choices shown in the preferences dialog. User choice for Code Editor Style is saved in the cppcheck-gui preferences under the heading "EditorStyle".
With profileration of Qt5 styling methods, problems with presentation
can occur when using cppcheck-gui and user choosen themes. With a dark
theme, a highlighted line in the CodeEditor appears with white text on
a light background or dark colors on a dark background.
Commit makes changes to enforce a default style on the Code Editor widget.
Mechanism is provided, if desired, where a user defined styling can
be provided to CodeEditor widget.