Scripter - remove magic numbers, increase initial window width
ClosedPublic

Authored by brendanbd on Jan 27 2018, 6:44 AM.

Details

Summary

Remove magic numbers, increase width of initial window. Previous was about 30 chars. That gets eaten up qith 4 char indents and variable names. New window size is approximately 72 chars on my screen.

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
brendanbd created this revision.Jan 27 2018, 6:44 AM
Restricted Application added a subscriber: woltherav. · View Herald TranscriptJan 27 2018, 6:44 AM
brendanbd requested review of this revision.Jan 27 2018, 6:44 AM
rempt accepted this revision.Jan 27 2018, 9:59 AM
rempt added a subscriber: rempt.

It would be even nicer to store the windows geometry in a settings file, though.

This revision is now accepted and ready to land.Jan 27 2018, 9:59 AM

Agreed. This was faster.

Closed by commit R37:2c43afe15f8e: Scripter - remove magic numbers, increase initial window width (authored by Brendan Bd <bunf2014@apps.opensourcelaw.biz>). · Explain WhyJan 27 2018, 11:02 AM
This revision was automatically updated to reflect the committed changes.

I had thought about doing it as a setting that stored the previous size (perhaps geometry) of the scripter window as at close. Anything else would require a line entry in the settings dialog => new strings in any event.
I need to work out how the Krita settings work first.

I had thought about doing it as a setting that stored the previous size (perhaps geometry) of the scripter window as at close. Anything else would require a line entry in the settings dialog => new strings in any event.
I need to work out how the Krita settings work first.

Scripter uses QSettings for that, and there's already code to read and write the settings on startup and closing the window, so that should be easy enough. The documentation seems to be completely the wrong way around, though...