aesthetical improvements for colorbuttons from Luca Minuti

git-svn-id: trunk@7061 -
This commit is contained in:
mattias 2005-04-06 10:39:36 +00:00
parent 6697af3196
commit 5ab09c1d2d
4 changed files with 16 additions and 10 deletions

View File

@ -25,7 +25,7 @@
<UsageCount Value="41"/> <UsageCount Value="41"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<CursorPos X="16" Y="175"/> <CursorPos X="20" Y="185"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<ComponentName Value="Form1"/> <ComponentName Value="Form1"/>

View File

@ -2918,7 +2918,7 @@ begin
Left:=5; Left:=5;
Top:=2; Top:=2;
Width:= HalfWidth-15; Width:= HalfWidth-15;
Height:=180; Height:=200;
end; end;
with OIMiscGroupBox do begin with OIMiscGroupBox do begin
@ -3902,17 +3902,17 @@ begin
Left:=5; Left:=5;
Top:=2; Top:=2;
Width:= HalfWidth-15; Width:= HalfWidth-15;
Height:=180; Height:=200;
Parent:=NoteBook.Page[Page]; Parent:=NoteBook.Page[Page];
Caption:=dlgEnvColors; Caption:=dlgEnvColors;
end; end;
OIBackgroundColorButton:=CreateColorItem(5, ObjectInspectorColorsGroupBox, dlgBackColor); OIBackgroundColorButton:=CreateColorItem(5, ObjectInspectorColorsGroupBox, dlgBackColor);
OISubPropsColorButton:=CreateColorItem(30, ObjectInspectorColorsGroupBox, dlgSubPropkColor); OISubPropsColorButton:=CreateColorItem(32, ObjectInspectorColorsGroupBox, dlgSubPropkColor);
OIReferencesColorButton:=CreateColorItem(55, ObjectInspectorColorsGroupBox, dlgReferenceColor); OIReferencesColorButton:=CreateColorItem(59, ObjectInspectorColorsGroupBox, dlgReferenceColor);
OIValueColorButton:=CreateColorItem(80, ObjectInspectorColorsGroupBox, dlgValueColor); OIValueColorButton:=CreateColorItem(86, ObjectInspectorColorsGroupBox, dlgValueColor);
OIDefaultValueColorButton:=CreateColorItem(105, ObjectInspectorColorsGroupBox, dlgDefValueColor); OIDefaultValueColorButton:=CreateColorItem(113, ObjectInspectorColorsGroupBox, dlgDefValueColor);
OIPropNameColorButton:=CreateColorItem(130, ObjectInspectorColorsGroupBox, dlgPropNameColor); OIPropNameColorButton:=CreateColorItem(140, ObjectInspectorColorsGroupBox, dlgPropNameColor);
OIMiscGroupBox:=TGroupBox.Create(Self); OIMiscGroupBox:=TGroupBox.Create(Self);
with OIMiscGroupBox do begin with OIMiscGroupBox do begin

View File

@ -40,8 +40,11 @@ begin
with Canvas do begin with Canvas do begin
Frame3d(ARect,FBorderWidth,bvRaised); Frame3d(ARect,FBorderWidth,bvRaised);
//debugln('TColorButton.Paint A ',dbgs(ARect)); //debugln('TColorButton.Paint A ',dbgs(ARect));
InflateRect(ARect,-FBorderWidth,-FBorderWidth); InflateRect(ARect,-FBorderWidth-2,-FBorderWidth-2);
//debugln('TColorButton.Paint B ',dbgs(ARect)); //debugln('TColorButton.Paint B ',dbgs(ARect));
Brush.Color:=clBlack;
FillRect(ARect);
InflateRect(ARect,-1,-1);
Brush.Color:=ButtonColor; Brush.Color:=ButtonColor;
FillRect(ARect); FillRect(ARect);
end; end;

View File

@ -1265,7 +1265,7 @@ End;
Function TWin32WidgetSet.Frame3D(DC: HDC; var Rect: TRect; Function TWin32WidgetSet.Frame3D(DC: HDC; var Rect: TRect;
Const FrameWidth: Integer; Const Style: TBevelCut): Boolean; Const FrameWidth: Integer; Const Style: TBevelCut): Boolean;
Const Const
Edge: Array[TBevelCut] Of Integer = (0, BDR_SUNKENOUTER, BDR_RAISEDOUTER, 0); Edge: Array[TBevelCut] Of Integer = (0, BDR_SUNKENOUTER, BDR_RAISEDINNER, 0);
Begin Begin
Result := Boolean(DrawEdge(DC, Rect, Edge[Style], BF_RECT)); Result := Boolean(DrawEdge(DC, Rect, Edge[Style], BF_RECT));
End; End;
@ -3120,6 +3120,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.142 2005/04/06 10:39:36 mattias
aesthetical improvements for colorbuttons from Luca Minuti
Revision 1.141 2005/03/25 16:59:38 micha Revision 1.141 2005/03/25 16:59:38 micha
fix dc origin to take window origin into account (fixed drawing invisible components on graphiccontrols in designer) fix dc origin to take window origin into account (fixed drawing invisible components on graphiccontrols in designer)