Recent

Author Topic: BGRA Controls  (Read 165223 times)

lainz

  • Hero Member
  • *****
  • Posts: 3924
  • Leandro Diaz
Re: BGRA Controls
« Reply #435 on: November 14, 2020, 03:30:02 pm »
Thankyou!

I've implemented the BGRA SVG Image List, is not compatible with TImageList, but it will be useful for new SVG controls.
« Last Edit: November 14, 2020, 03:31:42 pm by lainz »

lainz

  • Hero Member
  • *****
  • Posts: 3924
  • Leandro Diaz
Re: BGRA Controls
« Reply #436 on: November 23, 2020, 10:54:51 pm »
Posting here to see my new SVG avatar. Looks really nice.
Hope we can release soon the svg controls are ready to use. I'm not using them but maybe I can use that in some project some day.

circular

  • Hero Member
  • *****
  • Posts: 3645
    • Personal webpage
Re: BGRA Controls
« Reply #437 on: November 24, 2020, 12:24:34 am »
I am fixing a few things related to coordinates. That's so complicated.  %)

But I think I am close to getting it right.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3924
  • Leandro Diaz
Re: BGRA Controls
« Reply #438 on: November 24, 2020, 12:59:55 am »
I found some other thing not sure if related. When I create 1px border with inkscape is not 1px in the svg controls. But it is 1px in chrome.

I think it has to do with the units and the zoom factor. I need to change it as I shown in the github issue to work fine.

It's easy to test just create a new inkscape document with the default settings then draw a rectangle with a border of 1px. Align to perfect pixel coordinates so there is no antialiasing when drawn. In chrome its 1px, when drawn by bgrabitmap is not 1px is blurred.

Edit: tested it right now and seems that you already fixed it, cool so no extra inkscape settings to setup now, the units can be in millimeters or any.
« Last Edit: November 24, 2020, 01:33:41 am by lainz »

OkobaPatino

  • Full Member
  • ***
  • Posts: 191
Re: BGRA Controls
« Reply #439 on: November 24, 2020, 08:11:22 am »
I think an excellent use case will be LazPaint.

lainz

  • Hero Member
  • *****
  • Posts: 3924
  • Leandro Diaz
Re: BGRA Controls
« Reply #440 on: November 28, 2020, 04:29:29 am »
New BGRA Controls v7.1
https://github.com/bgrabitmap/bgracontrols/releases/tag/v7.1

Repository:
- Fix gitignore for macOS

Button:
- BCButton fix loading from json
- BCButton image list for retina display and glyph for retina display

ComboBox:
- BCComboBox fixes for macOS

SVG Themes:
- Added SVG Theme
- Added SVG Image List
- Fix ThemeButton applied style in special cases

BCButton is now more retina display compatible, continuing the retina changes from the last release.

Now we have SVG Themes: button, checkbox and radiobutton. You can customize the theme with your own SVG's, color and size properties. Full retina / high dpi compatible.

The new image list can be used with the ThemeButton component to have SVG icon. As well you can draw to canvas or get the bitmap. Full retina / high dpi compatible.

It requires BGRABitmap v11.3
« Last Edit: November 28, 2020, 04:32:31 am by lainz »

circular

  • Hero Member
  • *****
  • Posts: 3645
    • Personal webpage
Re: BGRA Controls
« Reply #441 on: November 28, 2020, 11:27:13 am »
That's great  8)

Vector power  :-*
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3924
  • Leandro Diaz
Re: BGRA Controls
« Reply #442 on: November 28, 2020, 11:50:49 am »
That's great  8)

Vector power  :-*

Yes is really nice. Also I just tested and I'm using an image embedded in the SVG file as well for the button, so it works for checkbox and radiobutton as well =) We have the image theme and the SVG theme all in one.

circular

  • Hero Member
  • *****
  • Posts: 3645
    • Personal webpage
Re: BGRA Controls
« Reply #443 on: November 28, 2020, 12:29:29 pm »
Indeed.  :)
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3924
  • Leandro Diaz
Re: BGRA Controls
« Reply #444 on: December 05, 2020, 03:14:34 pm »
A tutorial about BGRAControls I found on YouTube:

Spanish version
https://www.youtube.com/watch?v=ZMKV4r4XvGU&t

Portuguese version
https://www.youtube.com/watch?v=NNbE557ZOgw

Is to create a glass like panel with BGRAGraphicControl and using anchors to move the controls when you move the BGRAGraphicControl.
« Last Edit: December 05, 2020, 03:16:47 pm by lainz »

circular

  • Hero Member
  • *****
  • Posts: 3645
    • Personal webpage
Re: BGRA Controls
« Reply #445 on: December 05, 2020, 09:07:34 pm »
Great  :)

That's a good use of anchors to controls.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3924
  • Leandro Diaz
Re: BGRA Controls
« Reply #446 on: December 12, 2020, 05:44:13 am »
I had no idea about that anchor feature. :-[

circular

  • Hero Member
  • *****
  • Posts: 3645
    • Personal webpage
Re: BGRA Controls
« Reply #447 on: December 12, 2020, 02:08:46 pm »
Basically it is a bit like Anchors (akLeft, akTop etc.) but you can specify a control instead of the form border.
Conscience is the debugger of the mind

lucamar

  • Hero Member
  • *****
  • Posts: 3432
Re: BGRA Controls
« Reply #448 on: December 12, 2020, 03:00:37 pm »
Basically it is a bit like Anchors (akLeft, akTop etc.) but you can specify a control instead of the form border.

That's how normal Anchors work too, isn't it? Only you have to use either the Anchor Editor or set it in code (with AnchorSideTop/-Left/-Right/-Bottom, or AnchorSide[], etc.)

Excuse me if that was what you were referring to; it was not clear for me (I can be a little slow at times :-[).
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.10/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

lainz

  • Hero Member
  • *****
  • Posts: 3924
  • Leandro Diaz
Re: BGRA Controls
« Reply #449 on: December 12, 2020, 03:37:54 pm »
Yes I think we're talking about 2 different properties.
https://wiki.freepascal.org/Anchor_Sides

Like Anchors (akLeft akTop) and AnchorSide (that uses akLeft akTop as well, but it uses a control).

 

TinyPortal © 2005-2018