mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 07:37:02 +02:00
Gtk3: implemented color property for TCustomGroupBox.
This commit is contained in:
parent
a19c10092a
commit
c3a7f80706
@ -702,6 +702,7 @@ type
|
||||
FGroupBoxType:TGtk3GroupBoxType;
|
||||
function GetInnerClientRect(Frame:PGtkWidget):TRect;
|
||||
protected
|
||||
procedure DoBeforeLCLPaint; override;
|
||||
procedure ConnectSizeAllocateSignal(ToWidget: PGtkWidget); override;
|
||||
function CreateWidget(const {%H-}Params: TCreateParams):PGtkWidget; override;
|
||||
function getText: String; override;
|
||||
@ -3779,6 +3780,23 @@ begin
|
||||
Result := RectFromGdkRect(FinalRect);
|
||||
end;
|
||||
|
||||
procedure TGtk3GroupBox.DoBeforeLCLPaint;
|
||||
var
|
||||
DC: TGtk3DeviceContext;
|
||||
NColor: TColor;
|
||||
begin
|
||||
inherited DoBeforeLCLPaint;
|
||||
if not Visible then
|
||||
exit;
|
||||
DC := TGtk3DeviceContext(Context);
|
||||
NColor := LCLObject.Color;
|
||||
if (NColor <> clNone) and (NColor <> clDefault) then
|
||||
begin
|
||||
DC.CurrentBrush.Color := ColorToRGB(NColor);
|
||||
DC.fillRect(0, 0, getContainerWidget^.get_allocated_width, getContainerWidget^.get_allocated_height);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TGtk3GroupBox.ConnectSizeAllocateSignal(ToWidget:PGtkWidget);
|
||||
begin
|
||||
g_signal_connect_data(ToWidget,'size-allocate',TGCallback(@GroupBoxSizeAllocate), Self, nil, G_CONNECT_DEFAULT);
|
||||
|
Loading…
Reference in New Issue
Block a user