mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 02:19:57 +02:00
LCL: TLabel: fixed restoring font.color when Enabled=false
git-svn-id: trunk@13097 -
This commit is contained in:
parent
9f4b963fd6
commit
9145ac184d
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<PathDelim Value="\"/>
|
||||
<PathDelim Value="/"/>
|
||||
<Version Value="6"/>
|
||||
<General>
|
||||
<SessionStorage Value="InIDEConfig"/>
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value=".\"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=""/>
|
||||
</General>
|
||||
<PublishOptions>
|
||||
@ -17,16 +17,16 @@
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<CommandLineParams Value="c:\lazarus\source\lazarus\examples\hello.lpi"/>
|
||||
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
|
||||
<CommandLineParams Value="c:/lazarus/source/lazarus/examples/hello.lpi"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
<PackageName Value="SynEdit"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="SynEdit"/>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="3">
|
||||
@ -49,14 +49,13 @@
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="..\lazbuild"/>
|
||||
<Filename Value="../lazbuild"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="include\;include\$(TargetOS)\"/>
|
||||
<OtherUnitFiles Value="..\designer\;..\packager\;..\components\codetools\units\$(TargetCPU)-$(TargetOS)\"/>
|
||||
<UnitOutputDirectory Value="..\units\$(TargetCPU)-$(TargetOS)"/>
|
||||
<IncludeFiles Value="include/;include/$(TargetOS)/"/>
|
||||
<OtherUnitFiles Value="../designer/;../packager/;../components/codetools/units/$(TargetCPU)-$(TargetOS)/"/>
|
||||
<UnitOutputDirectory Value="../units/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
|
@ -403,6 +403,7 @@ var
|
||||
R : TRect;
|
||||
TextLeft, TextTop: integer;
|
||||
LabelText: string;
|
||||
OldFontColor: TColor;
|
||||
begin
|
||||
R := Rect(0,0,Width,Height);
|
||||
with Canvas do
|
||||
@ -456,13 +457,15 @@ begin
|
||||
DoMeasureTextPosition(TextTop, TextLeft);
|
||||
//debugln('TCustomLabel.Paint ',dbgs(Alignment=tacenter),' ',dbgs(Layout=tlCenter),' ',dbgs(TextLeft),' TextTop=',dbgs(TextTop),' ',dbgs(R));
|
||||
LabelText := GetLabelText;
|
||||
OldFontColor := Font.Color;
|
||||
if not Enabled then
|
||||
begin
|
||||
Font.Color := clBtnHighlight;
|
||||
TextRect(R, TextLeft + 1, TextTop + 1, LabelText, TR);
|
||||
Font.color := clBtnShadow;
|
||||
Font.Color := clBtnShadow;
|
||||
end;
|
||||
TextRect(R, TextLeft, TextTop, LabelText, TR)
|
||||
TextRect(R, TextLeft, TextTop, LabelText, TR);
|
||||
Font.Color := OldFontColor;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user