Add a tbutton on a form. In linux-customdrawn the caption of the tbutton doesn't appear. To fix this bug update the following routines with the following content.
class procedure TCDWSButton.InjectCDControl(const AWinControl: TWinControl; var ACDControlField: TCDControl);
begin
TCDIntfButton(ACDControlField).LCLControl := TCustomButton(AWinControl);
ACDControlField.Caption := AWinControl.Caption;
ACDControlField.Parent := AWinControl;
ACDControlField.Align := alClient;
{$ifdef VerboseCDInjectedControlNames}ACDControlField.Name := 'CustomDrawnInternal_' + AWinControl.Name;{$endif}
end;
class function TCDWSButton.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): TLCLHandle;
var
lCDWinControl: TCDWinControl;
begin
Result := TCDWSWinControl.CreateHandle(AWinControl, AParams);
lCDWinControl := TCDWinControl(Result);
lCDWinControl.CDControl := TCDIntfButton.Create(AWinControl);
end;
Now the caption of the button appears. It is not centered in the middle of the button, but that's a different bug.
A note:
lCDWinControl.CDControl := TCDXXX.Create(AWinControl); is the line that has to exist in createhandle according to commits like:
LCL-CustomDrawn: Starts BitBtn implementation
LCL-CustomDrawn: Adds initial TScrollBar and SpinEdit implementations
Here is a patch.