ExtUTF8Out does not paint background correctly (gtk Fedora / XUbuntu)
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
This issue only happens on some Linux Distros.
Known to be affected: Fedora 33 / XUbuntu (but not Ubuntu) according to #38685 (closed)
ExtUTF8Out can be given a rect.
The rect can be used for clipping and/or can be filled with background color.
On Fedore33/Xubuntu,
- if the rect is bigger than the text,
- and the color given is clBtnFace
then the text background will be one color (only slightly different)
and the rest of the rectangle will be another color (apparently clForm)
It is possible that the appearance of this issue may depend on the color theme selected for the OS.
There may also be other colors (sys colors) be affected, but I could not find any (not with the default color scheme on my Fedore 33)
--------------------------------
To reproduce:
- Create a new procject / empty form
- Add "OnPaint" event, and copy the code below.
Run => Only the text will have a slight different color, than the rest of the form. The rest of rectangle has clForm.
Uncomment the lines
You will see that the full rectangle is painted, but it is painted in clform.
The Text background is only ever so slightly different (depending on color scheme) it needs to be carefully looked at.
On XUbuntu (see first image @ #38685 (closed) / the entire gutter is painted clBtnFace ) the diff is clearly visible.
-------------------------------
Expected: The entire rectangle has one uniform background color.
Steps to reproduce:
procedure TForm1.FormPaint(Sender: TObject);
var
r: TRect;
begin
// r.top := 30; r.Bottom := 180; r.Left := 30; r.Right := 280;
// Canvas.Brush.Color:=clBlue;
// canvas.FillRect(r);
r.top := 50; r.Bottom := 150; r.Left := 50; r.Right := 250;
LCLIntf.SetBkColor(canvas.Handle, TColorRef( clBtnFace ));
LCLIntf.SetTextColor(canvas.Handle, TColorRef(clGreen));
LCLIntf.ExtUTF8Out(canvas.Handle, 50, 50, ETO_OPAQUE or ETO_CLIPPED, @r, pchar('ABC'), 3, nil);
end;
Mantis conversion info:
- Mantis ID: 38692
- OS: Fedora
- OS Build: 64 bit
- Platform: Linux