ide: add small border for TSimpleHTMLControl

git-svn-id: trunk@19513 -
This commit is contained in:
paul 2009-04-19 13:24:34 +00:00
parent b4435027f4
commit 884e566a1e
3 changed files with 45 additions and 121 deletions

View File

@ -3,17 +3,9 @@ object HelpSelectorDialog: THelpSelectorDialog
Height = 283
Top = 414
Width = 500
HelpContext = 0
Caption = 'HelpSelectorDialog'
ChildSizing.LeftRightSpacing = 0
ChildSizing.TopBottomSpacing = 0
ChildSizing.HorizontalSpacing = 0
ChildSizing.VerticalSpacing = 0
ChildSizing.ControlsPerLine = 0
ClientHeight = 283
ClientWidth = 500
Font.Height = 0
Font.Style = []
OnClose = HelpSelectorDialogClose
Position = poScreenCenter
LCLVersion = '0.9.27'
@ -23,47 +15,22 @@ object HelpSelectorDialog: THelpSelectorDialog
Height = 233
Top = 6
Width = 488
HelpContext = 0
Align = alClient
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = 'NodesGroupBox'
ChildSizing.LeftRightSpacing = 0
ChildSizing.TopBottomSpacing = 0
ChildSizing.HorizontalSpacing = 0
ChildSizing.VerticalSpacing = 0
ChildSizing.ControlsPerLine = 0
ClientHeight = 215
ClientWidth = 484
Ctl3D = False
TabOrder = 0
object NodesListBox: TListBox
Left = 6
Height = 203
Top = 6
Width = 472
HelpContext = 0
Align = alClient
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
IntegralHeight = False
ItemHeight = 0
MultiSelect = False
OnDblClick = NodesListBoxDblClick
Sorted = False
Style = lbStandard
TabOrder = 0
TopIndex = 0
end
end
object BtnPanel: TPanel
@ -71,22 +38,9 @@ object HelpSelectorDialog: THelpSelectorDialog
Height = 38
Top = 245
Width = 500
HelpContext = 0
Align = alBottom
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 0
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
BevelOuter = bvNone
ChildSizing.LeftRightSpacing = 0
ChildSizing.TopBottomSpacing = 0
ChildSizing.HorizontalSpacing = 0
ChildSizing.VerticalSpacing = 0
ChildSizing.ControlsPerLine = 0
ClientHeight = 38
ClientWidth = 500
TabOrder = 1
@ -100,16 +54,9 @@ object HelpSelectorDialog: THelpSelectorDialog
Height = 26
Top = 6
Width = 75
HelpContext = 0
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = '&OK'
Constraints.MinWidth = 75
Default = True
@ -129,16 +76,9 @@ object HelpSelectorDialog: THelpSelectorDialog
Height = 26
Top = 6
Width = 77
HelpContext = 0
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = 'Cancel'
Constraints.MinWidth = 75
Kind = bkCancel

View File

