Recent

Author Topic: BGRA Custom Drawn controls  (Read 6253 times)

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
BGRA Custom Drawn controls
« on: August 31, 2016, 11:42:59 pm »
Hi, In Git of BGRAControls
https://github.com/bgrabitmap/bgracontrols/tree/master/test/test_bgracustomdrawn

You can test BGRA Custom Drawn pallete, it has by now:
- Button
- Edit
- SpinEdit (by default it uses the same style as edit, but it doesn't style the up & down buttons, it should be changed in Custom Drawn first)
- ProgressBar
- Label

And in the test project also there is a ToolBar with custom theme.

It is to show the capabilities of BGRA Controls and Custom Drawn together.

Hope I can add more themed controls to the list!

I need a screenshot of this running on Mac and Linux, because I have only windows, please send me one here if you have time. Thanks!

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: BGRA Custom Drawn controls
« Reply #1 on: September 01, 2016, 12:47:50 am »
x86_64-linux_qt attached, looks functional. Could this be used instead for people who still wants LCL to write mobile apps? LazAndroidModuleWizard might be the best ATM, but it's completely out of LCL tree, meaning that you can't share codes between desktop and mobile, not to mention it's Android only.

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: BGRA Custom Drawn controls
« Reply #2 on: September 01, 2016, 01:01:02 am »
x86_64-linux_qt attached, looks functional. Could this be used instead for people who still wants LCL to write mobile apps? LazAndroidModuleWizard might be the best ATM, but it's completely out of LCL tree, meaning that you can't share codes between desktop and mobile, not to mention it's Android only.

I don't know, is supossed that Custom Drawn controls works on android, but here i'm only inheriting them and some has only changed a color property on create, so basically you can reuse the drawer and use the regular custom drawn controls by now, and there are no difference.

I can't add custom properties and use them with the default drawer, so they're basically the same controls at this point.

I don't know if is OK to use this BGRABitmap package instead of the one that is BGRABitmapNoGui to work with android. Anyone can test it?

esvignolo

  • Full Member
  • ***
  • Posts: 159
  • Using FPC in Windows, Linux, Macos
Re: BGRA Custom Drawn controls
« Reply #3 on: September 01, 2016, 01:51:47 am »
On OSx, it works, but needs improvement. The colors as seen as in the image (not is related to compression of the attachment)

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: BGRA Custom Drawn controls
« Reply #4 on: September 01, 2016, 02:12:40 am »
That is sure a problem. Maybe related with the canvas, here im mixing canvas types. Edit: cant be bwcause ttoolbar is using normal canvas, is something about bgrabitmap.

Of course the DPI in osx is big than in Linux. In windows the scaling works properly but not in osx.. why?
« Last Edit: September 01, 2016, 02:14:32 am by lainz »

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: BGRA Custom Drawn controls
« Reply #5 on: September 01, 2016, 08:23:41 am »
Hmmm, so it would be possible to have only custom controls like that.  8-)
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: BGRA Custom Drawn controls
« Reply #6 on: September 01, 2016, 09:42:02 pm »
Yeah it's working :)

I found some bugs that I've reported in the bugtracker-

Added more controls, see attachment.

Okoba

  • Hero Member
  • *****
  • Posts: 533
Re: BGRA Custom Drawn controls
« Reply #7 on: September 05, 2016, 08:22:25 am »
Very good job, thank you Lainz.

 

TinyPortal © 2005-2018