spktoolbar: Option to draw selection in TSpkToolbar with rounded corners.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8749 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-02-27 15:09:47 +00:00
parent d3a9ebb97a
commit 7d9529a164
7 changed files with 177 additions and 47 deletions

View File

@ -3946,6 +3946,39 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
TabOrder = 19
Text = 'None'
end
object cbPopupHotSelectionShape: TComboBox
AnchorSideLeft.Control = pPopupHotTrackGradientToColor
AnchorSideTop.Control = pPopupDividerLineColor
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = pPopupHotTrackGradientToColor
AnchorSideRight.Side = asrBottom
Left = 281
Height = 23
Top = 251
Width = 100
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 2
ItemHeight = 15
ItemIndex = 0
Items.Strings = (
'rounded'
'rectangle'
)
OnChange = cbPopupHotSelectionShapeChange
Style = csDropDownList
TabOrder = 20
Text = 'rounded'
end
object lblPopupHotSelectionShape: TLabel
AnchorSideLeft.Control = cbPopupHotSelectionShape
AnchorSideBottom.Control = cbPopupHotSelectionShape
Left = 281
Height = 15
Top = 234
Width = 82
Anchors = [akLeft, akBottom]
Caption = 'Selection shape'
end
end
object TabSheet4: TTabSheet
Caption = 'Import / Export'

View File

@ -49,6 +49,7 @@ type
bvPaneVertSpacer: TBevel;
cbPopupGutterGradientKind: TComboBox;
cbPopupCheckedGradientKind: TComboBox;
cbPopupHotSelectionShape: TComboBox;
cbPopupIdleGradientKind: TComboBox;
cbMenuButtonActiveGradientKind: TComboBox;
cbMenuButtonHottrackGradientKind: TComboBox;
@ -58,6 +59,7 @@ type
edMenuButtonHotTrackBrightnessChange: TSpinEdit;
edTabCaptionHeight: TSpinEdit;
lblPopupHotSelectionShape: TLabel;
lblPopupFont: TLabel;
lblPopupDisabledCaptionColor: TLabel;
lblPopupCaption: TLabel;
@ -350,6 +352,7 @@ type
procedure cbPaneStyleChange(Sender: TObject);
procedure cbPopupCheckedGradientKindChange(Sender: TObject);
procedure cbPopupGutterGradientKindChange(Sender: TObject);
procedure cbPopupHotSelectionShapeChange(Sender: TObject);
procedure cbPopupHotTrackGradientKindChange(Sender: TObject);
procedure cbPopupIdleGradientKindChange(Sender: TObject);
procedure cbTabGradientKindChange(Sender: TObject);
@ -1301,6 +1304,8 @@ begin
with Popup do
begin
cbPopupHotSelectionShape.ItemIndex := ord(SelectionShape);
SetPanelFont(pPopupFont, CaptionFont);
SetPanelColor(pPopupDisabledCaptionColor, DisabledCaptionColor);
SetPanelColor(pPopupIdleGradientFromColor, IdleGradientFromColor);
@ -1325,7 +1330,7 @@ begin
SetPanelColor(pPopupCheckedGradientTocolor, CheckedGradientToColor);
SetComboGradientKind(cbPopupCheckedGradientKind, CheckedGradientType);
// cbPopupStyle.ItemIndex := ord(Style);
// cbPopupStyle.ItemIndex := ord(Style);
// edItemHotTrackBrightnessChange.Value := HotTrackBrightnessChange;
end;
end;
@ -1575,6 +1580,13 @@ begin
GutterGradientType := TBackgroundKind((Sender as TCombobox).ItemIndex);
end;
procedure TfrmAppearanceEditWindow.cbPopupHotSelectionShapeChange(
Sender: TObject);
begin
with tbPreview.Appearance.Popup do
SelectionShape := TSpkPopupSelectionShape((Sender as TCombobox).ItemIndex);
end;
procedure TfrmAppearanceEditWindow.cbPopupHotTrackGradientKindChange(
Sender: TObject);
begin
@ -2004,7 +2016,6 @@ begin
PageControl.Constraints.MinWidth
);
AutoSize := false;
FAutoSized := true;