Browse Source

Added bcthememanager

lainz 9 years ago
parent
commit
f57d548950

+ 14 - 1
bcbutton.pas

@@ -48,7 +48,8 @@ interface
 uses
 uses
   Classes, LResources, Controls, Dialogs, BGRABitmap, BGRABitmapTypes,
   Classes, LResources, Controls, Dialogs, BGRABitmap, BGRABitmapTypes,
   ActnList, ImgList, Menus, // MORA
   ActnList, ImgList, Menus, // MORA
-  Buttons, Graphics, LCLType, types, BCTypes, Forms, BCBasectrls;
+  Buttons, Graphics, LCLType, types, BCTypes, Forms, BCBasectrls,
+  BCThemeManager;
 
 
 {off $DEFINE DEBUG}
 {off $DEFINE DEBUG}
 
 
@@ -267,6 +268,9 @@ type
   end;
   end;
 
 
   TBCButton = class(TCustomBCButton)
   TBCButton = class(TCustomBCButton)
+  private
+    TBCThemeManager: TBCThemeManager;
+    procedure SetFBCThemeManager(AValue: TBCThemeManager);
   published
   published
     property Action;
     property Action;
     property Align;
     property Align;
@@ -348,6 +352,7 @@ type
     property MemoryUsage;
     property MemoryUsage;
     { The unique name of the control in the form. }
     { The unique name of the control in the form. }
     property Name;
     property Name;
+    property ThemeManager: TBCThemeManager read TBCThemeManager write SetFBCThemeManager;
   end;
   end;
 
 
   { TBCButtonActionLink }
   { TBCButtonActionLink }
@@ -374,6 +379,14 @@ type
     function GetImageList: TCustomImageList; override;
     function GetImageList: TCustomImageList; override;
   end;
   end;
 
 
+{ TBCButton }
+
+procedure TBCButton.SetFBCThemeManager(AValue: TBCThemeManager);
+begin
+  if TBCThemeManager=AValue then Exit;
+  TBCThemeManager:=AValue;
+end;
+
 function TBCButtonImageIndexPropertyEditor.GetImageList: TCustomImageList;
 function TBCButtonImageIndexPropertyEditor.GetImageList: TCustomImageList;
 var
 var
   Component: TPersistent;
   Component: TPersistent;

+ 14 - 1
bcbuttonfocus.pas

@@ -48,7 +48,8 @@ interface
 uses
 uses
   Classes, LResources, Controls, Dialogs, BGRABitmap, BGRABitmapTypes,
   Classes, LResources, Controls, Dialogs, BGRABitmap, BGRABitmapTypes,
   ActnList, ImgList, Menus, // MORA
   ActnList, ImgList, Menus, // MORA
-  Buttons, Graphics, LCLType, types, BCTypes, Forms, BCBasectrls;
+  Buttons, Graphics, LCLType, types, BCTypes, Forms, BCBasectrls,
+  BCThemeManager;
 
 
 {off $DEFINE DEBUG}
 {off $DEFINE DEBUG}
 
 
@@ -269,6 +270,9 @@ type
   end;
   end;
 
 
   TBCButtonFocus = class(TCustomBCButtonFocus)
   TBCButtonFocus = class(TCustomBCButtonFocus)
+  private
+    TBCThemeManager: TBCThemeManager;
+    procedure SetFBCThemeManager(AValue: TBCThemeManager);
   published
   published
     property Action;
     property Action;
     property Align;
     property Align;
@@ -352,6 +356,7 @@ type
     property Name;
     property Name;
     { TabStop }
     { TabStop }
     property TabStop;
     property TabStop;
+    property ThemeManager: TBCThemeManager read TBCThemeManager write SetFBCThemeManager;
   end;
   end;
 
 
   { TBCButtonFocusActionLink }
   { TBCButtonFocusActionLink }
@@ -378,6 +383,14 @@ type
     function GetImageList: TCustomImageList; override;
     function GetImageList: TCustomImageList; override;
   end;
   end;
 
 
+{ TBCButtonFocus }
+
+procedure TBCButtonFocus.SetFBCThemeManager(AValue: TBCThemeManager);
+begin
+  if TBCThemeManager=AValue then Exit;
+  TBCThemeManager:=AValue;
+end;
+
 function TBCButtonImageIndexPropertyEditor.GetImageList: TCustomImageList;
 function TBCButtonImageIndexPropertyEditor.GetImageList: TCustomImageList;
 var
 var
   Component: TPersistent;
   Component: TPersistent;

+ 123 - 0
bcdefaultthememanager.pas

@@ -0,0 +1,123 @@
+unit BCDefaultThemeManager;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
+  BCButton, BCButtonFocus, BCNumericKeyboard, BCThemeManager;
+
+type
+
+  { TBCDefaultThemeManager }
+
+  TBCDefaultThemeManager = class(TBCThemeManager)
+  private
+    FButton: TBCButton;
+    FButtonFocus: TBCButtonFocus;
+    procedure SetFButton(AValue: TBCButton);
+    procedure SetFButtonFocus(AValue: TBCButtonFocus);
+  protected
+
+  public
+    constructor Create(AOwner: TComponent); override;
+    destructor Destroy; override;
+  public
+    procedure Apply(AControl: TWinControl);
+    procedure Apply();
+  published
+    property Button: TBCButton read FButton write SetFButton;
+    property ButtonFocus: TBCButtonFocus read FButtonFocus write SetFButtonFocus;
+  end;
+
+procedure Register;
+
+implementation
+
+procedure Register;
+begin
+  RegisterComponents('BGRA Controls', [TBCDefaultThemeManager]);
+end;
+
+{ TBCDefaultThemeManager }
+
+procedure TBCDefaultThemeManager.SetFButton(AValue: TBCButton);
+begin
+  if FButton = AValue then
+    Exit;
+  FButton := AValue;
+end;
+
+procedure TBCDefaultThemeManager.SetFButtonFocus(AValue: TBCButtonFocus);
+begin
+  if FButtonFocus = AValue then
+    Exit;
+  FButtonFocus := AValue;
+end;
+
+constructor TBCDefaultThemeManager.Create(AOwner: TComponent);
+begin
+  inherited Create(AOwner);
+  FButton := TBCButton.Create(Self);
+  FButtonFocus := TBCButtonFocus.Create(Self);
+end;
+
+destructor TBCDefaultThemeManager.Destroy;
+begin
+  inherited Destroy;
+end;
+
+procedure TBCDefaultThemeManager.Apply(AControl: TWinControl);
+var
+  i: integer;
+begin
+  { Controls }
+  for i := 0 to AControl.ControlCount - 1 do
+  begin
+    { BCButton }
+    if (AControl.Controls[i] is TBCButton) then
+      with TBCButton(AControl.Controls[i]) do
+        if (Assigned(ThemeManager)) and
+          (TBCDefaultThemeManager(ThemeManager).Name = Self.Name) then
+          Assign(FButton);
+    { BCButtonFocus }
+    if (AControl.Controls[i] is TBCButtonFocus) then
+      with TBCButtonFocus(AControl.Controls[i]) do
+        if (Assigned(ThemeManager)) and
+          (TBCDefaultThemeManager(ThemeManager).Name = Self.Name) then
+          Assign(FButtonFocus);
+  end;
+  { Components }
+  for i := 0 to AControl.ComponentCount - 1 do
+  begin
+    { BCNumericKeyboard }
+    if (AControl.Components[i] is TBCNumericKeyboard) then
+      with TBCNumericKeyboard(AControl.Components[i]) do
+        if (Assigned(ThemeManager)) and
+          (TBCDefaultThemeManager(ThemeManager).Name = Self.Name) then
+        begin
+          ButtonStyle.Assign(FButton);
+          UpdateButtonStyle;
+        end;
+    { BCRealNumericKeyboard }
+    if (AControl.Components[i] is TBCRealNumericKeyboard) then
+      with TBCRealNumericKeyboard(AControl.Components[i]) do
+        if (Assigned(ThemeManager)) and
+          (TBCDefaultThemeManager(ThemeManager).Name = Self.Name) then
+        begin
+          ButtonStyle.Assign(FButton);
+          UpdateButtonStyle;
+        end;
+  end;
+end;
+
+procedure TBCDefaultThemeManager.Apply;
+begin
+  if Self.Owner is TWinControl then
+    Apply(Self.Owner as TWinControl)
+  else
+    raise Exception.Create('The parent is not TWinControl descendant.');
+end;
+
+end.

+ 15 - 1
bcnumerickeyboard.pas

@@ -6,13 +6,16 @@ interface
 
 
 uses
 uses
   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
-  BCPanel, BCButton, MouseAndKeyInput, LCLType;
+  BCPanel, BCButton, MouseAndKeyInput, LCLType, BCThemeManager;
 
 
 type
 type
 
 
   { TBCCustomNumericKeyboard }
   { TBCCustomNumericKeyboard }
 
 
   TBCCustomNumericKeyboard = class(TComponent)
   TBCCustomNumericKeyboard = class(TComponent)
