EtheaDev / StyledComponents

Components similar to Delphi VCL Buttons, Toolbar, DbNavigator, BindNavigator, ButtonGroup and CategoryButtons with Custom Graphic Styles, and an advanced, full-customizable TaskDialog, also with animations!
Apache License 2.0
152 stars 34 forks source link

VCL.StandardButtonStyles #22

Closed lancerasmussen closed 2 months ago

lancerasmussen commented 2 months ago

Important to note that when making custom styles or getting 3rd party styles, that this unit is updated with the latest styles, or when pressing a button, the component will crash.

I haven't got too deep in checking colors and with 3rd party styles, but here are some missing ones.

RegisterThemeAttributes('CDE Frost: Blue',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('CDE Frost: Teal',ttDark,clWhite,clWhite,
  htmlToColor('#3F506D'),htmlToColor('#5172EF'),
  htmlToColor('#3F506D'),htmlToColor('#5172EF'),btRoundRect);
RegisterThemeAttributes('CDE: Golden Graphite',ttDark,clWhite,clWhite,
  htmlToColor('#3F506D'),htmlToColor('#5172EF'),
  htmlToColor('#3F506D'),htmlToColor('#5172EF'),btRoundRect);
RegisterThemeAttributes('CDE Graphite: Blue',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('CDE Graphite: Teal',ttDark,clWhite,clWhite,
  htmlToColor('#3F506D'),htmlToColor('#5172EF'),
  htmlToColor('#3F506D'),htmlToColor('#5172EF'),btRoundRect);
RegisterThemeAttributes('CDE Impressive: Dark',ttDark,clWhite,clWhite,
  htmlToColor('#3F506D'),htmlToColor('#5172EF'),
  htmlToColor('#3F506D'),htmlToColor('#5172EF'),btRoundRect);
RegisterThemeAttributes('CDE Impressive: Light',ttLight,clBlack,clWhite,
  htmlToColor('#CAD4E6'),htmlToColor('#5172EF'),
  htmlToColor('#CAD4E6'),htmlToColor('#5172EF'),btRoundRect);
 RegisterThemeAttributes('CDE Modern: Dark',ttDark,clWhite,clWhite,
  htmlToColor('#3F506D'),htmlToColor('#5172EF'),
  htmlToColor('#3F506D'),htmlToColor('#5172EF'),btRoundRect);
RegisterThemeAttributes('CDE Modern: Light',ttLight,clBlack,clWhite,
  htmlToColor('#CAD4E6'),htmlToColor('#5172EF'),
  htmlToColor('#CAD4E6'),htmlToColor('#5172EF'),btRoundRect);
RegisterThemeAttributes('Raize Frost : Blue',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Frost : Green',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Frost : Orange',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Frost : Purple',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Frost : Red',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Frost : Teal',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Frost : Yellow',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Graphite : Blue',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Graphite : Green',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Graphite : Orange',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Graphite : Purple',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Graphite : Red',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Graphite : Teal',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
RegisterThemeAttributes('Raize Graphite : Yellow',ttDark,clWhite,clWhite,
  htmlToColor('#084f8a'),htmlToColor('#084f8a'),
  htmlToColor('#084f8a'),clWhite,btRect);
carloBarazzetta commented 2 months ago

Thanks, I can add also those Styles... Are they 3rd party styles? How do you suggest fixing the crash? Do a falldown using the active style?

lancerasmussen commented 2 months ago

Yes. 3rd Party. This is another group of styles I use that is 3rd party, that I've not attempted to implement in your component.

https://www.delphistyles.com/vcl/index.html

lancerasmussen commented 2 months ago

I would suggest a falldown to the active style. There may be cases, like us, who may take a 3rd party style and modify it and rename to not be a conflict. So it would not be in your component.

carloBarazzetta commented 2 months ago

I cannot reproduce the problem: in the library there is a StyleFamilyCheckAttributes function that already make a falldown to the default Class or Style... how can I reproduce your issue?

carloBarazzetta commented 2 months ago

Added those styles in 3.6.1 version

lancerasmussen commented 2 months ago

I'll check with 3.6.1. If you copy one of the Emb styles and then use the bitmap editor to edit that copy and change the name of the style to something different, say Test: Style1 and then save it, then try to use Test: Style 1 in the demo app. When it sees that style and not in the list, the error occurs.

carloBarazzetta commented 2 months ago

Please specify the error message... I've created a Test.vsf Style and used in a StyleButton as in this picture... image But I've not received an error...