StyledComponents icon indicating copy to clipboard operation
StyledComponents copied to clipboard

VCL.StandardButtonStyles

Open lancerasmussen opened this issue 1 year ago • 4 comments

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);

lancerasmussen avatar Jul 26 '24 00:07 lancerasmussen

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?

carloBarazzetta avatar Jul 26 '24 13:07 carloBarazzetta

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 avatar Jul 26 '24 18:07 lancerasmussen

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.

lancerasmussen avatar Jul 26 '24 18:07 lancerasmussen

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 avatar Jul 30 '24 09:07 carloBarazzetta

Added those styles in 3.6.1 version

carloBarazzetta avatar Jul 31 '24 20:07 carloBarazzetta

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.

lancerasmussen avatar Jul 31 '24 21:07 lancerasmussen

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...

carloBarazzetta avatar Aug 03 '24 07:08 carloBarazzetta