KateRenderer: when printing initially set the color scheme to Printing
Needs RevisionPublic

Authored by ahmadsamir on Thu, Jan 10, 6:02 PM.

Details

Reviewers
cullmann
dhaumann
mwolff
Group Reviewers
KTextEditor
Summary

Otherwise the print preview dialog somehow gets the text color from the
current default color scheme; also the user can't change the color scheme
either from the print preview dialog or the "print" dialog launched from
the preview dialog. All in all, this seems like a safe default.

BUG: 391678
FIXED-IN: 5.55.0

Test Plan
  • Change the default color scheme in kate to a dark one, e.g. Breeze dark
  • Open the print preview dialog, note that the text color is the one used in the breeze dark scheme, but the background color is still white

Apply the diff, the print preview dialog will be using the Printing color scheme
as expected.

Diff Detail

Repository
R39 KTextEditor
Branch
print-preview-text-color
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6927
Build 6945: arc lint + arc unit
ahmadsamir created this revision.Thu, Jan 10, 6:02 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptThu, Jan 10, 6:02 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
ahmadsamir requested review of this revision.Thu, Jan 10, 6:02 PM
mwolff accepted this revision as: mwolff.Tue, Jan 15, 2:04 PM
mwolff added a subscriber: mwolff.

lgtm, @cullmann @dhaumann? could the schema name be translated (I hope not)?

This revision is now accepted and ready to land.Tue, Jan 15, 2:04 PM
dhaumann requested changes to this revision.Tue, Jan 15, 8:05 PM

Looking at the printing pages, I can find the following, see screenshot. Please note the ComboBox where you can select a printing schema. In other words, this should not be hard-coded, I think it should be explicitly set somewhere to what's specified in this combobox. @ahmadsamir Can you have a look again?

This revision now requires changes to proceed.Tue, Jan 15, 8:05 PM

@dhaumann: in the screenshot that's "file -> print"; the issue here is with "file -> print preview", where the extra options tabs (including "Layout") aren't added by ktexteditor. :)