+  private
+    FBCThemeManager: TBCThemeManager;
+    procedure SetFThemeManager(AValue: TBCThemeManager);
   protected
   protected
     FOnChange: TNotifyEvent;
     FOnChange: TNotifyEvent;
     FOnUserChange: TNotifyEvent;
     FOnUserChange: TNotifyEvent;
@@ -53,6 +56,8 @@ type
     property ButtonStyle: TBCButton read FButton write SetFButton;
     property ButtonStyle: TBCButton read FButton write SetFButton;
     { If it's visible or not }
     { If it's visible or not }
     property Visible: boolean read FVisible;
     property Visible: boolean read FVisible;
+  published
+    property ThemeManager: TBCThemeManager read FBCThemeManager write SetFThemeManager;
   end;
   end;
 
 
   TBCNumericKeyboard = class(TBCCustomNumericKeyboard)
   TBCNumericKeyboard = class(TBCCustomNumericKeyboard)
@@ -60,6 +65,7 @@ type
     property Value;
     property Value;
     property OnChange;
     property OnChange;
     property OnUserChange;
     property OnUserChange;
+    property ThemeManager;
   end;
   end;
 
 
   { TBCRealNumericKeyboard }
   { TBCRealNumericKeyboard }
@@ -73,6 +79,7 @@ type
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
   published
   published
     property OnUserChange;
     property OnUserChange;
+    property ThemeManager;
   end;
   end;
 
 
 procedure Register;
 procedure Register;
@@ -196,6 +203,13 @@ begin
     FOnUserChange(Self);
     FOnUserChange(Self);
 end;
 end;
 
 
+procedure TBCCustomNumericKeyboard.SetFThemeManager(AValue: TBCThemeManager);
+begin
+  if FBCThemeManager = AValue then
+    Exit;
+  FBCThemeManager := AValue;
+end;
+
 procedure TBCCustomNumericKeyboard.SetFButton(AValue: TBCButton);
 procedure TBCCustomNumericKeyboard.SetFButton(AValue: TBCButton);
 begin
 begin
   if FButton = AValue then
   if FButton = AValue then

+ 24 - 0
bcthememanager.pas

@@ -0,0 +1,24 @@
+unit BCThemeManager;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs;
+
+type
+  TBCThemeManager = class(TComponent)
+  private
+
+  protected
+
+  public
+
+  published
+
+  end;
+
+implementation
+
+end.

+ 10 - 1
bgracontrols.lpk

@@ -23,7 +23,7 @@
       </Linking>
       </Linking>
     </CompilerOptions>
     </CompilerOptions>
     <Version Major="4" Minor="1"/>
     <Version Major="4" Minor="1"/>
-    <Files Count="38">
+    <Files Count="40">
       <Item1>
       <Item1>
         <Filename Value="bcbasectrls.pas"/>
         <Filename Value="bcbasectrls.pas"/>
         <UnitName Value="BCBaseCtrls"/>
         <UnitName Value="BCBaseCtrls"/>
@@ -205,6 +205,15 @@
         <Filename Value="mouseandkeyinput/mouseandkeyinput.pas"/>
         <Filename Value="mouseandkeyinput/mouseandkeyinput.pas"/>
         <UnitName Value="MouseAndKeyInput"/>
         <UnitName Value="MouseAndKeyInput"/>
       </Item38>
       </Item38>
+      <Item39>
+        <Filename Value="bcthememanager.pas"/>
+        <UnitName Value="BCThemeManager"/>
+      </Item39>
+      <Item40>
+        <Filename Value="bcdefaultthememanager.pas"/>
+        <HasRegisterProc Value="True"/>
+        <UnitName Value="BCDefaultThemeManager"/>
+      </Item40>
     </Files>
     </Files>
     <RequiredPkgs Count="4">
     <RequiredPkgs Count="4">
       <Item1>
       <Item1>

+ 4 - 1
bgracontrols.pas

@@ -4,6 +4,7 @@
 
 
 unit bgracontrols;
 unit bgracontrols;
 
 
+{$warn 5023 off : no warning about unused units}
 interface
 interface
 
 
 uses
 uses
@@ -15,7 +16,8 @@ uses
   BGRAResizeSpeedButton, BGRAScript, BGRAShape, BGRASpeedButton, 
   BGRAResizeSpeedButton, BGRAScript, BGRAShape, BGRASpeedButton, 
   BGRASpriteAnimation, BGRAVirtualScreen, DTAnalogClock, DTAnalogCommon, 
   BGRASpriteAnimation, BGRAVirtualScreen, DTAnalogClock, DTAnalogCommon, 
   DTAnalogGauge, dtthemedclock, dtthemedgauge, uPSI_BGRAPascalScript, 
   DTAnalogGauge, dtthemedclock, dtthemedgauge, uPSI_BGRAPascalScript, 
-  BCNumericKeyboard, MouseAndKeyInput, LazarusPackageIntf;
+  BCNumericKeyboard, MouseAndKeyInput, BCThemeManager, BCDefaultThemeManager, 
+  LazarusPackageIntf;
 
 
 implementation
 implementation
 
 
@@ -48,6 +50,7 @@ begin
   RegisterUnit('dtthemedgauge', @dtthemedgauge.Register);
   RegisterUnit('dtthemedgauge', @dtthemedgauge.Register);
   RegisterUnit('uPSI_BGRAPascalScript', @uPSI_BGRAPascalScript.Register);
   RegisterUnit('uPSI_BGRAPascalScript', @uPSI_BGRAPascalScript.Register);
   RegisterUnit('BCNumericKeyboard', @BCNumericKeyboard.Register);
   RegisterUnit('BCNumericKeyboard', @BCNumericKeyboard.Register);
+  RegisterUnit('BCDefaultThemeManager', @BCDefaultThemeManager.Register);
 end;
 end;
 
 
 initialization
 initialization

+ 81 - 0
test/test_bccontrols/test_bcthememanager/test.lpi

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+  <ProjectOptions>
+    <Version Value="9"/>
+    <PathDelim Value="\"/>
+    <General>
+      <SessionStorage Value="InProjectDir"/>
+      <MainUnit Value="0"/>
+      <Title Value="test"/>
+      <ResourceType Value="res"/>
+      <UseXPManifest Value="True"/>
+      <XPManifest>
+        <DpiAware Value="True"/>
+      </XPManifest>
+      <Icon Value="0"/>
+    </General>
+    <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="bgracontrols"/>
+      </Item1>
+      <Item2>
+        <PackageName Value="LCL"/>
+      </Item2>
+    </RequiredPackages>
+    <Units Count="2">
+      <Unit0>
+        <Filename Value="test.lpr"/>
+        <IsPartOfProject Value="True"/>
+      </Unit0>
+      <Unit1>
+        <Filename Value="umain.pas"/>
+        <IsPartOfProject Value="True"/>
+        <ComponentName Value="Form1"/>
+        <HasResources Value="True"/>
+        <ResourceBaseClass Value="Form"/>
+      </Unit1>
+    </Units>
+  </ProjectOptions>
+  <CompilerOptions>
+    <Version Value="11"/>
+    <PathDelim Value="\"/>
+    <Target>
+      <Filename Value="test"/>
+    </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 - 0
test/test_bccontrols/test_bcthememanager/test.lpr

@@ -0,0 +1,21 @@
+program test;
+
+{$mode objfpc}{$H+}
+
+uses
+  {$IFDEF UNIX}{$IFDEF UseCThreads}
+  cthreads,
+  {$ENDIF}{$ENDIF}
+  Interfaces, // this includes the LCL widgetset
+  Forms, umain
+  { you can add units after this };
+
+{$R *.res}
+
+begin
+  RequireDerivedFormResource:=True;
+  Application.Initialize;
+  Application.CreateForm(TForm1, Form1);
+  Application.Run;
+end.
+

+ 871 - 0
test/test_bccontrols/test_bcthememanager/umain.lfm

@@ -0,0 +1,871 @@
+object Form1: TForm1
+  Left = 462
+  Height = 240
+  Top = 146
+  Width = 487
+  Caption = 'BC Theme Manager'
+  ClientHeight = 240
+  ClientWidth = 487
+  OnShow = FormShow
+  LCLVersion = '1.7'
+  object BCButton1: TBCButton
+    Left = 16
+    Height = 33
+    Top = 16
+    Width = 123
+    StateClicked.Background.Color = clBlack
+    StateClicked.Background.ColorOpacity = 255
+    StateClicked.Background.Gradient1.StartColor = 8404992
+    StateClicked.Background.Gradient1.StartColorOpacity = 255
+    StateClicked.Background.Gradient1.DrawMode = dmSet
+    StateClicked.Background.Gradient1.EndColor = 4194304
+    StateClicked.Background.Gradient1.EndColorOpacity = 255
+    StateClicked.Background.Gradient1.ColorCorrection = True
+    StateClicked.Background.Gradient1.GradientType = gtRadial
+    StateClicked.Background.Gradient1.Point1XPercent = 50
+    StateClicked.Background.Gradient1.Point1YPercent = 100
+    StateClicked.Background.Gradient1.Point2XPercent = 0
+    StateClicked.Background.Gradient1.Point2YPercent = 0
+    StateClicked.Background.Gradient1.Sinus = False
+    StateClicked.Background.Gradient2.StartColor = clWhite
+    StateClicked.Background.Gradient2.StartColorOpacity = 255
+    StateClicked.Background.Gradient2.DrawMode = dmSet
+    StateClicked.Background.Gradient2.EndColor = clBlack
+    StateClicked.Background.Gradient2.EndColorOpacity = 255
+    StateClicked.Background.Gradient2.ColorCorrection = True
+    StateClicked.Background.Gradient2.GradientType = gtLinear
+    StateClicked.Background.Gradient2.Point1XPercent = 0
+    StateClicked.Background.Gradient2.Point1YPercent = 0
+    StateClicked.Background.Gradient2.Point2XPercent = 0
+    StateClicked.Background.Gradient2.Point2YPercent = 100
+    StateClicked.Background.Gradient2.Sinus = False
+    StateClicked.Background.Gradient1EndPercent = 100
+    StateClicked.Background.Style = bbsGradient
+    StateClicked.Border.Color = clBlack
+    StateClicked.Border.ColorOpacity = 255
+    StateClicked.Border.LightColor = clWhite
+    StateClicked.Border.LightOpacity = 255
+    StateClicked.Border.LightWidth = 0
+    StateClicked.Border.Style = bboNone
+    StateClicked.Border.Width = 1
+    StateClicked.FontEx.Color = 16770790
+    StateClicked.FontEx.EndEllipsis = False
+    StateClicked.FontEx.FontQuality = fqSystemClearType
+    StateClicked.FontEx.Height = 0
+    StateClicked.FontEx.SingleLine = True
+    StateClicked.FontEx.Shadow = True
+    StateClicked.FontEx.ShadowColor = clBlack
+    StateClicked.FontEx.ShadowColorOpacity = 255
+    StateClicked.FontEx.ShadowRadius = 2
+    StateClicked.FontEx.ShadowOffsetX = 1
+    StateClicked.FontEx.ShadowOffsetY = 1
+    StateClicked.FontEx.Style = [fsBold]
+    StateClicked.FontEx.TextAlignment = bcaCenter
+    StateClicked.FontEx.WordBreak = False
+    StateHover.Background.Color = clBlack
+    StateHover.Background.ColorOpacity = 255
+    StateHover.Background.Gradient1.StartColor = 16744448
+    StateHover.Background.Gradient1.StartColorOpacity = 255
+    StateHover.Background.Gradient1.DrawMode = dmSet
+    StateHover.Background.Gradient1.EndColor = 8404992
+    StateHover.Background.Gradient1.EndColorOpacity = 255
+    StateHover.Background.Gradient1.ColorCorrection = True
+    StateHover.Background.Gradient1.GradientType = gtRadial
+    StateHover.Background.Gradient1.Point1XPercent = 50
+    StateHover.Background.Gradient1.Point1YPercent = 100
+    StateHover.Background.Gradient1.Point2XPercent = 0
+    StateHover.Background.Gradient1.Point2YPercent = 0
+    StateHover.Background.Gradient1.Sinus = False
+    StateHover.Background.Gradient2.StartColor = clWhite
+    StateHover.Background.Gradient2.StartColorOpacity = 255
+    StateHover.Background.Gradient2.DrawMode = dmSet
+    StateHover.Background.Gradient2.EndColor = clBlack
+    StateHover.Background.Gradient2.EndColorOpacity = 255
+    StateHover.Background.Gradient2.ColorCorrection = True
+    StateHover.Background.Gradient2.GradientType = gtLinear
+    StateHover.Background.Gradient2.Point1XPercent = 0
+    StateHover.Background.Gradient2.Point1YPercent = 0
+    StateHover.Background.Gradient2.Point2XPercent = 0
+    StateHover.Background.Gradient2.Point2YPercent = 100
+    StateHover.Background.Gradient2.Sinus = False
+    StateHover.Background.Gradient1EndPercent = 100
+    StateHover.Background.Style = bbsGradient
+    StateHover.Border.Color = clBlack
+    StateHover.Border.ColorOpacity = 255
+    StateHover.Border.LightColor = clWhite
+    StateHover.Border.LightOpacity = 255
+    StateHover.Border.LightWidth = 0
+    StateHover.Border.Style = bboNone
+    StateHover.Border.Width = 1
+    StateHover.FontEx.Color = clWhite
+    StateHover.FontEx.EndEllipsis = False
+    StateHover.FontEx.FontQuality = fqSystemClearType
+    StateHover.FontEx.Height = 0
+    StateHover.FontEx.SingleLine = True
+    StateHover.FontEx.Shadow = True
+    StateHover.FontEx.ShadowColor = clBlack
+    StateHover.FontEx.ShadowColorOpacity = 255
+    StateHover.FontEx.ShadowRadius = 2
+    StateHover.FontEx.ShadowOffsetX = 1
+    StateHover.FontEx.ShadowOffsetY = 1
+    StateHover.FontEx.Style = [fsBold]
+    StateHover.FontEx.TextAlignment = bcaCenter
+    StateHover.FontEx.WordBreak = False
+    StateNormal.Background.Color = clBlack
+    StateNormal.Background.ColorOpacity = 255
+    StateNormal.Background.Gradient1.StartColor = 4194304
+    StateNormal.Background.Gradient1.StartColorOpacity = 255
+    StateNormal.Background.Gradient1.DrawMode = dmSet
+    StateNormal.Background.Gradient1.EndColor = 8405056
+    StateNormal.Background.Gradient1.EndColorOpacity = 255
+    StateNormal.Background.Gradient1.ColorCorrection = True
+    StateNormal.Background.Gradient1.GradientType = gtLinear
+    StateNormal.Background.Gradient1.Point1XPercent = 0
+    StateNormal.Background.Gradient1.Point1YPercent = 0
+    StateNormal.Background.Gradient1.Point2XPercent = 0
+    StateNormal.Background.Gradient1.Point2YPercent = 100
+    StateNormal.Background.Gradient1.Sinus = False
+    StateNormal.Background.Gradient2.StartColor = 8405056
+    StateNormal.Background.Gradient2.StartColorOpacity = 255
+    StateNormal.Background.Gradient2.DrawMode = dmSet
+    StateNormal.Background.Gradient2.EndColor = 4194304
+    StateNormal.Background.Gradient2.EndColorOpacity = 255
+    StateNormal.Background.Gradient2.ColorCorrection = True
+    StateNormal.Background.Gradient2.GradientType = gtRadial
+    StateNormal.Background.Gradient2.Point1XPercent = 50
+    StateNormal.Background.Gradient2.Point1YPercent = 100
+    StateNormal.Background.Gradient2.Point2XPercent = 0
+    StateNormal.Background.Gradient2.Point2YPercent = 0
+    StateNormal.Background.Gradient2.Sinus = False
+    StateNormal.Background.Gradient1EndPercent = 60
+    StateNormal.Background.Style = bbsGradient
+    StateNormal.Border.Color = clBlack
+    StateNormal.Border.ColorOpacity = 255
+    StateNormal.Border.LightColor = clWhite
+    StateNormal.Border.LightOpacity = 255
+    StateNormal.Border.LightWidth = 0
+    StateNormal.Border.Style = bboNone
+    StateNormal.Border.Width = 1
+    StateNormal.FontEx.Color = 16770790
+    StateNormal.FontEx.EndEllipsis = False
+    StateNormal.FontEx.FontQuality = fqSystemClearType
+    StateNormal.FontEx.Height = 0
+    StateNormal.FontEx.SingleLine = True
+    StateNormal.FontEx.Shadow = True
+    StateNormal.FontEx.ShadowColor = clBlack
+    StateNormal.FontEx.ShadowColorOpacity = 255
+    StateNormal.FontEx.ShadowRadius = 2
+    StateNormal.FontEx.ShadowOffsetX = 1
+    StateNormal.FontEx.ShadowOffsetY = 1
+    StateNormal.FontEx.Style = [fsBold]
+    StateNormal.FontEx.TextAlignment = bcaCenter
+    StateNormal.FontEx.WordBreak = False
+    Caption = 'BCButton1'
+    Color = clNone
+    DropDownWidth = 16
+    DropDownArrowSize = 8
+    GlobalOpacity = 255
+    InnerMargin = 0
+    ParentColor = False
+    Rounding.RoundX = 12
+    Rounding.RoundY = 12
+    Rounding.RoundOptions = []
+    RoundingDropDown.RoundX = 1
+    RoundingDropDown.RoundY = 1
+    RoundingDropDown.RoundOptions = []
+    TextApplyGlobalOpacity = False
+    MemoryUsage = bmuHigh
+    ThemeManager = BCDefaultThemeManager1
+  end
+  object BCButton2: TBCButton
+    Left = 16
+    Height = 33
+    Top = 56
+    Width = 123
+    StateClicked.Background.Color = clBlack
+    StateClicked.Background.ColorOpacity = 255
+    StateClicked.Background.Gradient1.StartColor = 8404992
+    StateClicked.Background.Gradient1.StartColorOpacity = 255
+    StateClicked.Background.Gradient1.DrawMode = dmSet
+    StateClicked.Background.Gradient1.EndColor = 4194304
+    StateClicked.Background.Gradient1.EndColorOpacity = 255
+    StateClicked.Background.Gradient1.ColorCorrection = True
+    StateClicked.Background.Gradient1.GradientType = gtRadial
+    StateClicked.Background.Gradient1.Point1XPercent = 50
+    StateClicked.Background.Gradient1.Point1YPercent = 100
+    StateClicked.Background.Gradient1.Point2XPercent = 0
+    StateClicked.Background.Gradient1.Point2YPercent = 0
+    StateClicked.Background.Gradient1.Sinus = False
+    StateClicked.Background.Gradient2.StartColor = clWhite
+    StateClicked.Background.Gradient2.StartColorOpacity = 255
+    StateClicked.Background.Gradient2.DrawMode = dmSet
+    StateClicked.Background.Gradient2.EndColor = clBlack
+    StateClicked.Background.Gradient2.EndColorOpacity = 255
+    StateClicked.Background.Gradient2.ColorCorrection = True
+    StateClicked.Background.Gradient2.GradientType = gtLinear
+    StateClicked.Background.Gradient2.Point1XPercent = 0
+    StateClicked.Background.Gradient2.Point1YPercent = 0
+    StateClicked.Background.Gradient2.Point2XPercent = 0
+    StateClicked.Background.Gradient2.Point2YPercent = 100
+    StateClicked.Background.Gradient2.Sinus = False
+    StateClicked.Background.Gradient1EndPercent = 100
+    StateClicked.Background.Style = bbsGradient
+    StateClicked.Border.Color = clBlack
+    StateClicked.Border.ColorOpacity = 255
+    StateClicked.Border.LightColor = clWhite
+    StateClicked.Border.LightOpacity = 255
+    StateClicked.Border.LightWidth = 0
+    StateClicked.Border.Style = bboNone
+    StateClicked.Border.Width = 1
+    StateClicked.FontEx.Color = 16770790
+    StateClicked.FontEx.EndEllipsis = False
+    StateClicked.FontEx.FontQuality = fqSystemClearType
+    StateClicked.FontEx.Height = 0
+    StateClicked.FontEx.SingleLine = True
+    StateClicked.FontEx.Shadow = True
+    StateClicked.FontEx.ShadowColor = clBlack
+    StateClicked.FontEx.ShadowColorOpacity = 255
+    StateClicked.FontEx.ShadowRadius = 2
+    StateClicked.FontEx.ShadowOffsetX = 1
+    StateClicked.FontEx.ShadowOffsetY = 1
+    StateClicked.FontEx.Style = [fsBold]
+    StateClicked.FontEx.TextAlignment = bcaCenter
+    StateClicked.FontEx.WordBreak = False
+    StateHover.Background.Color = clBlack
+    StateHover.Background.ColorOpacity = 255
+    StateHover.Background.Gradient1.StartColor = 16744448
+    StateHover.Background.Gradient1.StartColorOpacity = 255
+    StateHover.Background.Gradient1.DrawMode = dmSet
+    StateHover.Background.Gradient1.EndColor = 8404992
+    StateHover.Background.Gradient1.EndColorOpacity = 255
+    StateHover.Background.Gradient1.ColorCorrection = True
+    StateHover.Background.Gradient1.GradientType = gtRadial
+    StateHover.Background.Gradient1.Point1XPercent = 50
+    StateHover.Background.Gradient1.Point1YPercent = 100
+    StateHover.Background.Gradient1.Point2XPercent = 0
+    StateHover.Background.Gradient1.Point2YPercent = 0
+    StateHover.Background.Gradient1.Sinus = False
+    StateHover.Background.Gradient2.StartColor = clWhite
+    StateHover.Background.Gradient2.StartColorOpacity = 255
+    StateHover.Background.Gradient2.DrawMode = dmSet
+    StateHover.Background.Gradient2.EndColor = clBlack
+    StateHover.Background.Gradient2.EndColorOpacity = 255
+    StateHover.Background.Gradient2.ColorCorrection = True
+    StateHover.Background.Gradient2.GradientType = gtLinear
+    StateHover.Background.Gradient2.Point1XPercent = 0
+    StateHover.Background.Gradient2.Point1YPercent = 0
+    StateHover.Background.Gradient2.Point2XPercent = 0
+    StateHover.Background.Gradient2.Point2YPercent = 100
+    StateHover.Background.Gradient2.Sinus = False
+    StateHover.Background.Gradient1EndPercent = 100
+    StateHover.Background.Style = bbsGradient
+    StateHover.Border.Color = clBlack
+    StateHover.Border.ColorOpacity = 255
+    StateHover.Border.LightColor = clWhite
+    StateHover.Border.LightOpacity = 255
+    StateHover.Border.LightWidth = 0
+    StateHover.Border.Style = bboNone
+    StateHover.Border.Width = 1
+    StateHover.FontEx.Color = clWhite
+    StateHover.FontEx.EndEllipsis = False
+    StateHover.FontEx.FontQuality = fqSystemClearType
+    StateHover.FontEx.Height = 0
+    StateHover.FontEx.SingleLine = True
+    StateHover.FontEx.Shadow = True
+    StateHover.FontEx.ShadowColor = clBlack
+    StateHover.FontEx.ShadowColorOpacity = 255
+    StateHover.FontEx.ShadowRadius = 2
+    StateHover.FontEx.ShadowOffsetX = 1
+    StateHover.FontEx.ShadowOffsetY = 1
+    StateHover.FontEx.Style = [fsBold]
+    StateHover.FontEx.TextAlignment = bcaCenter
+    StateHover.FontEx.WordBreak = False
+    StateNormal.Background.Color = clBlack
+    StateNormal.Background.ColorOpacity = 255
+    StateNormal.Background.Gradient1.StartColor = 4194304
+    StateNormal.Background.Gradient1.StartColorOpacity = 255
+    StateNormal.Background.Gradient1.DrawMode = dmSet
+    StateNormal.Background.Gradient1.EndColor = 8405056
+    StateNormal.Background.Gradient1.EndColorOpacity = 255
+    StateNormal.Background.Gradient1.ColorCorrection = True
+    StateNormal.Background.Gradient1.GradientType = gtLinear
+    StateNormal.Background.Gradient1.Point1XPercent = 0
+    StateNormal.Background.Gradient1.Point1YPercent = 0
+    StateNormal.Background.Gradient1.Point2XPercent = 0
+    StateNormal.Background.Gradient1.Point2YPercent = 100
+    StateNormal.Background.Gradient1.Sinus = False
+    StateNormal.Background.Gradient2.StartColor = 8405056
+    StateNormal.Background.Gradient2.StartColorOpacity = 255
+    StateNormal.Background.Gradient2.DrawMode = dmSet
+    StateNormal.Background.Gradient2.EndColor = 4194304
+    StateNormal.Background.Gradient2.EndColorOpacity = 255
+    StateNormal.Background.Gradient2.ColorCorrection = True
+    StateNormal.Background.Gradient2.GradientType = gtRadial
+    StateNormal.Background.Gradient2.Point1XPercent = 50
+    StateNormal.Background.Gradient2.Point1YPercent = 100
+    StateNormal.Background.Gradient2.Point2XPercent = 0
+    StateNormal.Background.Gradient2.Point2YPercent = 0
+    StateNormal.Background.Gradient2.Sinus = False
+    StateNormal.Background.Gradient1EndPercent = 60
+    StateNormal.Background.Style = bbsGradient
+    StateNormal.Border.Color = clBlack
+    StateNormal.Border.ColorOpacity = 255
+    StateNormal.Border.LightColor = clWhite
+    StateNormal.Border.LightOpacity = 255
+    StateNormal.Border.LightWidth = 0
+    StateNormal.Border.Style = bboNone
+    StateNormal.Border.Width = 1
+    StateNormal.FontEx.Color = 16770790
+    StateNormal.FontEx.EndEllipsis = False
+    StateNormal.FontEx.FontQuality = fqSystemClearType
+    StateNormal.FontEx.Height = 0
+    StateNormal.FontEx.SingleLine = True
+    StateNormal.FontEx.Shadow = True
+    StateNormal.FontEx.ShadowColor = clBlack
+    StateNormal.FontEx.ShadowColorOpacity = 255
+    StateNormal.FontEx.ShadowRadius = 2
+    StateNormal.FontEx.ShadowOffsetX = 1
+    StateNormal.FontEx.ShadowOffsetY = 1
+    StateNormal.FontEx.Style = [fsBold]
+    StateNormal.FontEx.TextAlignment = bcaCenter
+    StateNormal.FontEx.WordBreak = False
+    Caption = 'BCButton2'
+    Color = clNone
+    DropDownWidth = 16
+    DropDownArrowSize = 8
+    GlobalOpacity = 255
+    InnerMargin = 0
+    ParentColor = False
+    Rounding.RoundX = 12
+    Rounding.RoundY = 12
+    Rounding.RoundOptions = []
+    RoundingDropDown.RoundX = 1
+    RoundingDropDown.RoundY = 1
+    RoundingDropDown.RoundOptions = []
+    TextApplyGlobalOpacity = False
+    MemoryUsage = bmuHigh
+    ThemeManager = BCDefaultThemeManager1
+  end
+  object BCButton3: TBCButton
+    Left = 16
+    Height = 33
+    Top = 96
+    Width = 123
+    StateClicked.Background.Color = clBlack
+    StateClicked.Background.ColorOpacity = 255
+    StateClicked.Background.Gradient1.StartColor = 8404992
+    StateClicked.Background.Gradient1.StartColorOpacity = 255
+    StateClicked.Background.Gradient1.DrawMode = dmSet
+    StateClicked.Background.Gradient1.EndColor = 4194304
+    StateClicked.Background.Gradient1.EndColorOpacity = 255
+    StateClicked.Background.Gradient1.ColorCorrection = True
+    StateClicked.Background.Gradient1.GradientType = gtRadial
+    StateClicked.Background.Gradient1.Point1XPercent = 50
+    StateClicked.Background.Gradient1.Point1YPercent = 100
+    StateClicked.Background.Gradient1.Point2XPercent = 0
+    StateClicked.Background.Gradient1.Point2YPercent = 0
+    StateClicked.Background.Gradient1.Sinus = False
+    StateClicked.Background.Gradient2.StartColor = clWhite
+    StateClicked.Background.Gradient2.StartColorOpacity = 255
+    StateClicked.Background.Gradient2.DrawMode = dmSet
+    StateClicked.Background.Gradient2.EndColor = clBlack
+    StateClicked.Background.Gradient2.EndColorOpacity = 255
+    StateClicked.Background.Gradient2.ColorCorrection = True
+    StateClicked.Background.Gradient2.GradientType = gtLinear
+    StateClicked.Background.Gradient2.Point1XPercent = 0
+    StateClicked.Background.Gradient2.Point1YPercent = 0
+    StateClicked.Background.Gradient2.Point2XPercent = 0
+    StateClicked.Background.Gradient2.Point2YPercent = 100
+    StateClicked.Background.Gradient2.Sinus = False
+    StateClicked.Background.Gradient1EndPercent = 100
+    StateClicked.Background.Style = bbsGradient
+    StateClicked.Border.Color = clBlack
+    StateClicked.Border.ColorOpacity = 255
+    StateClicked.Border.LightColor = clWhite
+    StateClicked.Border.LightOpacity = 255
+    StateClicked.Border.LightWidth = 0
+    StateClicked.Border.Style = bboNone
+    StateClicked.Border.Width = 1
+    StateClicked.FontEx.Color = 16770790
+    StateClicked.FontEx.EndEllipsis = False
+    StateClicked.FontEx.FontQuality = fqSystemClearType
+    StateClicked.FontEx.Height = 0
+    StateClicked.FontEx.SingleLine = True
+    StateClicked.FontEx.Shadow = True
+    StateClicked.FontEx.ShadowColor = clBlack
+    StateClicked.FontEx.ShadowColorOpacity = 255
+    StateClicked.FontEx.ShadowRadius = 2
+    StateClicked.FontEx.ShadowOffsetX = 1
+    StateClicked.FontEx.ShadowOffsetY = 1
+    StateClicked.FontEx.Style = [fsBold]
+    StateClicked.FontEx.TextAlignment = bcaCenter
+    StateClicked.FontEx.WordBreak = False
+    StateHover.Background.Color = clBlack
+    StateHover.Background.ColorOpacity = 255
+    StateHover.Background.Gradient1.StartColor = 16744448
+    StateHover.Background.Gradient1.StartColorOpacity = 255
+    StateHover.Background.Gradient1.DrawMode = dmSet
+    StateHover.Background.Gradient1.EndColor = 8404992
+    StateHover.Background.Gradient1.EndColorOpacity = 255
+    StateHover.Background.Gradient1.ColorCorrection = True
+    StateHover.Background.Gradient1.GradientType = gtRadial
+    StateHover.Background.Gradient1.Point1XPercent = 50
+    StateHover.Background.Gradient1.Point1YPercent = 100
+    StateHover.Background.Gradient1.Point2XPercent = 0
+    StateHover.Background.Gradient1.Point2YPercent = 0
+    StateHover.Background.Gradient1.Sinus = False
+    StateHover.Background.Gradient2.StartColor = clWhite
+    StateHover.Background.Gradient2.StartColorOpacity = 255
+    StateHover.Background.Gradient2.DrawMode = dmSet
+    StateHover.Background.Gradient2.EndColor = clBlack
+    StateHover.Background.Gradient2.EndColorOpacity = 255
+    StateHover.Background.Gradient2.ColorCorrection = True
+    StateHover.Background.Gradient2.GradientType = gtLinear
+    StateHover.Background.Gradient2.Point1XPercent = 0
+    StateHover.Background.Gradient2.Point1YPercent = 0
+    StateHover.Background.Gradient2.Point2XPercent = 0
+    StateHover.Background.Gradient2.Point2YPercent = 100
+    StateHover.Background.Gradient2.Sinus = False
+    StateHover.Background.Gradient1EndPercent = 100
+    StateHover.Background.Style = bbsGradient
+    StateHover.Border.Color = clBlack
+    StateHover.Border.ColorOpacity = 255
+    StateHover.Border.LightColor = clWhite
+    StateHover.Border.LightOpacity = 255
+    StateHover.Border.LightWidth = 0
+    StateHover.Border.Style = bboNone
+    StateHover.Border.Width = 1
+    StateHover.FontEx.Color = clWhite
+    StateHover.FontEx.EndEllipsis = False
+    StateHover.FontEx.FontQuality = fqSystemClearType
+    StateHover.FontEx.Height = 0
+    StateHover.FontEx.SingleLine = True
+    StateHover.FontEx.Shadow = True
+    StateHover.FontEx.ShadowColor = clBlack
+    StateHover.FontEx.ShadowColorOpacity = 255
+    StateHover.FontEx.ShadowRadius = 2
+    StateHover.FontEx.ShadowOffsetX = 1
+    StateHover.FontEx.ShadowOffsetY = 1
+    StateHover.FontEx.Style = [fsBold]
+    StateHover.FontEx.TextAlignment = bcaCenter
+    StateHover.FontEx.WordBreak = False
+    StateNormal.Background.Color = clBlack
+    StateNormal.Background.ColorOpacity = 255
+    StateNormal.Background.Gradient1.StartColor = 4194304
+    StateNormal.Background.Gradient1.StartColorOpacity = 255
+    StateNormal.Background.Gradient1.DrawMode = dmSet
+    StateNormal.Background.Gradient1.EndColor = 8405056
+    StateNormal.Background.Gradient1.EndColorOpacity = 255
+    StateNormal.Background.Gradient1.ColorCorrection = True
+    StateNormal.Background.Gradient1.GradientType = gtLinear
+    StateNormal.Background.Gradient1.Point1XPercent = 0
+    StateNormal.Background.Gradient1.Point1YPercent = 0
+    StateNormal.Background.Gradient1.Point2XPercent = 0
+    StateNormal.Background.Gradient1.Point2YPercent = 100
+    StateNormal.Background.Gradient1.Sinus = False
+    StateNormal.Background.Gradient2.StartColor = 8405056
+    StateNormal.Background.Gradient2.StartColorOpacity = 255
+    StateNormal.Background.Gradient2.DrawMode = dmSet
+    StateNormal.Background.Gradient2.EndColor = 4194304
+    StateNormal.Background.Gradient2.EndColorOpacity = 255
+    StateNormal.Background.Gradient2.ColorCorrection = True
+    StateNormal.Background.Gradient2.GradientType = gtRadial
+    StateNormal.Background.Gradient2.Point1XPercent = 50
+    StateNormal.Background.Gradient2.Point1YPercent = 100
+    StateNormal.Background.Gradient2.Point2XPercent = 0
+    StateNormal.Background.Gradient2.Point2YPercent = 0
+    StateNormal.Background.Gradient2.Sinus = False
+    StateNormal.Background.Gradient1EndPercent = 60
+    StateNormal.Background.Style = bbsGradient
+    StateNormal.Border.Color = clBlack
+    StateNormal.Border.ColorOpacity = 255
+    StateNormal.Border.LightColor = clWhite
+    StateNormal.Border.LightOpacity = 255
+    StateNormal.Border.LightWidth = 0
+    StateNormal.Border.Style = bboNone
+    StateNormal.Border.Width = 1
+    StateNormal.FontEx.Color = 16770790
+    StateNormal.FontEx.EndEllipsis = False
+    StateNormal.FontEx.FontQuality = fqSystemClearType
+    StateNormal.FontEx.Height = 0
+    StateNormal.FontEx.SingleLine = True
+    StateNormal.FontEx.Shadow = True
+    StateNormal.FontEx.ShadowColor = clBlack
+    StateNormal.FontEx.ShadowColorOpacity = 255
+    StateNormal.FontEx.ShadowRadius = 2
+    StateNormal.FontEx.ShadowOffsetX = 1
+    StateNormal.FontEx.ShadowOffsetY = 1
+    StateNormal.FontEx.Style = [fsBold]
+    StateNormal.FontEx.TextAlignment = bcaCenter
+    StateNormal.FontEx.WordBreak = False
+    Caption = 'BCButton3'
+    Color = clNone
+    DropDownWidth = 16
+    DropDownArrowSize = 8
+    GlobalOpacity = 255
+    InnerMargin = 0
+    ParentColor = False
+    Rounding.RoundX = 12
+    Rounding.RoundY = 12
+    Rounding.RoundOptions = []
+    RoundingDropDown.RoundX = 1
+    RoundingDropDown.RoundY = 1
+    RoundingDropDown.RoundOptions = []
+    TextApplyGlobalOpacity = False
+    MemoryUsage = bmuHigh
+    ThemeManager = BCDefaultThemeManager1
+  end
+  object BCButton4: TBCButton
+    Left = 16
+    Height = 33
+    Top = 136
+    Width = 123
+    StateClicked.Background.Color = clBlack
+    StateClicked.Background.ColorOpacity = 255
+    StateClicked.Background.Gradient1.StartColor = 8404992
+    StateClicked.Background.Gradient1.StartColorOpacity = 255
+    StateClicked.Background.Gradient1.DrawMode = dmSet
+    StateClicked.Background.Gradient1.EndColor = 4194304
+    StateClicked.Background.Gradient1.EndColorOpacity = 255
+    StateClicked.Background.Gradient1.ColorCorrection = True
+    StateClicked.Background.Gradient1.GradientType = gtRadial
+    StateClicked.Background.Gradient1.Point1XPercent = 50
+    StateClicked.Background.Gradient1.Point1YPercent = 100
+    StateClicked.Background.Gradient1.Point2XPercent = 0
+    StateClicked.Background.Gradient1.Point2YPercent = 0
+    StateClicked.Background.Gradient1.Sinus = False
+    StateClicked.Background.Gradient2.StartColor = clWhite
+    StateClicked.Background.Gradient2.StartColorOpacity = 255
+    StateClicked.Background.Gradient2.DrawMode = dmSet
+    StateClicked.Background.Gradient2.EndColor = clBlack
+    StateClicked.Background.Gradient2.EndColorOpacity = 255
+    StateClicked.Background.Gradient2.ColorCorrection = True
+    StateClicked.Background.Gradient2.GradientType = gtLinear
+    StateClicked.Background.Gradient2.Point1XPercent = 0
+    StateClicked.Background.Gradient2.Point1YPercent = 0
+    StateClicked.Background.Gradient2.Point2XPercent = 0
+    StateClicked.Background.Gradient2.Point2YPercent = 100
+    StateClicked.Background.Gradient2.Sinus = False
+    StateClicked.Background.Gradient1EndPercent = 100
+    StateClicked.Background.Style = bbsGradient
+    StateClicked.Border.Color = clBlack
+    StateClicked.Border.ColorOpacity = 255
+    StateClicked.Border.LightColor = clWhite
+    StateClicked.Border.LightOpacity = 255
+    StateClicked.Border.LightWidth = 0
+    StateClicked.Border.Style = bboNone
+    StateClicked.Border.Width = 1
+    StateClicked.FontEx.Color = 16770790
+    StateClicked.FontEx.EndEllipsis = False
+    StateClicked.FontEx.FontQuality = fqSystemClearType
+    StateClicked.FontEx.Height = 0
+    StateClicked.FontEx.SingleLine = True
+    StateClicked.FontEx.Shadow = True
+    StateClicked.FontEx.ShadowColor = clBlack
+    StateClicked.FontEx.ShadowColorOpacity = 255
+    StateClicked.FontEx.ShadowRadius = 2
+    StateClicked.FontEx.ShadowOffsetX = 1
+    StateClicked.FontEx.ShadowOffsetY = 1
+    StateClicked.FontEx.Style = [fsBold]
+    StateClicked.FontEx.TextAlignment = bcaCenter
+    StateClicked.FontEx.WordBreak = False
+    StateHover.Background.Color = clBlack
+    StateHover.Background.ColorOpacity = 255
+    StateHover.Background.Gradient1.StartColor = 16744448
+    StateHover.Background.Gradient1.StartColorOpacity = 255
+    StateHover.Background.Gradient1.DrawMode = dmSet
+    StateHover.Background.Gradient1.EndColor = 8404992
+    StateHover.Background.Gradient1.EndColorOpacity = 255
+    StateHover.Background.Gradient1.ColorCorrection = True
+    StateHover.Background.Gradient1.GradientType = gtRadial
+    StateHover.Background.Gradient1.Point1XPercent = 50
+    StateHover.Background.Gradient1.Point1YPercent = 100
+    StateHover.Background.Gradient1.Point2XPercent = 0
+    StateHover.Background.Gradient1.Point2YPercent = 0
+    StateHover.Background.Gradient1.Sinus = False
+    StateHover.Background.Gradient2.StartColor = clWhite
+    StateHover.Background.Gradient2.StartColorOpacity = 255
+    StateHover.Background.Gradient2.DrawMode = dmSet
+    StateHover.Background.Gradient2.EndColor = clBlack
+    StateHover.Background.Gradient2.EndColorOpacity = 255
+    StateHover.Background.Gradient2.ColorCorrection = True
+    StateHover.Background.Gradient2.GradientType = gtLinear
+    StateHover.Background.Gradient2.Point1XPercent = 0
+    StateHover.Background.Gradient2.Point1YPercent = 0
+    StateHover.Background.Gradient2.Point2XPercent = 0
+    StateHover.Background.Gradient2.Point2YPercent = 100
+    StateHover.Background.Gradient2.Sinus = False
+    StateHover.Background.Gradient1EndPercent = 100
+    StateHover.Background.Style = bbsGradient
+    StateHover.Border.Color = clBlack
+    StateHover.Border.ColorOpacity = 255
+    StateHover.Border.LightColor = clWhite
+    StateHover.Border.LightOpacity = 255
+    StateHover.Border.LightWidth = 0
+    StateHover.Border.Style = bboNone
+    StateHover.Border.Width = 1
+    StateHover.FontEx.Color = clWhite
+    StateHover.FontEx.EndEllipsis = False
+    StateHover.FontEx.FontQuality = fqSystemClearType
+    StateHover.FontEx.Height = 0
+    StateHover.FontEx.SingleLine = True
+    StateHover.FontEx.Shadow = True
+    StateHover.FontEx.ShadowColor = clBlack
+    StateHover.FontEx.ShadowColorOpacity = 255
+    StateHover.FontEx.ShadowRadius = 2
+    StateHover.FontEx.ShadowOffsetX = 1
+    StateHover.FontEx.ShadowOffsetY = 1
+    StateHover.FontEx.Style = [fsBold]
+    StateHover.FontEx.TextAlignment = bcaCenter
+    StateHover.FontEx.WordBreak = False
+    StateNormal.Background.Color = clBlack
+    StateNormal.Background.ColorOpacity = 255
+    StateNormal.Background.Gradient1.StartColor = 4194304
+    StateNormal.Background.Gradient1.StartColorOpacity = 255
+    StateNormal.Background.Gradient1.DrawMode = dmSet
+    StateNormal.Background.Gradient1.EndColor = 8405056
+    StateNormal.Background.Gradient1.EndColorOpacity = 255
+    StateNormal.Background.Gradient1.ColorCorrection = True
+    StateNormal.Background.Gradient1.GradientType = gtLinear
+    StateNormal.Background.Gradient1.Point1XPercent = 0
+    StateNormal.Background.Gradient1.Point1YPercent = 0
+    StateNormal.Background.Gradient1.Point2XPercent = 0
+    StateNormal.Background.Gradient1.Point2YPercent = 100
+    StateNormal.Background.Gradient1.Sinus = False
+    StateNormal.Background.Gradient2.StartColor = 8405056
+    StateNormal.Background.Gradient2.StartColorOpacity = 255
+    StateNormal.Background.Gradient2.DrawMode = dmSet
+    StateNormal.Background.Gradient2.EndColor = 4194304
+    StateNormal.Background.Gradient2.EndColorOpacity = 255
+    StateNormal.Background.Gradient2.ColorCorrection = True
+    StateNormal.Background.Gradient2.GradientType = gtRadial
+    StateNormal.Background.Gradient2.Point1XPercent = 50
+    StateNormal.Background.Gradient2.Point1YPercent = 100
+    StateNormal.Background.Gradient2.Point2XPercent = 0
+    StateNormal.Background.Gradient2.Point2YPercent = 0
+    StateNormal.Background.Gradient2.Sinus = False
+    StateNormal.Background.Gradient1EndPercent = 60
+    StateNormal.Background.Style = bbsGradient
+    StateNormal.Border.Color = clBlack
+    StateNormal.Border.ColorOpacity = 255
+    StateNormal.Border.LightColor = clWhite
+    StateNormal.Border.LightOpacity = 255
+    StateNormal.Border.LightWidth = 0
+    StateNormal.Border.Style = bboNone
+    StateNormal.Border.Width = 1
+    StateNormal.FontEx.Color = 16770790
+    StateNormal.FontEx.EndEllipsis = False
+    StateNormal.FontEx.FontQuality = fqSystemClearType
+    StateNormal.FontEx.Height = 0
+    StateNormal.FontEx.SingleLine = True
+    StateNormal.FontEx.Shadow = True
+    StateNormal.FontEx.ShadowColor = clBlack
+    StateNormal.FontEx.ShadowColorOpacity = 255
+    StateNormal.FontEx.ShadowRadius = 2
+    StateNormal.FontEx.ShadowOffsetX = 1
+    StateNormal.FontEx.ShadowOffsetY = 1
+    StateNormal.FontEx.Style = [fsBold]
+    StateNormal.FontEx.TextAlignment = bcaCenter
+    StateNormal.FontEx.WordBreak = False
+    Caption = 'BCButton4'
+    Color = clNone
+    DropDownWidth = 16
+    DropDownArrowSize = 8
+    GlobalOpacity = 255
+    InnerMargin = 0
+    ParentColor = False
+    Rounding.RoundX = 12
+    Rounding.RoundY = 12
+    Rounding.RoundOptions = []
+    RoundingDropDown.RoundX = 1
+    RoundingDropDown.RoundY = 1
+    RoundingDropDown.RoundOptions = []
+    TextApplyGlobalOpacity = False
+    MemoryUsage = bmuHigh
+    ThemeManager = BCDefaultThemeManager1
+  end
+  object BCButtonFocus1: TBCButtonFocus
+    Left = 16
+    Height = 33
+    Top = 176
+    Width = 123
+    StateClicked.Background.Color = clBlack
+    StateClicked.Background.ColorOpacity = 255
+    StateClicked.Background.Gradient1.StartColor = 8404992
+    StateClicked.Background.Gradient1.StartColorOpacity = 255
+    StateClicked.Background.Gradient1.DrawMode = dmSet
+    StateClicked.Background.Gradient1.EndColor = 4194304
+    StateClicked.Background.Gradient1.EndColorOpacity = 255
+    StateClicked.Background.Gradient1.ColorCorrection = True
+    StateClicked.Background.Gradient1.GradientType = gtRadial
+    StateClicked.Background.Gradient1.Point1XPercent = 50
+    StateClicked.Background.Gradient1.Point1YPercent = 100
+    StateClicked.Background.Gradient1.Point2XPercent = 0
+    StateClicked.Background.Gradient1.Point2YPercent = 0
+    StateClicked.Background.Gradient1.Sinus = False
+    StateClicked.Background.Gradient2.StartColor = clWhite
+    StateClicked.Background.Gradient2.StartColorOpacity = 255
+    StateClicked.Background.Gradient2.DrawMode = dmSet
+    StateClicked.Background.Gradient2.EndColor = clBlack
+    StateClicked.Background.Gradient2.EndColorOpacity = 255
+    StateClicked.Background.Gradient2.ColorCorrection = True
+    StateClicked.Background.Gradient2.GradientType = gtLinear
+    StateClicked.Background.Gradient2.Point1XPercent = 0
+    StateClicked.Background.Gradient2.Point1YPercent = 0
+    StateClicked.Background.Gradient2.Point2XPercent = 0
+    StateClicked.Background.Gradient2.Point2YPercent = 100
+    StateClicked.Background.Gradient2.Sinus = False
+    StateClicked.Background.Gradient1EndPercent = 100
+    StateClicked.Background.Style = bbsGradient
+    StateClicked.Border.Color = clBlack
+    StateClicked.Border.ColorOpacity = 255
+    StateClicked.Border.LightColor = clWhite
+    StateClicked.Border.LightOpacity = 255
+    StateClicked.Border.LightWidth = 0
+    StateClicked.Border.Style = bboNone
+    StateClicked.Border.Width = 1
+    StateClicked.FontEx.Color = 16770790
+    StateClicked.FontEx.EndEllipsis = False
+    StateClicked.FontEx.FontQuality = fqSystemClearType
+    StateClicked.FontEx.Height = 0
+    StateClicked.FontEx.SingleLine = True
+    StateClicked.FontEx.Shadow = True
+    StateClicked.FontEx.ShadowColor = clBlack
+    StateClicked.FontEx.ShadowColorOpacity = 255
+    StateClicked.FontEx.ShadowRadius = 2
+    StateClicked.FontEx.ShadowOffsetX = 1
+    StateClicked.FontEx.ShadowOffsetY = 1
+    StateClicked.FontEx.Style = [fsBold]
+    StateClicked.FontEx.TextAlignment = bcaCenter
+    StateClicked.FontEx.WordBreak = False
+    StateHover.Background.Color = clBlack
+    StateHover.Background.ColorOpacity = 255
+    StateHover.Background.Gradient1.StartColor = 16744448
+    StateHover.Background.Gradient1.StartColorOpacity = 255
+    StateHover.Background.Gradient1.DrawMode = dmSet
+    StateHover.Background.Gradient1.EndColor = 8404992
+    StateHover.Background.Gradient1.EndColorOpacity = 255
+    StateHover.Background.Gradient1.ColorCorrection = True
+    StateHover.Background.Gradient1.GradientType = gtRadial
+    StateHover.Background.Gradient1.Point1XPercent = 50
+    StateHover.Background.Gradient1.Point1YPercent = 100
+    StateHover.Background.Gradient1.Point2XPercent = 0
+    StateHover.Background.Gradient1.Point2YPercent = 0
+    StateHover.Background.Gradient1.Sinus = False
+    StateHover.Background.Gradient2.StartColor = clWhite
+    StateHover.Background.Gradient2.StartColorOpacity = 255
+    StateHover.Background.Gradient2.DrawMode = dmSet
+    StateHover.Background.Gradient2.EndColor = clBlack
+    StateHover.Background.Gradient2.EndColorOpacity = 255
+    StateHover.Background.Gradient2.ColorCorrection = True
+    StateHover.Background.Gradient2.GradientType = gtLinear
+    StateHover.Background.Gradient2.Point1XPercent = 0
+    StateHover.Background.Gradient2.Point1YPercent = 0
+    StateHover.Background.Gradient2.Point2XPercent = 0
+    StateHover.Background.Gradient2.Point2YPercent = 100
+    StateHover.Background.Gradient2.Sinus = False
+    StateHover.Background.Gradient1EndPercent = 100
+    StateHover.Background.Style = bbsGradient
+    StateHover.Border.Color = clBlack
+    StateHover.Border.ColorOpacity = 255
+    StateHover.Border.LightColor = clWhite
+    StateHover.Border.LightOpacity = 255
+    StateHover.Border.LightWidth = 0
+    StateHover.Border.Style = bboNone
+    StateHover.Border.Width = 1
+    StateHover.FontEx.Color = clWhite
+    StateHover.FontEx.EndEllipsis = False
+    StateHover.FontEx.FontQuality = fqSystemClearType
+    StateHover.FontEx.Height = 0
+    StateHover.FontEx.SingleLine = True
+    StateHover.FontEx.Shadow = True
+    StateHover.FontEx.ShadowColor = clBlack
+    StateHover.FontEx.ShadowColorOpacity = 255
+    StateHover.FontEx.ShadowRadius = 2
+    StateHover.FontEx.ShadowOffsetX = 1
+    StateHover.FontEx.ShadowOffsetY = 1
+    StateHover.FontEx.Style = [fsBold]
+    StateHover.FontEx.TextAlignment = bcaCenter
+    StateHover.FontEx.WordBreak = False
+    StateNormal.Background.Color = clBlack
+    StateNormal.Background.ColorOpacity = 255
+    StateNormal.Background.Gradient1.StartColor = 4194304
+    StateNormal.Background.Gradient1.StartColorOpacity = 255
+    StateNormal.Background.Gradient1.DrawMode = dmSet
+    StateNormal.Background.Gradient1.EndColor = 8405056
+    StateNormal.Background.Gradient1.EndColorOpacity = 255
+    StateNormal.Background.Gradient1.ColorCorrection = True
+    StateNormal.Background.Gradient1.GradientType = gtLinear
+    StateNormal.Background.Gradient1.Point1XPercent = 0
+    StateNormal.Background.Gradient1.Point1YPercent = 0
+    StateNormal.Background.Gradient1.Point2XPercent = 0
+    StateNormal.Background.Gradient1.Point2YPercent = 100
+    StateNormal.Background.Gradient1.Sinus = False
+    StateNormal.Background.Gradient2.StartColor = 8405056
+    StateNormal.Background.Gradient2.StartColorOpacity = 255
+    StateNormal.Background.Gradient2.DrawMode = dmSet
+    StateNormal.Background.Gradient2.EndColor = 4194304
+    StateNormal.Background.Gradient2.EndColorOpacity = 255
+    StateNormal.Background.Gradient2.ColorCorrection = True
+    StateNormal.Background.Gradient2.GradientType = gtRadial
+    StateNormal.Background.Gradient2.Point1XPercent = 50
+    StateNormal.Background.Gradient2.Point1YPercent = 100
+    StateNormal.Background.Gradient2.Point2XPercent = 0
+    StateNormal.Background.Gradient2.Point2YPercent = 0
+    StateNormal.Background.Gradient2.Sinus = False
+    StateNormal.Background.Gradient1EndPercent = 60
+    StateNormal.Background.Style = bbsGradient
+    StateNormal.Border.Color = clBlack
+    StateNormal.Border.ColorOpacity = 255
+    StateNormal.Border.LightColor = clWhite
+    StateNormal.Border.LightOpacity = 255
+    StateNormal.Border.LightWidth = 0
+    StateNormal.Border.Style = bboNone
+    StateNormal.Border.Width = 1
+    StateNormal.FontEx.Color = 16770790
+    StateNormal.FontEx.EndEllipsis = False
+    StateNormal.FontEx.FontQuality = fqSystemClearType
+    StateNormal.FontEx.Height = 0
+    StateNormal.FontEx.SingleLine = True
+    StateNormal.FontEx.Shadow = True
+    StateNormal.FontEx.ShadowColor = clBlack
+    StateNormal.FontEx.ShadowColorOpacity = 255
+    StateNormal.FontEx.ShadowRadius = 2
+    StateNormal.FontEx.ShadowOffsetX = 1
+    StateNormal.FontEx.ShadowOffsetY = 1
+    StateNormal.FontEx.Style = [fsBold]
+    StateNormal.FontEx.TextAlignment = bcaCenter
+    StateNormal.FontEx.WordBreak = False
+    Caption = 'BCButtonFocus1'
+    Color = clNone
+    DropDownWidth = 16
+    DropDownArrowSize = 8
+    GlobalOpacity = 255
+    InnerMargin = 0
+    ParentColor = False
+    Rounding.RoundX = 12
+    Rounding.RoundY = 12
+    Rounding.RoundOptions = []
+    RoundingDropDown.RoundX = 1
+    RoundingDropDown.RoundY = 1
+    RoundingDropDown.RoundOptions = []
+    TextApplyGlobalOpacity = False
+    MemoryUsage = bmuHighF
+    TabStop = True
+    ThemeManager = BCDefaultThemeManager1
+  end
+  object BCDefaultThemeManager1: TBCDefaultThemeManager
+    left = 240
+    top = 168
+  end
+  object BCNumericKeyboard1: TBCNumericKeyboard
+    ThemeManager = BCDefaultThemeManager1
+    left = 240
+    top = 32
+  end
+  object BCRealNumericKeyboard1: TBCRealNumericKeyboard
+    ThemeManager = BCDefaultThemeManager1
+    left = 240
+    top = 96
+  end
+end

+ 138 - 0
test/test_bccontrols/test_bcthememanager/umain.pas

@@ -0,0 +1,138 @@
+unit umain;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
+  BCNumericKeyboard, BCButton, BCDefaultThemeManager,
+  BCButtonFocus;
+
+type
+
+  { TForm1 }
+
+  TForm1 = class(TForm)
+    BCButton1: TBCButton;
+    BCButton2: TBCButton;
+    BCButton3: TBCButton;
+    BCButton4: TBCButton;
+    BCButtonFocus1: TBCButtonFocus;
+    BCDefaultThemeManager1: TBCDefaultThemeManager;
+    BCNumericKeyboard1: TBCNumericKeyboard;
+    BCRealNumericKeyboard1: TBCRealNumericKeyboard;
+    procedure FormShow(Sender: TObject);
+  private
+
+  public
+
+  end;
+
+var
+  Form1: TForm1;
+
+implementation
+uses
+  BCTypes;
+
+{$R *.lfm}
+
+{ TForm1 }
+
+{ For button }
+procedure BCButtonWindows8(AButton: TBCButton; cl1, cl2: TColor);
+begin
+  AButton.Rounding.RoundX := 1;
+  AButton.Rounding.RoundY := 1;
+  AButton.RoundingDropDown.Assign(AButton.Rounding);
+
+  with AButton.StateNormal do
+  begin
+    Background.Style := bbsColor;
+    Background.Color := cl1;
+    Border.Style := bboSolid;
+    Border.Width := 1;
+    Border.Color := cl1;
+    Border.LightWidth := 0;
+    Border.LightOpacity := 255;
+    Border.Style := bboSolid;
+    FontEx.Color := clWhite;
+    FontEx.Shadow := False;
+    FontEx.Style := [];
+  end;
+
+  AButton.StateHover.Assign(AButton.StateNormal);
+  AButton.StateClicked.Assign(AButton.StateNormal);
+
+  with AButton.StateHover do
+  begin
+    Background.Color := cl2;
+    Border.Color := cl2;
+  end;
+
+  with AButton.StateClicked do
+  begin
+    Background.Color := cl2;
+    Border.Color := cl2;
+  end;
+end;
+
+{ For button focus }
+procedure BCButtonWindows8(AButton: TBCButtonFocus; cl1, cl2: TColor);
+begin
+  AButton.Rounding.RoundX := 1;
+  AButton.Rounding.RoundY := 1;
+  AButton.RoundingDropDown.Assign(AButton.Rounding);
+
+  with AButton.StateNormal do
+  begin
+    Background.Style := bbsColor;
+    Background.Color := cl1;
+    Border.Style := bboSolid;
+    Border.Width := 1;
+    Border.Color := cl1;
+    Border.LightWidth := 0;
+    Border.LightOpacity := 255;
+    Border.Style := bboSolid;
+    FontEx.Color := clWhite;
+    FontEx.Shadow := False;
+    FontEx.Style := [];
+  end;
+
+  AButton.StateHover.Assign(AButton.StateNormal);
+  AButton.StateClicked.Assign(AButton.StateNormal);
+
+  with AButton.StateHover do
+  begin
+    Background.Color := cl2;
+    Border.Color := cl2;
+  end;
+
+  with AButton.StateClicked do
+  begin
+    Background.Color := cl2;
+    Border.Color := cl2;
+  end;
+end;
+
+procedure TForm1.FormShow(Sender: TObject);
+begin
+  { Set some default theme to theme manager }
+  BCButtonWindows8(BCDefaultThemeManager1.Button, clNavy, clGray);
+  BCButtonWindows8(BCDefaultThemeManager1.ButtonFocus, clNavy, clGray);
+
+  { Apply to all buttons in this form }
+  BCDefaultThemeManager1.Apply();
+
+  BCNumericKeyboard1.Panel.Left:=200;
+  BCNumericKeyboard1.Panel.Top:=10;
+  BCNumericKeyboard1.Show();
+
+  BCRealNumericKeyboard1.Panel.Left:=200;
+  BCRealNumericKeyboard1.Panel.Top:=BCNumericKeyboard1.Panel.Top+BCNumericKeyboard1.Panel.Height+10;
+  BCRealNumericKeyboard1.Show();
+end;
+
+end.
+