Skip to content

Commit

Permalink
Updated demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdp committed Jul 19, 2019
1 parent 3c4c79b commit cde9279
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 10 deletions.
Binary file modified demos/JPPack_Test/JPPack_Test.32.exe
Binary file not shown.
Binary file modified demos/JPPack_Test/JPPack_Test.64.exe
Binary file not shown.
105 changes: 98 additions & 7 deletions demos/JPPack_Test/src/Main.dfm
Expand Up @@ -1169,7 +1169,6 @@ object FormMain: TFormMain
Appearance.Borders.Top.Visible = False
Appearance.Borders.Bottom.Pen.Color = clBtnShadow
Appearance.Borders.Bottom.Visible = False
ExplicitHeight = 701
object lbl1: TLabel
Left = 68
Top = 11
Expand Down Expand Up @@ -4240,27 +4239,31 @@ object FormMain: TFormMain
Appearance.Borders.Top.Pen.Color = clBtnHighlight
Appearance.Borders.Bottom.Pen.Color = clBtnShadow
Appearance.DrawGradient = False
ExplicitTop = 31
ExplicitHeight = 701
object lbl3: TLabel
Left = 0
Top = 177
Top = 246
Width = 238
Height = 20
Align = alTop
Alignment = taCenter
AutoSize = False
Caption = 'TJppColorListBox'
Color = 15714469
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
Transparent = False
Layout = tlCenter
ExplicitLeft = -3
ExplicitTop = 6
end
object clb: TJppColorListBox
Left = 0
Top = 197
Top = 266
Width = 238
Height = 246
Align = alTop
Expand Down Expand Up @@ -4701,9 +4704,9 @@ object FormMain: TFormMain
Options = [clboAddOnSelectIfNotExists, clboAddAtTop]
SelectedColor = clNone
OnColorChanged = clbColorChanged
ExplicitTop = 20
ExplicitTop = 197
end
object spn: TJppSimplePanel
object spnColorSwatch: TJppSimplePanel
Left = 0
Top = 0
Width = 238
Expand All @@ -4724,7 +4727,13 @@ object FormMain: TFormMain
AutoSize = False
Caption = 'TJppColorSwatch / TJppColorSwatchEx'
Color = 15714469
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
Transparent = False
Layout = tlCenter
ExplicitTop = 8
Expand Down Expand Up @@ -4962,6 +4971,88 @@ object FormMain: TFormMain
SelectedColor = 8108137
end
end
object spnEdit: TJppSimplePanel
Left = 0
Top = 177
Width = 238
Height = 69
Align = alTop
ParentBackground = True
TabOrder = 2
Appearance.DrawTopBorder = False
Appearance.DrawLeftBorder = False
Appearance.DrawRightBorder = False
object lbl5: TLabel
Left = 0
Top = 0
Width = 238
Height = 20
Align = alTop
Alignment = taCenter
AutoSize = False
Caption = 'TJppEdit'
Color = 15714469
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
Transparent = False
Layout = tlCenter
ExplicitTop = 8
end
object sbtnFlashEdit: TJppBasicSpeedButton
Left = 132
Top = 35
Width = 85
Height = 25
Caption = '<-- Flash edit'
Appearance.Normal.Color = 15066597
Appearance.Normal.FontColor = clWindowText
Appearance.Normal.BorderColor = clWindowFrame
Appearance.Normal.BorderWidth = 1
Appearance.Hot.Color = clHighlight
Appearance.Hot.FontColor = clHighlightText
Appearance.Hot.BorderColor = clHighlight
Appearance.Hot.BorderWidth = 1
Appearance.Down.Color = 11758628
Appearance.Down.FontColor = clHighlightText
Appearance.Down.BorderColor = 11758628
Appearance.Down.BorderWidth = 1
Appearance.Disabled.Color = 16250871
Appearance.Disabled.FontColor = clBtnShadow
Appearance.Disabled.BorderColor = clBtnShadow
Appearance.Disabled.BorderWidth = 1
OnClick = sbtnFlashEditClick
end
object JppEdit1: TJppEdit
Left = 10
Top = 39
Width = 104
Height = 21
EditLabel.Width = 46
EditLabel.Height = 13
EditLabel.Caption = 'TJppEdit:'
Font.Charset = DEFAULT_CHARSET
Font.Color = 143934
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
LabelSpacing = 2
ParentFont = False
TabOrder = 0
Text = 'JppEdit1'
Appearance.NormalBgColor = 13431805
Appearance.NormalTextColor = 143934
Appearance.FocusedBgColor = 12348170
Appearance.FocusedTextColor = 16640981
Appearance.HotBgColor = 16640981
Appearance.HotTextColor = 5845764
TabOnEnter = False
end
end
end
object ActionList1: TActionList
Left = 328
Expand Down
17 changes: 14 additions & 3 deletions demos/JPPack_Test/src/Main.pas
Expand Up @@ -17,7 +17,7 @@ interface

