Recent

Author Topic: SVG Controls  (Read 405 times)

lainz

  • Hero Member
  • *****
  • Posts: 3809
  • Leandro Diaz
SVG Controls
« on: November 07, 2020, 08:31:40 pm »
Hi, with circular we're making SVG Theme for BGRAControls =)

Currently we have 3 controls, button, checkbox and radiobutton that uses SVG resources to draw.

You drop a TBGRASVGTheme component, copy and paste the SVG text directly in the object inspector for each control. Then you assign a control the desired theme (you can have multiple themes as well, each one with different resources).

Here a screenshot of the default theme, as well some nice checkboxes downloaded from internet.

These controls are full retina display compatible and high dpi, you don't need to configure nothing.

Edit: How to make pixel perfect icons with Inkscape
https://github.com/bgrabitmap/bgracontrols/issues/94#issuecomment-723493841
« Last Edit: November 07, 2020, 11:36:06 pm by lainz »
https://lainz.github.io/
Download LazPaint https://lazpaint.github.io/
Download BGRABitmap and BGRAControls https://github.com/bgrabitmap

OkobaPatino

  • Full Member
  • ***
  • Posts: 171
Re: SVG Controls
« Reply #1 on: November 08, 2020, 08:30:48 am »
Nice idea, Lainz. I like the idea very much, and it looks good with a clean code.
I tried your test in the issue, but it has a problem with the CheckBoxUnChecked value. You talked about that, but I didn't find an updated test. Can you commit or attach it?

circular

  • Hero Member
  • *****
  • Posts: 3573
    • Personal webpage
Re: SVG Controls
« Reply #2 on: November 08, 2020, 01:04:46 pm »
« Last Edit: November 08, 2020, 01:06:24 pm by circular »
Conscience is the debugger of the mind

OkobaPatino

  • Full Member
  • ***
  • Posts: 171
Re: SVG Controls
« Reply #3 on: November 08, 2020, 04:56:06 pm »
Thanks. it works just fine.

lainz

  • Hero Member
  • *****
  • Posts: 3809
  • Leandro Diaz
Re: SVG Controls
« Reply #4 on: November 08, 2020, 06:33:56 pm »
Thanks for testing  :)
https://lainz.github.io/
Download LazPaint https://lazpaint.github.io/
Download BGRABitmap and BGRAControls https://github.com/bgrabitmap

 

TinyPortal © 2005-2018