@ -2,56 +2,31 @@
LazarusResources.Add('THelpSelectorDialog','FORMDATA',[
'TPF0'#19'THelpSelectorDialog'#18'HelpSelectorDialog'#4'Left'#3'H'#1#6'Height'
+#3#27#1#3'Top'#3#158#1#5'Width'#3#244#1#11'HelpContext'#2#0#7'Caption'#6#18
+'HelpSelectorDialog'#28'ChildSizing.LeftRightSpacing'#2#0#28'ChildSizing.Top'
+'BottomSpacing'#2#0#29'ChildSizing.HorizontalSpacing'#2#0#27'ChildSizing.Ver'
+'ticalSpacing'#2#0#27'ChildSizing.ControlsPerLine'#2#0#12'ClientHeight'#3#27
+#1#11'ClientWidth'#3#244#1#11'Font.Height'#2#0#10'Font.Style'#11#0#7'OnClose'
+#7#23'HelpSelectorDialogClose'#8'Position'#7#14'poScreenCenter'#10'LCLVersio'
+'n'#6#6'0.9.27'#0#9'TGroupBox'#13'NodesGroupBox'#24'AnchorSideBottom.Control'
+#7#12'CancelButton'#4'Left'#2#6#6'Height'#3#233#0#3'Top'#2#6#5'Width'#3#232#1
+#11'HelpContext'#2#0#5'Align'#7#8'alClient'#18'BorderSpacing.Left'#2#0#17'Bo'
+'rderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2
+#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaF'
+'ill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#13'Nodes'
+'GroupBox'#28'ChildSizing.LeftRightSpacing'#2#0#28'ChildSizing.TopBottomSpac'
+'ing'#2#0#29'ChildSizing.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSpaci'
+'ng'#2#0#27'ChildSizing.ControlsPerLine'#2#0#12'ClientHeight'#3#215#0#11'Cli'
+'entWidth'#3#228#1#5'Ctl3D'#8#8'TabOrder'#2#0#0#8'TListBox'#12'NodesListBox'
+#4'Left'#2#6#6'Height'#3#203#0#3'Top'#2#6#5'Width'#3#216#1#11'HelpContext'#2
+#0#5'Align'#7#8'alClient'#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2
+#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing'
+'.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpac'
+'ing.CellAlignVertical'#7#7'ccaFill'#14'IntegralHeight'#8#10'ItemHeight'#2#0
+#11'MultiSelect'#8#10'OnDblClick'#7#20'NodesListBoxDblClick'#6'Sorted'#8#5'S'
+'tyle'#7#10'lbStandard'#8'TabOrder'#2#0#8'TopIndex'#2#0#0#0#0#6'TPanel'#8'Bt'
+'nPanel'#4'Left'#2#0#6'Height'#2'&'#3'Top'#3#245#0#5'Width'#3#244#1#11'HelpC'
+'ontext'#2#0#5'Align'#7#8'alBottom'#8'AutoSize'#9#18'BorderSpacing.Left'#2#0
+#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bott'
+'om'#2#0#20'BorderSpacing.Around'#2#0'!BorderSpacing.CellAlignHorizontal'#7#7
+'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#10'BevelOuter'#7#6
+'bvNone'#28'ChildSizing.LeftRightSpacing'#2#0#28'ChildSizing.TopBottomSpacin'
+'g'#2#0#29'ChildSizing.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSpacing'
+#2#0#27'ChildSizing.ControlsPerLine'#2#0#12'ClientHeight'#2'&'#11'ClientWidt'
+'h'#3#244#1#8'TabOrder'#2#1#0#7'TBitBtn'#8'OKButton'#21'AnchorSideTop.Contro'
+'l'#7#8'BtnPanel'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.C'
+'ontrol'#7#12'CancelButton'#24'AnchorSideBottom.Control'#7#8'BtnPanel'#21'An'
+'chorSideBottom.Side'#7#9'asrBottom'#4'Left'#3'P'#1#6'Height'#2#26#3'Top'#2#6
+#5'Width'#2'K'#11'HelpContext'#2#0#7'Anchors'#11#7'akRight'#8'akBottom'#0#8
+'AutoSize'#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderS'
+'pacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6
+'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlign'
+'Vertical'#7#7'ccaFill'#7'Caption'#6#3'&OK'#20'Constraints.MinWidth'#2'K'#7
+'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOrde'
+'r'#2#0#0#0#7'TBitBtn'#12'CancelButton'#21'AnchorSideTop.Control'#7#8'BtnPan'
+'el'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#8'B'
+'tnPanel'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Contro'
+'l'#7#8'BtnPanel'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#161#1#6
+'Height'#2#26#3'Top'#2#6#5'Width'#2'M'#11'HelpContext'#2#0#7'Anchors'#11#7'a'
+'kRight'#8'akBottom'#0#8'AutoSize'#9#18'BorderSpacing.Left'#2#0#17'BorderSpa'
+'cing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'B'
+'orderSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31
+'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#6'Cancel'#20'Con'
+'straints.MinWidth'#2'K'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'NumGlyp'
+'hs'#2#0#8'TabOrder'#2#1#0#0#0#0
+#3#27#1#3'Top'#3#158#1#5'Width'#3#244#1#7'Caption'#6#18'HelpSelectorDialog'
+#12'ClientHeight'#3#27#1#11'ClientWidth'#3#244#1#7'OnClose'#7#23'HelpSelecto'
+'rDialogClose'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.27'#0
+#9'TGroupBox'#13'NodesGroupBox'#24'AnchorSideBottom.Control'#7#12'CancelButt'
+'on'#4'Left'#2#6#6'Height'#3#233#0#3'Top'#2#6#5'Width'#3#232#1#5'Align'#7#8
+'alClient'#20'BorderSpacing.Around'#2#6#7'Caption'#6#13'NodesGroupBox'#12'Cl'
+'ientHeight'#3#215#0#11'ClientWidth'#3#228#1#8'TabOrder'#2#0#0#8'TListBox'#12
+'NodesListBox'#4'Left'#2#6#6'Height'#3#203#0#3'Top'#2#6#5'Width'#3#216#1#5'A'
+'lign'#7#8'alClient'#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0#10'OnDb'
+'lClick'#7#20'NodesListBoxDblClick'#8'TabOrder'#2#0#0#0#0#6'TPanel'#8'BtnPan'
+'el'#4'Left'#2#0#6'Height'#2'&'#3'Top'#3#245#0#5'Width'#3#244#1#5'Align'#7#8
+'alBottom'#8'AutoSize'#9#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2'&'#11
+'ClientWidth'#3#244#1#8'TabOrder'#2#1#0#7'TBitBtn'#8'OKButton'#21'AnchorSide'
+'Top.Control'#7#8'BtnPanel'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorS'
+'ideRight.Control'#7#12'CancelButton'#24'AnchorSideBottom.Control'#7#8'BtnPa'
+'nel'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3'P'#1#6'Height'#2#26
+#3'Top'#2#6#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'
+#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#3'&OK'#20'Constraints.MinWidth'
+#2'K'#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8
+'TabOrder'#2#0#0#0#7'TBitBtn'#12'CancelButton'#21'AnchorSideTop.Control'#7#8
+'BtnPanel'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Control'
+#7#8'BtnPanel'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.C'
+'ontrol'#7#8'BtnPanel'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#161
+#1#6'Height'#2#26#3'Top'#2#6#5'Width'#2'M'#7'Anchors'#11#7'akRight'#8'akBott'
+'om'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#6'Cancel'#20
+'Constraints.MinWidth'#2'K'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'NumG'
+'lyphs'#2#0#8'TabOrder'#2#1#0#0#0#0
]);