// JPPack units
JPP.BasicSpeedButton, JPP.ColorComboBox, JPP.Panel, JPP.LinkLabel, JPP.PngButton, JPP.PngButton.ColorMaps, JPP.ColorListBox, JPP.BasicPanel,
JPP.DoubleLineLabel, JPP.DoubleLabel, JPP.PngCollection, JPP.ColorSwatch, JPP.SimplePanel;
JPP.DoubleLineLabel, JPP.DoubleLabel, JPP.PngCollection, JPP.ColorSwatch, JPP.SimplePanel, JPP.Edit;



Expand Down Expand Up @@ -85,13 +85,17 @@ TFormMain = class(TForm)
JppDoubleLineLabel2: TJppDoubleLineLabel;
btnToolbarAssignIcon: TJppBasicSpeedButton;
JppPngCollection1: TJppPngCollection;
spn: TJppSimplePanel;
spnColorSwatch: TJppSimplePanel;
lbl4: TLabel;
JppColorSwatch1: TJppColorSwatch;
JppColorSwatch2: TJppColorSwatch;
cswe: TJppColorSwatchEx;
JppColorSwatch3: TJppColorSwatch;
JppColorSwatch4: TJppColorSwatch;
spnEdit: TJppSimplePanel;
lbl5: TLabel;
JppEdit1: TJppEdit;
sbtnFlashEdit: TJppBasicSpeedButton;
procedure FormCreate(Sender: TObject);
procedure ButtonClick(Sender: TObject);
procedure actEscExecute(Sender: TObject);
Expand All @@ -102,6 +106,7 @@ TFormMain = class(TForm)
procedure clbColorChanged(Sender: TObject);
procedure clbMeasureItem(Control: TWinControl; Index: Integer; var Height: Integer);
procedure JppColorSwatch1GetBottomColorStrValue(const AColor: TColor; var ColorStr, Prefix, Suffix: string);
procedure sbtnFlashEditClick(Sender: TObject);
procedure SetActiveColor(const cl: TColor);
end;

Expand Down Expand Up @@ -170,7 +175,8 @@ procedure TFormMain.SetActiveColor(const cl: TColor);

pnButtons.Appearance.Borders.Left.Pen.Color := cl2;
pnButtons.Appearance.Borders.Right.Pen.Color := cl2;
spn.Appearance.BorderColor := cl2;
spnColorSwatch.Appearance.BorderColor := cl2;
spnEdit.Appearance.BorderColor := cl2;

cl2 := cl; //GetSimilarColor(cl, 20, True);
pnButtons.Appearance.UpperGradient.ColorFrom := cl2;
Expand Down Expand Up @@ -234,4 +240,9 @@ procedure TFormMain.JppColorSwatch1GetBottomColorStrValue(const AColor: TColor;
ColorStr := InsertNumSep(ColorStr, ' ', 2, 2);
end;

procedure TFormMain.sbtnFlashEditClick(Sender: TObject);
begin
JppEdit1.FlashBackground;
end;

end.

0 comments on commit cde9279

Please sign in to comment.