KTextEditor: Fix left border flicker when switching between documents

Authored by daandemeyer on Aug 23 2019, 6:59 PM.

Description

KTextEditor: Fix left border flicker when switching between documents

Summary:
See https://mail.kde.org/pipermail/kwrite-devel/2019-August/005302.html

Because the Qt::WA_OpaquePaintEvent was not enabled, Qt was erasing the widget's area before repainting which briefly cause the background to appear which caused flickering when switching between documents. We can simply enable the Qt::WA_OpaquePaintEvent option which tells Qt to not erase the widget's area before repainting. This fixes the flickering when switching between documents.

This does assume the icon bar does not rely on the widget background color which is the case in my scenario but hopefully one of the maintainers can confirm that this is always the case.

Reviewers: KTextEditor, cullmann

Reviewed By: KTextEditor, cullmann

Subscribers: dhaumann, cullmann, kwrite-devel, kde-frameworks-devel, KTextEditor

Tags: KTextEditor, Kate, Frameworks

Differential Revision: https://phabricator.kde.org/D23373

Details