You've already forked lazarus-ccr
spktoolbar: Add Appearance property Tab.CornerRadius (https://forum.lazarus.freepascal.org/index.php/topic,47375.msg339191)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7183 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -13,7 +13,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
ShowHint = True
|
||||
LCLVersion = '1.6.4.0'
|
||||
LCLVersion = '2.1.0.0'
|
||||
object gbPreview: TGroupBox
|
||||
Left = 0
|
||||
Height = 132
|
||||
@ -27,6 +27,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
TabOrder = 0
|
||||
object tbPreview: TSpkToolbar
|
||||
Left = 0
|
||||
Height = 112
|
||||
Top = 0
|
||||
Width = 548
|
||||
Color = clBtnFace
|
||||
@ -125,8 +126,6 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
CustomAppearance.Element.ActiveCaptionColor = 8405614
|
||||
CustomAppearance.Element.Style = esRounded
|
||||
Caption = 'Sample toolbar'
|
||||
OverrideAppearance = False
|
||||
Visible = True
|
||||
Panes = (
|
||||
'SpkPane1'
|
||||
'SpkPane2'
|
||||
@ -134,29 +133,21 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
)
|
||||
object SpkPane1: TSpkPane
|
||||
Caption = 'Sample large buttons'
|
||||
Visible = True
|
||||
Items = (
|
||||
'SpkLargeButton1'
|
||||
'SpkLargeButton3'
|
||||
'SpkLargeButton2'
|
||||
)
|
||||
object SpkLargeButton1: TSpkLargeButton
|
||||
Visible = True
|
||||
Enabled = True
|
||||
Caption = 'Default'
|
||||
LargeImageIndex = 0
|
||||
ButtonKind = bkButton
|
||||
end
|
||||
object SpkLargeButton3: TSpkLargeButton
|
||||
Visible = True
|
||||
Enabled = True
|
||||
Caption = 'Button and dropdown'
|
||||
LargeImageIndex = 0
|
||||
ButtonKind = bkButtonDropdown
|
||||
end
|
||||
object SpkLargeButton2: TSpkLargeButton
|
||||
Visible = True
|
||||
Enabled = True
|
||||
Caption = 'Dropdown'
|
||||
LargeImageIndex = 0
|
||||
ButtonKind = bkDropdown
|
||||
@ -164,49 +155,34 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
end
|
||||
object SpkPane2: TSpkPane
|
||||
Caption = 'Sample small buttons'
|
||||
Visible = True
|
||||
Items = (
|
||||
'SpkSmallButton1'
|
||||
'SpkSmallButton2'
|
||||
'SpkSmallButton3'
|
||||
)
|
||||
object SpkSmallButton1: TSpkSmallButton
|
||||
Visible = True
|
||||
Enabled = True
|
||||
Caption = 'Default'
|
||||
GroupBehaviour = gbSingleItem
|
||||
HideFrameWhenIdle = True
|
||||
ImageIndex = 0
|
||||
ShowCaption = True
|
||||
TableBehaviour = tbBeginsRow
|
||||
ButtonKind = bkButton
|
||||
end
|
||||
object SpkSmallButton2: TSpkSmallButton
|
||||
Visible = True
|
||||
Enabled = True
|
||||
Caption = 'Button and dropdown'
|
||||
GroupBehaviour = gbSingleItem
|
||||
HideFrameWhenIdle = True
|
||||
ImageIndex = 0
|
||||
ShowCaption = True
|
||||
TableBehaviour = tbBeginsRow
|
||||
ButtonKind = bkButtonDropdown
|
||||
end
|
||||
object SpkSmallButton3: TSpkSmallButton
|
||||
Visible = True
|
||||
Enabled = True
|
||||
Caption = 'Dropdown'
|
||||
GroupBehaviour = gbSingleItem
|
||||
HideFrameWhenIdle = True
|
||||
ImageIndex = 0
|
||||
ShowCaption = True
|
||||
TableBehaviour = tbBeginsRow
|
||||
ButtonKind = bkDropdown
|
||||
end
|
||||
end
|
||||
object SpkPane3: TSpkPane
|
||||
Caption = 'Tool buttons'
|
||||
Visible = True
|
||||
Items = (
|
||||
'SpkSmallButton4'
|
||||
'SpkSmallButton5'
|
||||
@ -215,59 +191,31 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
'SpkSmallButton8'
|
||||
)
|
||||
object SpkSmallButton4: TSpkSmallButton
|
||||
Visible = True
|
||||
Enabled = True
|
||||
Caption = 'Button'
|
||||
GroupBehaviour = gbBeginsGroup
|
||||
HideFrameWhenIdle = False
|
||||
ImageIndex = 0
|
||||
ShowCaption = False
|
||||
TableBehaviour = tbContinuesRow
|
||||
ButtonKind = bkButton
|
||||
end
|
||||
object SpkSmallButton5: TSpkSmallButton
|
||||
Visible = True
|
||||
Enabled = True
|
||||
Caption = 'Button'
|
||||
GroupBehaviour = gbContinuesGroup
|
||||
HideFrameWhenIdle = False
|
||||
ImageIndex = 0
|
||||
ShowCaption = False
|
||||
TableBehaviour = tbContinuesRow
|
||||
ButtonKind = bkButton
|
||||
end
|
||||
object SpkSmallButton6: TSpkSmallButton
|
||||
Visible = True
|
||||
Enabled = True
|
||||
Caption = 'Button'
|
||||
GroupBehaviour = gbEndsGroup
|
||||
HideFrameWhenIdle = False
|
||||
ImageIndex = 0
|
||||
ShowCaption = False
|
||||
TableBehaviour = tbContinuesRow
|
||||
ButtonKind = bkButton
|
||||
end
|
||||
object SpkSmallButton7: TSpkSmallButton
|
||||
Visible = True
|
||||
Enabled = True
|
||||
Caption = 'Btn1'
|
||||
GroupBehaviour = gbSingleItem
|
||||
HideFrameWhenIdle = False
|
||||
ImageIndex = 0
|
||||
ShowCaption = True
|
||||
TableBehaviour = tbBeginsRow
|
||||
ButtonKind = bkButton
|
||||
end
|
||||
object SpkSmallButton8: TSpkSmallButton
|
||||
Visible = True
|
||||
Enabled = True
|
||||
Caption = 'Btn2'
|
||||
GroupBehaviour = gbSingleItem
|
||||
HideFrameWhenIdle = False
|
||||
ImageIndex = 0
|
||||
ShowCaption = True
|
||||
TableBehaviour = tbContinuesRow
|
||||
ButtonKind = bkButton
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -316,8 +264,6 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
CustomAppearance.Element.ActiveCaptionColor = 8405614
|
||||
CustomAppearance.Element.Style = esRounded
|
||||
Caption = 'Another tab'
|
||||
OverrideAppearance = False
|
||||
Visible = True
|
||||
Panes = ( )
|
||||
end
|
||||
end
|
||||
@ -405,15 +351,15 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
Caption = 'Gradient kind'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
object lblTabHeaderFont: TLabel
|
||||
AnchorSideTop.Control = pTabHeaderFont
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = LblInactiveTabHeaderFontColor
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 88
|
||||
Left = 89
|
||||
Height = 15
|
||||
Top = 235
|
||||
Width = 83
|
||||
Width = 82
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Tab header font'
|
||||
ParentColor = False
|
||||
@ -697,6 +643,31 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
Shape = bsSpacer
|
||||
end
|
||||
object edTabCornerRadius: TSpinEdit
|
||||
AnchorSideLeft.Control = pTabHeaderFont
|
||||
AnchorSideTop.Control = pTabHeaderFont
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 191
|
||||
Height = 23
|
||||
Top = 261
|
||||
Width = 82
|
||||
BorderSpacing.Top = 6
|
||||
OnChange = edTabCornerRadiusChange
|
||||
TabOrder = 8
|
||||
end
|
||||
object lblTabCornerRadius: TLabel
|
||||
AnchorSideTop.Control = edTabCornerRadius
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = lblTabHeaderFont
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 81
|
||||
Height = 15
|
||||
Top = 265
|
||||
Width = 90
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Tab corner radius'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object TabSheet2: TTabSheet
|
||||
Caption = 'Pane'
|
||||
@ -1188,7 +1159,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
end
|
||||
object TabSheet3: TTabSheet
|
||||
Caption = 'Item'
|
||||
ClientHeight = 355
|
||||
ClientHeight = 354
|
||||
ClientWidth = 544
|
||||
ImageIndex = 2
|
||||
object sItemRectangle: TShape
|
||||
|
@ -15,6 +15,7 @@ type
|
||||
{ TfrmAppearanceEditWindow }
|
||||
|
||||
TfrmAppearanceEditWindow = class(TForm)
|
||||
lblTabCornerRadius: TLabel;
|
||||
SmallImages: TImageList;
|
||||
LargeImages: TImageList;
|
||||
Images_150: TImageList;
|
||||
@ -26,6 +27,7 @@ type
|
||||
ItemHSpacer: TBevel;
|
||||
edPaneHotTrackBrightnessChange: TSpinEdit;
|
||||
edItemHotTrackBrightnessChange: TSpinEdit;
|
||||
edTabCornerRadius: TSpinEdit;
|
||||
TabVSpacer: TBevel;
|
||||
bInactiveTabHeaderFontColor: TSpeedButton;
|
||||
bItemActiveInnerDarkColor: TSpeedButton;
|
||||
@ -103,7 +105,7 @@ type
|
||||
pTabGradientTo: TPanel;
|
||||
cbTabGradientKind: TComboBox;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
lblTabHeaderFont: TLabel;
|
||||
pTabHeaderFont: TPanel;
|
||||
Label8: TLabel;
|
||||
pPaneBorderDark: TPanel;
|
||||
@ -222,6 +224,7 @@ type
|
||||
|
||||
procedure edItemHotTrackBrightnessChangeChange(Sender: TObject);
|
||||
procedure edPaneHotTrackBrightnessChangeChange(Sender: TObject);
|
||||
procedure edTabCornerRadiusChange(Sender: TObject);
|
||||
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||
@ -842,6 +845,13 @@ begin
|
||||
tbPreview.Invalidate;
|
||||
end;
|
||||
|
||||
procedure TfrmAppearanceEditWindow.edTabCornerRadiusChange(Sender: TObject);
|
||||
begin
|
||||
with tbPreview.Appearance.Tab do
|
||||
CornerRadius := (Sender as TSpinEdit).Value;
|
||||
tbPreview.Invalidate;
|
||||
end;
|
||||
|
||||
procedure TfrmAppearanceEditWindow.FormActivate(Sender: TObject);
|
||||
begin
|
||||
UpdateImages;
|
||||
@ -888,6 +898,7 @@ begin
|
||||
SetPanelFont(pTabHeaderFont, TabHeaderFont);
|
||||
SetPanelColor(pActiveTabHeaderFont, TabHeaderFont.Color);
|
||||
SetPanelColor(pInactiveTabHeaderFont, InactiveTabHeaderFontColor);
|
||||
edTabCornerRadius.Value := CornerRadius;
|
||||
end;
|
||||
|
||||
with Pane do
|
||||
|
Reference in New Issue
Block a user