mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 00:37:14 +01:00
ide: paint text on restricted page with clear brush to prevent filling themed bg with solid color
git-svn-id: trunk@14947 -
This commit is contained in:
parent
a64c31fd1b
commit
22a852a20c
@ -3880,11 +3880,14 @@ var
|
|||||||
S: TSize;
|
S: TSize;
|
||||||
Platform: TLCLPlatform;
|
Platform: TLCLPlatform;
|
||||||
None: Boolean;
|
None: Boolean;
|
||||||
|
OldStyle: TBrushStyle;
|
||||||
begin
|
begin
|
||||||
if RestrictedProps = nil then Exit;
|
if RestrictedProps = nil then Exit;
|
||||||
|
|
||||||
X := 0;
|
X := 0;
|
||||||
Y := (WidgetSetsRestrictedBox.Height - IDEImages.Images_16.Height) div 2;
|
Y := (WidgetSetsRestrictedBox.Height - IDEImages.Images_16.Height) div 2;
|
||||||
|
OldStyle := WidgetSetsRestrictedBox.Canvas.Brush.Style;
|
||||||
|
WidgetSetsRestrictedBox.Canvas.Brush.Style := bsClear;
|
||||||
None := True;
|
None := True;
|
||||||
for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do
|
for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do
|
||||||
begin
|
begin
|
||||||
@ -3907,6 +3910,7 @@ begin
|
|||||||
S := WidgetSetsRestrictedBox.Canvas.TextExtent(oisNone);
|
S := WidgetSetsRestrictedBox.Canvas.TextExtent(oisNone);
|
||||||
WidgetSetsRestrictedBox.Canvas.TextOut(4, (WidgetSetsRestrictedBox.Height - S.CY) div 2, oisNone);
|
WidgetSetsRestrictedBox.Canvas.TextOut(4, (WidgetSetsRestrictedBox.Height - S.CY) div 2, oisNone);
|
||||||
end;
|
end;
|
||||||
|
WidgetSetsRestrictedBox.Canvas.Brush.Style := OldStyle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TObjectInspectorDlg.ComponentRestrictedPaint(Sender: TObject);
|
procedure TObjectInspectorDlg.ComponentRestrictedPaint(Sender: TObject);
|
||||||
@ -3916,12 +3920,16 @@ var
|
|||||||
Platform: TLCLPlatform;
|
Platform: TLCLPlatform;
|
||||||
WidgetSetRestrictions: Array [TLCLPlatform] of Integer;
|
WidgetSetRestrictions: Array [TLCLPlatform] of Integer;
|
||||||
None: Boolean;
|
None: Boolean;
|
||||||
|
OldStyle: TBrushStyle;
|
||||||
begin
|
begin
|
||||||
for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do WidgetSetRestrictions[Platform] := 0;
|
for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do WidgetSetRestrictions[Platform] := 0;
|
||||||
|
|
||||||
if RestrictedProps = nil then Exit;
|
if RestrictedProps = nil then Exit;
|
||||||
if Selection = nil then Exit;
|
if Selection = nil then Exit;
|
||||||
|
|
||||||
|
OldStyle := ComponentRestrictedBox.Canvas.Brush.Style;
|
||||||
|
ComponentRestrictedBox.Canvas.Brush.Style := bsClear;
|
||||||
|
|
||||||
for I := 0 to RestrictedProps.Count - 1 do
|
for I := 0 to RestrictedProps.Count - 1 do
|
||||||
begin
|
begin
|
||||||
for J := 0 to Selection.Count - 1 do
|
for J := 0 to Selection.Count - 1 do
|
||||||
@ -3959,6 +3967,7 @@ begin
|
|||||||
S := ComponentRestrictedBox.Canvas.TextExtent(oisNone);
|
S := ComponentRestrictedBox.Canvas.TextExtent(oisNone);
|
||||||
ComponentRestrictedBox.Canvas.TextOut(4, (ComponentRestrictedBox.Height - S.CY) div 2, oisNone);
|
ComponentRestrictedBox.Canvas.TextOut(4, (ComponentRestrictedBox.Height - S.CY) div 2, oisNone);
|
||||||
end;
|
end;
|
||||||
|
ComponentRestrictedBox.Canvas.Brush.Style := OldStyle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TObjectInspectorDlg.CreateSplitter;
|
procedure TObjectInspectorDlg.CreateSplitter;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user