SpkToolbar: Add new demo "styles" showing all pre-defined styles.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5366 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
629356469a
commit
b7e5090cc1
@ -24,7 +24,11 @@ type
|
||||
|
||||
TSpkElementStyle = (esRounded, esRectangle);
|
||||
|
||||
TSpkStyle = (spkOffice2007Blue, spkOffice2007Silver, spkMetroLight, spkMetroDark);
|
||||
TSpkStyle = (
|
||||
spkOffice2007Blue,
|
||||
spkOffice2007Silver, spkOffice2007SilverTurquoise,
|
||||
spkMetroLight, spkMetroDark
|
||||
);
|
||||
|
||||
TSpkTabAppearance = class(TPersistent)
|
||||
private
|
||||
@ -340,7 +344,8 @@ begin
|
||||
FInactiveHeaderFontColor := FTabHeaderFont.Color;
|
||||
end;
|
||||
|
||||
spkOffice2007Silver:
|
||||
spkOffice2007Silver,
|
||||
spkOffice2007SilverTurquoise:
|
||||
begin
|
||||
FTabHeaderFont.Style := [];
|
||||
FTabHeaderFont.Color := $007A534C;
|
||||
@ -564,7 +569,8 @@ begin
|
||||
FStyle := psRectangleEtched;
|
||||
end;
|
||||
|
||||
spkOffice2007Silver:
|
||||
spkOffice2007Silver,
|
||||
spkOffice2007SilverTurquoise:
|
||||
begin
|
||||
FCaptionFont.Style := [];
|
||||
FCaptionFont.Color := $00363636;
|
||||
@ -913,7 +919,8 @@ begin
|
||||
FStyle := esRounded;
|
||||
end;
|
||||
|
||||
spkOffice2007Silver:
|
||||
spkOffice2007Silver,
|
||||
spkOffice2007SilverTurquoise:
|
||||
begin
|
||||
FCaptionFont.Style := [];
|
||||
FCaptionFont.Color := $008B4215;
|
||||
@ -931,6 +938,14 @@ begin
|
||||
FHotTrackInnerDarkColor := $007AC2D8;
|
||||
FHotTrackInnerLightColor := $00C5F1FF;
|
||||
FHotTrackCaptionColor := $0087426F;
|
||||
if AStyle = spkOffice2007SilverTurquoise then
|
||||
begin
|
||||
FHotTrackFrameColor := $009E7D0E;
|
||||
FHotTrackGradientFromColor := $00FBF1D0;
|
||||
FHotTrackGradientToColor := $00F4DD8A;
|
||||
FHotTrackInnerDarkColor := $00C19A11;
|
||||
FHotTrackInnerLightColor := $00FAEFC9;
|
||||
end;
|
||||
FActiveFrameColor := $0054768B;
|
||||
FActiveGradientFromColor := $006CBBFE;
|
||||
FActiveGradientToColor := $003D92FC;
|
||||
@ -938,6 +953,14 @@ begin
|
||||
FActiveInnerDarkColor := $000EA9FC;
|
||||
FActiveInnerLightColor := $000EA9FC;
|
||||
FActiveCaptionColor := $0080426E;
|
||||
if AStyle = spkOffice2007SilverTurquoise then
|
||||
begin
|
||||
FActiveFrameColor := $0077620B;
|
||||
FActiveGradientFromColor := $00F4DB82;
|
||||
FActiveGradientToColor := $00ECC53E;
|
||||
FActiveInnerDarkColor := $00735B0B;
|
||||
FActiveInnerLightColor := $00F3D87A;
|
||||
end;
|
||||
FStyle := esRounded;
|
||||
end;
|
||||
|
||||
@ -984,8 +1007,8 @@ begin
|
||||
FHotTrackGradientFromColor := $00805B3D;
|
||||
FHotTrackGradientToColor := $00805B3D;
|
||||
FHotTrackGradientType := bkSolid;
|
||||
FHotTrackInnerDarkColor := $00A56733;
|
||||
FHotTrackInnerLightColor := $00A56733;
|
||||
FHotTrackInnerDarkColor := $00805B3D;
|
||||
FHotTrackInnerLightColor := $00805B3D;
|
||||
FHotTrackCaptionColor := $00F2F2F2;
|
||||
FActiveFrameColor := $00000000;
|
||||
FActiveGradientFromColor := $00000000;
|
||||
|
@ -131,7 +131,7 @@ object Form1: TForm1
|
||||
Appearance.Element.ActiveInnerDarkColor = 961020
|
||||
Appearance.Element.ActiveCaptionColor = 8405614
|
||||
Appearance.Element.Style = esRounded
|
||||
TabIndex = 2
|
||||
TabIndex = 0
|
||||
Images = ImageList
|
||||
LargeImages = LargeImageList
|
||||
Tabs = (
|
||||
@ -1610,13 +1610,18 @@ object Form1: TForm1
|
||||
Caption = 'Office2007 silver'
|
||||
OnClick = StyleMenuClick
|
||||
end
|
||||
object MenuItem19: TMenuItem
|
||||
object MenuItem21: TMenuItem
|
||||
Tag = 2
|
||||
Caption = 'Office2007 silver / turquoise'
|
||||
OnClick = StyleMenuClick
|
||||
end
|
||||
object MenuItem19: TMenuItem
|
||||
Tag = 3
|
||||
Caption = 'Metro light'
|
||||
OnClick = StyleMenuClick
|
||||
end
|
||||
object MenuItem20: TMenuItem
|
||||
Tag = 3
|
||||
Tag = 4
|
||||
Caption = 'Metro dark'
|
||||
OnClick = StyleMenuClick
|
||||
end
|
||||
|
@ -42,6 +42,7 @@ type
|
||||
MenuItem19: TMenuItem;
|
||||
MenuItem2: TMenuItem;
|
||||
MenuItem20: TMenuItem;
|
||||
MenuItem21: TMenuItem;
|
||||
MenuItem3: TMenuItem;
|
||||
MenuItem4: TMenuItem;
|
||||
MenuItem5: TMenuItem;
|
||||
|
81
components/spktoolbar/demos/styles/project1.lpi
Normal file
81
components/spktoolbar/demos/styles/project1.lpi
Normal file
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="SpkToolbarPackage"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="project1"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
21
components/spktoolbar/demos/styles/project1.lpr
Normal file
21
components/spktoolbar/demos/styles/project1.lpr
Normal file
@ -0,0 +1,21 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource := True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
1860
components/spktoolbar/demos/styles/unit1.lfm
Normal file
1860
components/spktoolbar/demos/styles/unit1.lfm
Normal file
File diff suppressed because it is too large
Load Diff
106
components/spktoolbar/demos/styles/unit1.pas
Normal file
106
components/spktoolbar/demos/styles/unit1.pas
Normal file
@ -0,0 +1,106 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||
spktoolbar, spkt_Tab, spkt_Pane, spkt_Buttons;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
LargeImages: TImageList;
|
||||
Panel1: TPanel;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
Panel4: TPanel;
|
||||
SmallImages: TImageList;
|
||||
SpkLargeButton1: TSpkLargeButton;
|
||||
SpkLargeButton10: TSpkLargeButton;
|
||||
SpkLargeButton11: TSpkLargeButton;
|
||||
SpkLargeButton12: TSpkLargeButton;
|
||||
SpkLargeButton13: TSpkLargeButton;
|
||||
SpkLargeButton14: TSpkLargeButton;
|
||||
SpkLargeButton15: TSpkLargeButton;
|
||||
SpkLargeButton2: TSpkLargeButton;
|
||||
SpkLargeButton3: TSpkLargeButton;
|
||||
SpkLargeButton4: TSpkLargeButton;
|
||||
SpkLargeButton5: TSpkLargeButton;
|
||||
SpkLargeButton6: TSpkLargeButton;
|
||||
SpkLargeButton7: TSpkLargeButton;
|
||||
SpkLargeButton8: TSpkLargeButton;
|
||||
SpkLargeButton9: TSpkLargeButton;
|
||||
SpkPane1: TSpkPane;
|
||||
SpkPane10: TSpkPane;
|
||||
SpkPane2: TSpkPane;
|
||||
SpkPane3: TSpkPane;
|
||||
SpkPane4: TSpkPane;
|
||||
SpkPane5: TSpkPane;
|
||||
SpkPane6: TSpkPane;
|
||||
SpkPane7: TSpkPane;
|
||||
SpkPane8: TSpkPane;
|
||||
SpkPane9: TSpkPane;
|
||||
SpkSmallButton1: TSpkSmallButton;
|
||||
SpkSmallButton10: TSpkSmallButton;
|
||||
SpkSmallButton11: TSpkSmallButton;
|
||||
SpkSmallButton12: TSpkSmallButton;
|
||||
SpkSmallButton13: TSpkSmallButton;
|
||||
SpkSmallButton14: TSpkSmallButton;
|
||||
SpkSmallButton15: TSpkSmallButton;
|
||||
SpkSmallButton16: TSpkSmallButton;
|
||||
SpkSmallButton17: TSpkSmallButton;
|
||||
SpkSmallButton18: TSpkSmallButton;
|
||||
SpkSmallButton19: TSpkSmallButton;
|
||||
SpkSmallButton2: TSpkSmallButton;
|
||||
SpkSmallButton20: TSpkSmallButton;
|
||||
SpkSmallButton21: TSpkSmallButton;
|
||||
SpkSmallButton22: TSpkSmallButton;
|
||||
SpkSmallButton23: TSpkSmallButton;
|
||||
SpkSmallButton24: TSpkSmallButton;
|
||||
SpkSmallButton25: TSpkSmallButton;
|
||||
SpkSmallButton26: TSpkSmallButton;
|
||||
SpkSmallButton27: TSpkSmallButton;
|
||||
SpkSmallButton28: TSpkSmallButton;
|
||||
SpkSmallButton29: TSpkSmallButton;
|
||||
SpkSmallButton3: TSpkSmallButton;
|
||||
SpkSmallButton30: TSpkSmallButton;
|
||||
SpkSmallButton31: TSpkSmallButton;
|
||||
SpkSmallButton32: TSpkSmallButton;
|
||||
SpkSmallButton33: TSpkSmallButton;
|
||||
SpkSmallButton34: TSpkSmallButton;
|
||||
SpkSmallButton35: TSpkSmallButton;
|
||||
SpkSmallButton4: TSpkSmallButton;
|
||||
SpkSmallButton5: TSpkSmallButton;
|
||||
SpkSmallButton6: TSpkSmallButton;
|
||||
SpkSmallButton7: TSpkSmallButton;
|
||||
SpkSmallButton8: TSpkSmallButton;
|
||||
SpkSmallButton9: TSpkSmallButton;
|
||||
SpkTab1: TSpkTab;
|
||||
SpkTab2: TSpkTab;
|
||||
SpkTab4: TSpkTab;
|
||||
SpkTab5: TSpkTab;
|
||||
SpkTab6: TSpkTab;
|
||||
SpkToolbar1: TSpkToolbar;
|
||||
SpkToolbar2: TSpkToolbar;
|
||||
SpkToolbar3: TSpkToolbar;
|
||||
SpkToolbar4: TSpkToolbar;
|
||||
SpkToolbar5: TSpkToolbar;
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
end.
|
||||
|
@ -324,9 +324,9 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
Height = 395
|
||||
Top = 132
|
||||
Width = 558
|
||||
ActivePage = TabSheet2
|
||||
ActivePage = TabSheet5
|
||||
Align = alClient
|
||||
TabIndex = 1
|
||||
TabIndex = 4
|
||||
TabOrder = 1
|
||||
object TabSheet1: TTabSheet
|
||||
Caption = 'Tab'
|
||||
@ -2264,7 +2264,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
end
|
||||
object TabSheet5: TTabSheet
|
||||
Caption = 'Tools'
|
||||
ClientHeight = 343
|
||||
ClientHeight = 367
|
||||
ClientWidth = 550
|
||||
ImageIndex = 4
|
||||
object Label17: TLabel
|
||||
@ -2293,6 +2293,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||
Items.Strings = (
|
||||
'Office2007 blue'
|
||||
'Office2007 silver'
|
||||
'Office2007 silver / turquoise'
|
||||
'Metro light'
|
||||
'Metro dark'
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user