Gtk3: fixed drawing text in case when BkMode = OPAQUE, but currentBrush.style = BS_NULL

This commit is contained in:
zeljan1 2025-01-14 19:40:16 +01:00
parent 67c1be1fc6
commit 6e243ea04b

View File

@ -2026,7 +2026,10 @@ begin
FCurrentFont.Layout^.set_text(AText, ALen);
UseBack := BkMode = OPAQUE;
//This looks like a bug in logic. eg painting TTreeView: SetBkMode(OPAQUE) BkMode is OPAQUE but currentBrush.style is bsClear
//If we don't chech any of them text is not drawn as it should.
//TODO: check how this case works with win32 ws.
UseBack := (FBkMode = OPAQUE) and (CurrentBrush.Style <> BS_NULL);
if UseBack then
begin
gColor := TColorToTGDKColor(FBkColor);