View File

@ -35,7 +35,7 @@ interface
uses
// FCL+LCL
Classes, SysUtils, AVL_Tree, LCLProc, LCLIntf, LCLType, Forms, Controls, Buttons,
StdCtrls, Dialogs, ExtCtrls, LResources, FileUtil,
StdCtrls, Dialogs, ExtCtrls, LResources, FileUtil, Graphics,
// CodeTools
BasicCodeTools, CodeToolManager, CodeAtom, CodeCache, CustomCodeTool, CodeTree,
PascalParserTool, FindDeclarationTool,
@ -316,6 +316,8 @@ constructor TSimpleHTMLControl.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
WordWrap := True;
Layout := tlCenter;
Alignment := taCenter;
end;
function TSimpleHTMLControl.GetURL: string;
@ -377,8 +379,8 @@ begin
LabelText := GetLabelText;
DrawText(DC, PChar(LabelText), Length(LabelText), R, Flags);
SelectObject(DC, OldFont);
AWidth := R.Right - R.Left;
AHeight := R.Bottom - R.Top;
AWidth := R.Right - R.Left + 8; // border
AHeight := R.Bottom - R.Top + 8; // border
finally
ReleaseDC(Parent.Handle, DC);
end;
@ -1285,12 +1287,19 @@ begin
ms.Free;
end;
Provider.ControlIntf.GetPreferredControlSize(NewWidth,NewHeight);
if NewWidth<=0 then
NewWidth:=500;
if NewHeight<=0 then
NewHeight:=200;
HintWinRect := Rect(0,0,NewWidth,NewHeight);
TheHint:='';
if NewWidth <= 0 then
NewWidth := 500
else
inc(NewWidth, 8); // border
if NewHeight <= 0 then
NewHeight := 200
else
inc(NewHeight, 8); // border
HintWinRect := Rect(0, 0, NewWidth, NewHeight);
TheHint := '';
end else begin
HintWinRect := aHintWindow.CalcHintRect(Screen.Width, TheHint, nil);
end;