Closed sfroome closed 4 weeks ago
Can you suggest a GUI to use that will show the old and new behaviour? I assume this is a qtvcp-only change?
It will show in any Qtvcp screen. The colors would need to be selectable. I'll think on this request.
In Gmoccapy we can chose a theme for the G-code editor (Gtk SourceView) which controls the background color e.g.
I wonder if there is something similar for Qt?
Yes, Qt has stylesheets, which can also manipulate arbitrary properties. We would have to add two color properties to the widget. But I think focus event changes are better set in the screen handler code, rather then in the widget it's self.
Thank you for the merge request. In this case, I think this is best to do it in the handler file of the screen. Al the versions of Qtdragon use a similar technique to color borders when selecting MPG scrolling in master. This is where you could add code to color the background if wanted. Please do not hesitate to comment if you think of problems with using the handler file or would like help in some way to code from the handler file. I look forward to more suggestions/code.
This merge request adds event handling for the focusIn and focusOut events of the gcode editor. If the editor is in focus, it sets the editor's background white. Otherwise, the background is set to lightgrey.