mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-24 17:23:44 +02:00
parent
bea78b0370
commit
bfc3350f00
@ -403,9 +403,10 @@ type
|
|||||||
function brush: TQtBrush;
|
function brush: TQtBrush;
|
||||||
procedure setBrush(ABrush: TQtBrush);
|
procedure setBrush(ABrush: TQtBrush);
|
||||||
function BackgroundBrush: TQtBrush;
|
function BackgroundBrush: TQtBrush;
|
||||||
|
function GetBkColor: TColorRef;
|
||||||
function pen: TQtPen;
|
function pen: TQtPen;
|
||||||
function setPen(APen: TQtPen): TQtPen;
|
function setPen(APen: TQtPen): TQtPen;
|
||||||
function SetBkColor(Color: TcolorRef): TColorRef;
|
function SetBkColor(Color: TColorRef): TColorRef;
|
||||||
function SetBkMode(BkMode: Integer): Integer;
|
function SetBkMode(BkMode: Integer): Integer;
|
||||||
function getDepth: integer;
|
function getDepth: integer;
|
||||||
function getDeviceSize: TPoint;
|
function getDeviceSize: TPoint;
|
||||||
@ -2744,6 +2745,16 @@ begin
|
|||||||
result := vBackGroundBrush;
|
result := vBackGroundBrush;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TQtDeviceContext.GetBkColor: TColorRef;
|
||||||
|
var
|
||||||
|
TheBrush: QBrushH;
|
||||||
|
TheColor: TQColor;
|
||||||
|
begin
|
||||||
|
TheBrush := QPainter_background(Widget);
|
||||||
|
TheColor := QBrush_color(TheBrush)^;
|
||||||
|
TQColorToColorRef(TheColor, Result);
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Function: TQtDeviceContext.pen
|
Function: TQtDeviceContext.pen
|
||||||
Params: None
|
Params: None
|
||||||
@ -2824,15 +2835,14 @@ begin
|
|||||||
Result := FClipboard;
|
Result := FClipboard;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtDeviceContext.SetBkColor(Color: TcolorRef): TColorRef;
|
function TQtDeviceContext.SetBkColor(Color: TColorRef): TColorRef;
|
||||||
var
|
var
|
||||||
NColor: TQColor;
|
NColor: TQColor;
|
||||||
begin
|
begin
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
Write('TQtDeviceContext.setBKColor() ');
|
Write('TQtDeviceContext.setBKColor() ');
|
||||||
{$endif}
|
{$endif}
|
||||||
NColor := BackgroundBrush.getColor^;
|
Result := GetBkColor;
|
||||||
TQColorToColorRef(NColor, Result);
|
|
||||||
ColorRefToTQColor(ColorToRGB(Color), NColor);
|
ColorRefToTQColor(ColorToRGB(Color), NColor);
|
||||||
BackgroundBrush.setColor(@NColor);
|
BackgroundBrush.setColor(@NColor);
|
||||||
end;
|
end;
|
||||||
|
@ -1913,6 +1913,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TQtWidgetSet.GetBkColor(DC: HDC): TColorRef;
|
||||||
|
var
|
||||||
|
QtDC: TQtDeviceContext;
|
||||||
|
begin
|
||||||
|
Result := CLR_INVALID;
|
||||||
|
if not IsValidDC(DC) then Exit;
|
||||||
|
QtDC := TQtDeviceContext(DC);
|
||||||
|
Result := QtDC.GetBkColor;
|
||||||
|
end;
|
||||||
|
|
||||||
function TQtWidgetSet.GetCapture: HWND;
|
function TQtWidgetSet.GetCapture: HWND;
|
||||||
var
|
var
|
||||||
w: QWidgetH;
|
w: QWidgetH;
|
||||||
@ -4699,7 +4709,7 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
result := TQtDeviceContext(DC).SetBkColor(Color);
|
Result := TQtDeviceContext(DC).SetBkColor(Color);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
@ -93,6 +93,7 @@ function FrameRect(DC: HDC; const ARect: TRect; hBr: HBRUSH): Integer; override;
|
|||||||
|
|
||||||
function GetActiveWindow : HWND; override;
|
function GetActiveWindow : HWND; override;
|
||||||
function GetBitmapBits(Bitmap: HBITMAP; Count: Longint; Bits: Pointer): Longint; override;
|
function GetBitmapBits(Bitmap: HBITMAP; Count: Longint; Bits: Pointer): Longint; override;
|
||||||
|
function GetBkColor(DC: HDC): TColorRef; override;
|
||||||
function GetCapture: HWND; override;
|
function GetCapture: HWND; override;
|
||||||
function GetCaretPos(var lpPoint: TPoint): Boolean; override;
|
function GetCaretPos(var lpPoint: TPoint): Boolean; override;
|
||||||
function GetCaretRespondToFocus(handle: HWND; var ShowHideOnFocus: boolean): Boolean; override;
|
function GetCaretRespondToFocus(handle: HWND; var ShowHideOnFocus: boolean): Boolean; override;
|
||||||
|
Loading…
Reference in New Issue
Block a user