Workaround bug with native rendering and opacity in TextField text
ClosedPublic

Authored by davidedmundson on Aug 23 2018, 12:03 PM.

Details

Summary

Problem is identified in https://bugreports.qt.io/browse/QTBUG-70138
with a potential patch for upstream.

With native rendering the alpha is pointlessly also set in the
glBlendFunc despite also being used in the uniform of the shader.
Resulting in a visual bug when used on a window with alpha (such as
Dialog)

It sucks, but we were starting to see people work round it by copying
more invasive workarounds everywhere else which I want to avoid.

BUG: 396813

Test Plan

Looked at a text field

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 23 2018, 12:03 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Aug 23 2018, 12:03 PM
broulik accepted this revision.Aug 23 2018, 12:47 PM
This revision is now accepted and ready to land.Aug 23 2018, 12:47 PM

We could also get rid of the import QtQuick.Window 2.2 line since it only existed to get Screen.devicePixelRatio, which this patch removes.

And potentially QtQuickControlsPrivate import but I recall it had some sideeffects that we needed, despite not using anything from it(?)

Anyway, confirmed that this works around the problem for me. +1

This revision was automatically updated to reflect the committed changes.