You've already forked lazarus-ccr
RxFPC:fix compile in lazarus 1.8
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6189 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -56,7 +56,7 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="Unit1"/>
|
<UnitName Value="Unit1"/>
|
||||||
<TopLine Value="57"/>
|
<TopLine Value="57"/>
|
||||||
<CursorPos X="14" Y="62"/>
|
<CursorPos X="23" Y="74"/>
|
||||||
<UsageCount Value="24"/>
|
<UsageCount Value="24"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -125,8 +125,8 @@
|
|||||||
<Filename Value="../../rxdb/rxlookup.pas"/>
|
<Filename Value="../../rxdb/rxlookup.pas"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="1552"/>
|
<TopLine Value="1533"/>
|
||||||
<CursorPos Y="1566"/>
|
<CursorPos X="33" Y="1520"/>
|
||||||
<UsageCount Value="11"/>
|
<UsageCount Value="11"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit10>
|
</Unit10>
|
||||||
|
@ -1519,7 +1519,7 @@ end;
|
|||||||
|
|
||||||
procedure TRxCustomDBLookupCombo.Paint;
|
procedure TRxCustomDBLookupCombo.Paint;
|
||||||
const
|
const
|
||||||
padding {: Integer} = 1;
|
padding = 1;
|
||||||
var
|
var
|
||||||
Selected:boolean;
|
Selected:boolean;
|
||||||
R, R1, R2: TRect;
|
R, R1, R2: TRect;
|
||||||
@ -1539,7 +1539,11 @@ begin
|
|||||||
|
|
||||||
if Enabled then
|
if Enabled then
|
||||||
begin
|
begin
|
||||||
|
{$IF lcl_fullversion >= 1090000}
|
||||||
if MouseInClient then
|
if MouseInClient then
|
||||||
|
{$ELSE}
|
||||||
|
if MouseEntered then
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
if FMouseDown then
|
if FMouseDown then
|
||||||
begin
|
begin
|
||||||
@ -1659,147 +1663,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(*const
|
|
||||||
padding : Integer = 1;
|
|
||||||
var
|
|
||||||
Selected:boolean;
|
|
||||||
R, R1, R2: TRect;
|
|
||||||
AText: string;
|
|
||||||
border : Integer;
|
|
||||||
Details, DetailsBtn: TThemedElementDetails;
|
|
||||||
BtnSize: TSize;
|
|
||||||
pr: PRect;
|
|
||||||
begin
|
|
||||||
R := Rect(0, 0, ClientWidth, ClientHeight);
|
|
||||||
if ThemeServices.ThemesEnabled and (FStyle = rxcsDropDownList) then
|
|
||||||
begin
|
|
||||||
if Enabled then
|
|
||||||
begin
|
|
||||||
{$IF lcl_fullversion >= 1090000}
|
|
||||||
if MouseInClient then
|
|
||||||
{$ELSE}
|
|
||||||
if MouseEntered then
|
|
||||||
{$ENDIF}
|
|
||||||
begin
|
|
||||||
if FMouseDown then
|
|
||||||
begin
|
|
||||||
Details := ThemeServices.GetElementDetails(tbPushButtonPressed);
|
|
||||||
DetailsBtn := ThemeServices.GetElementDetails(tcDropDownButtonPressed);
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
Details := ThemeServices.GetElementDetails(tbPushButtonHot);
|
|
||||||
DetailsBtn := ThemeServices.GetElementDetails(tcDropDownButtonHot);
|
|
||||||
end;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
Details := ThemeServices.GetElementDetails(tbPushButtonNormal);
|
|
||||||
DetailsBtn := ThemeServices.GetElementDetails(tcDropDownButtonNormal);
|
|
||||||
end;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
Details := ThemeServices.GetElementDetails(tbPushButtonDisabled);
|
|
||||||
DetailsBtn := ThemeServices.GetElementDetails(tcDropDownButtonDisabled);
|
|
||||||
end;
|
|
||||||
ThemeServices.DrawElement(Canvas.Handle, Details, R, nil);
|
|
||||||
|
|
||||||
|
|
||||||
//BtnSize:=ThemeServices.GetDetailSize(DetailsBtn);
|
|
||||||
BtnSize.Width:=20;
|
|
||||||
// adjust this for each OS, on windows looks fine
|
|
||||||
R1 := Rect(ClientWidth - BtnSize.Width, 1, ClientWidth, ClientHeight - 1);
|
|
||||||
R2 := Rect(r1.Left+1, r1.Top+1, r1.Right-2, r1.Bottom-1);
|
|
||||||
pr := @R2;
|
|
||||||
ThemeServices.DrawElement(Canvas.Handle, DetailsBtn, R1, pr);
|
|
||||||
|
|
||||||
R.Right:=R.Right - BtnSize.Width;
|
|
||||||
|
|
||||||
if FDisplayAll then
|
|
||||||
PaintDisplayValues(Canvas, R, TextMargin, @Details)
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
if Assigned(FDataField) and FDataField.IsNull then
|
|
||||||
AText:=FEmptyValue
|
|
||||||
else
|
|
||||||
if FValuesList.Count > 0 then
|
|
||||||
AText:=FValuesList[FLookupDisplayIndex]
|
|
||||||
else
|
|
||||||
AText:='';
|
|
||||||
R.Left:=R.Left + TextMargin;
|
|
||||||
ThemeServices.DrawText(Canvas, Details, AText, R, DT_LEFT or DT_VCENTER or DT_SINGLELINE, 0);
|
|
||||||
end;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
Canvas.Font := Font;
|
|
||||||
Canvas.Brush.Color := Color;
|
|
||||||
Selected := Focused and (not (csPaintCopy in ControlState)) and (not PopupVisible);
|
|
||||||
if Selected then
|
|
||||||
begin
|
|
||||||
Canvas.Font.Color := clHighlightText;
|
|
||||||
Canvas.Brush.Color := clHighlight;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if not Enabled {and NewStyleControls }then
|
|
||||||
begin
|
|
||||||
Canvas.Font.Color := clInactiveCaption;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if BorderStyle = bsNone then
|
|
||||||
begin
|
|
||||||
border := 3;
|
|
||||||
if Flat then
|
|
||||||
begin
|
|
||||||
Canvas.Frame3d(R, border, bvLowered);
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
RxFrame3D(Canvas, R, clWindowFrame, clBtnHighlight, 1);
|
|
||||||
RxFrame3D(Canvas, R, clBtnShadow, clBtnFace, 1);
|
|
||||||
end;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
border := 1;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if ClientWidth > 2*border then
|
|
||||||
begin
|
|
||||||
R1 := Rect(border, border, ClientWidth - border, ClientHeight - border);
|
|
||||||
Canvas.FillRect(R1);
|
|
||||||
R.Right := R.Right - GetButtonWidth;
|
|
||||||
if PopupVisible and (Caption<>'') then
|
|
||||||
begin
|
|
||||||
AText := Caption;
|
|
||||||
Canvas.TextRect(R, TextMargin, Max(0, (HeightOf(R) - Canvas.TextHeight('Wg')) div 2), AText);
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if FDisplayAll then
|
|
||||||
PaintDisplayValues(Canvas, R, TextMargin, nil)
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
if Assigned(FDataField) and FDataField.IsNull then
|
|
||||||
begin
|
|
||||||
R1 := Rect(border + padding, border + padding, ClientWidth - (border + padding) - GetButtonWidth, ClientHeight - (border + padding));
|
|
||||||
Canvas.Brush.Color:=FEmptyItemColor;
|
|
||||||
Canvas.FillRect(R1);
|
|
||||||
AText:=FEmptyValue
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if FValuesList.Count > 0 then
|
|
||||||
AText:=FValuesList[FLookupDisplayIndex]
|
|
||||||
else
|
|
||||||
AText:='';
|
|
||||||
Canvas.TextRect(R, TextMargin, Max(0, (HeightOf(R) - Canvas.TextHeight('Wg')) div 2), AText);
|
|
||||||
end
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
*)
|
|
||||||
|
|
||||||
|
|
||||||
procedure TRxCustomDBLookupCombo.LookupDataSetChanged(Sender: TObject);
|
procedure TRxCustomDBLookupCombo.LookupDataSetChanged(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if PopupVisible then
|
if PopupVisible then
|
||||||
|
Reference in New Issue
Block a user