You've already forked lazarus-ccr
SpkToolbar: Add new pane property "Style". Update appearance editor. Minor refactoring of pane drawing code.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5350 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -9,8 +9,10 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
Color = clBtnFace
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
OnCloseQuery = FormCloseQuery
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
ShowHint = True
|
||||
LCLVersion = '1.7'
|
||||
object gbPreview: TGroupBox
|
||||
Left = 0
|
||||
@ -319,14 +321,14 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
Height = 347
|
||||
Top = 132
|
||||
Width = 536
|
||||
ActivePage = TabSheet3
|
||||
ActivePage = TabSheet2
|
||||
Align = alClient
|
||||
TabIndex = 2
|
||||
TabIndex = 1
|
||||
TabOrder = 1
|
||||
object TabSheet1: TTabSheet
|
||||
Caption = 'Tab'
|
||||
ClientHeight = 326
|
||||
ClientWidth = 549
|
||||
ClientHeight = 319
|
||||
ClientWidth = 528
|
||||
object Label2: TLabel
|
||||
AnchorSideTop.Control = pTabFrame
|
||||
AnchorSideTop.Side = asrCenter
|
||||
@ -677,6 +679,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
Width = 137
|
||||
BorderSpacing.Left = 12
|
||||
BorderSpacing.Top = 4
|
||||
Visible = False
|
||||
end
|
||||
object pPaneBorderDark: TPanel
|
||||
AnchorSideLeft.Control = cbLinkPane
|
||||
@ -821,6 +824,46 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
OnClick = cbLinkPaneClick
|
||||
TabOrder = 8
|
||||
end
|
||||
object cbPaneStyle: TComboBox
|
||||
AnchorSideLeft.Control = pPaneCaptionFont
|
||||
AnchorSideTop.Control = pPaneCaptionFont
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = pPaneCaptionFontColor
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 141
|
||||
Height = 23
|
||||
Top = 265
|
||||
Width = 121
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 15
|
||||
ItemIndex = 1
|
||||
Items.Strings = (
|
||||
'Rectangle flat'
|
||||
'Rectangle etched'
|
||||
'Rectangle raised'
|
||||
'Divider flat'
|
||||
'Divider etched'
|
||||
'Divider raised'
|
||||
)
|
||||
OnChange = cbPaneStyleChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 9
|
||||
Text = 'Rectangle etched'
|
||||
end
|
||||
object Label12: TLabel
|
||||
AnchorSideTop.Control = cbPaneStyle
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = LblCaptionBackground
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 68
|
||||
Height = 15
|
||||
Top = 269
|
||||
Width = 53
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Pane style'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object TabSheet3: TTabSheet
|
||||
Caption = 'Item'
|
||||
|
@ -16,7 +16,9 @@ type
|
||||
{ TfrmAppearanceEditWindow }
|
||||
|
||||
TfrmAppearanceEditWindow = class(TForm)
|
||||
cbPaneStyle: TComboBox;
|
||||
gbPreview: TGroupBox;
|
||||
Label12: TLabel;
|
||||
SmallImages: TImageList;
|
||||
LargeImages: TImageList;
|
||||
Label18: TLabel;
|
||||
@ -128,9 +130,11 @@ type
|
||||
procedure cbItemActiveGradientKindChange(Sender: TObject);
|
||||
procedure cbItemHottrackGradientKindChange(Sender: TObject);
|
||||
procedure cbItemIdleGradientKindChange(Sender: TObject);
|
||||
procedure cbTabGradientKindChange(Sender: TObject);
|
||||
procedure cbPaneGradientKindChange(Sender: TObject);
|
||||
procedure cbPaneStyleChange(Sender: TObject);
|
||||
procedure cbTabGradientKindChange(Sender: TObject);
|
||||
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
|
||||
@ -207,6 +211,9 @@ implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
var
|
||||
CurrPageIndex: Integer = 0;
|
||||
|
||||
{ TForm3 }
|
||||
|
||||
procedure TfrmAppearanceEditWindow.SetAppearance(const Value: TSpkToolbarAppearance);
|
||||
@ -362,6 +369,12 @@ begin
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
procedure TfrmAppearanceEditWindow.FormCloseQuery(Sender: TObject;
|
||||
var CanClose: boolean);
|
||||
begin
|
||||
if CanClose then CurrPageIndex := PageControl1.PageIndex;
|
||||
end;
|
||||
|
||||
procedure TfrmAppearanceEditWindow.FormCreate(Sender: TObject);
|
||||
begin
|
||||
bOK.AutoSize := false;
|
||||
@ -369,6 +382,8 @@ begin
|
||||
|
||||
LargeImages.AddIcon(Application.Icon);
|
||||
SmallImages.AddIcon(Application.Icon);
|
||||
|
||||
PageControl1.PageIndex := CurrPageIndex;
|
||||
end;
|
||||
|
||||
procedure TfrmAppearanceEditWindow.FormShow(Sender: TObject);
|
||||
@ -406,6 +421,7 @@ begin
|
||||
SetPanelColor(pPaneCaptionBackground, CaptionBgColor);
|
||||
SetPanelFont(pPaneCaptionFont, CaptionFont);
|
||||
SetPanelColor(pPaneCaptionFontColor, CaptionFont.Color);
|
||||
cbPaneStyle.ItemIndex := ord(Style);
|
||||
end;
|
||||
|
||||
with Element do
|
||||
@ -671,6 +687,12 @@ begin
|
||||
SetLinkedGradientKind((Sender as TComboBox).ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TfrmAppearanceEditWindow.cbPaneStyleChange(Sender: TObject);
|
||||
begin
|
||||
with tbPreview.Appearance.Pane do
|
||||
Style := TSpkPaneStyle((Sender as TCombobox).ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TfrmAppearanceEditWindow.pPaneGradientToClick(Sender: TObject);
|
||||
begin
|
||||
if ChangeColor(Sender as TPanel) then
|
||||
|
Reference in New Issue
Block a user