Recent

Author Topic: BGRA Controls  (Read 222255 times)

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: BGRA-Controls
« Reply #150 on: April 11, 2016, 09:15:23 pm »
Yes, makes sense.  8-)
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #151 on: April 13, 2016, 08:16:23 pm »
Added on SVN:
- BCRadialProgressBar

ToDo:
- Add all properties for text, shadows, colors, etc.

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: BGRA-Controls
« Reply #152 on: April 13, 2016, 10:14:20 pm »
Wow, that's neat!
Conscience is the debugger of the mind

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: BGRA-Controls
« Reply #153 on: April 14, 2016, 01:52:17 am »
Very nice.
Happy to see you after a while lainz.

coasting

  • New member
  • *
  • Posts: 9
Re: BGRA-Controls
« Reply #154 on: April 15, 2016, 08:13:11 pm »
Hey guys

one of the previous releases contained a unit called "Ribbon". I can only guess that it got designed as a starter for a new Ribbon Component based on BGRA controls. Unfortunately it was never completed and at some point got kicked out of the recent releases. As I like the new flat style of MS Office 2016 very much, I prepared a project template based on this unit. You can find sources and a screenshot here -> http://www.lazarusforum.de/viewtopic.php?f=29&t=9582 If you like you can put it into SVN and distribute it with the BGRA controls as an additional example...

coasting


lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #155 on: April 15, 2016, 09:11:42 pm »
Hi coasting, you can upload it here, since I have no account in lazarusforum.de

coasting

  • New member
  • *
  • Posts: 9
Re: BGRA-Controls
« Reply #156 on: April 15, 2016, 10:22:42 pm »
Here you are... ;)

...but couldn't upload an executable as file size is limited to 250kb..?

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: BGRA-Controls
« Reply #157 on: April 15, 2016, 10:38:23 pm »
Unit uresize.pas contains a copyright and license text which could cause problems. The unit doesn't look too complicated. Can't you replace it with a unit written by yourself? Or can you drop it? It looks as if it is not called at all.
« Last Edit: April 15, 2016, 10:47:10 pm by wp »

coasting

  • New member
  • *
  • Posts: 9
Re: BGRA-Controls
« Reply #158 on: April 15, 2016, 10:44:24 pm »
Unit uresize.pas contains a copyright and license text which could cause problems. The unit doesn't look too complicated. Can't you replace it with a unit written by yourself?

Yes I could, but it's actually not needed. You can cut it out from the project. I added it as an option to resize the form from all borders.

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: BGRA-Controls
« Reply #159 on: April 16, 2016, 12:35:04 am »
Here you are... ;)

...but couldn't upload an executable as file size is limited to 250kb..?

That is beautiful. Well done! Does it render the same on Linux? I can't test it myself right now.

JD
« Last Edit: April 16, 2016, 12:37:02 am by JD »
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #160 on: April 16, 2016, 02:09:06 am »
Thanks, now it's added to SVN under test folder.

Amazing work!

I've added a copy of the boost license into docs folder too, for uresize.pas (anyone can check the license and see if can use it or not, BTW license is very permissive).

coasting

  • New member
  • *
  • Posts: 9
Re: BGRA-Controls
« Reply #161 on: April 16, 2016, 12:06:10 pm »

That is beautiful. Well done! Does it render the same on Linux? I can't test it myself right now.

JD

It does! The borderless form is even resized and painted by the system routines. However I am not sure with the buttons... I tested it with Lazarus 1.2.4 on Ubuntu. It compiled without errors, but for whatever reason the big button images are not painted. Another point that needs to be checked is the slide- in/out of the menu. On Windows its looks nicely but on Linux its a bit weird...

coasting

  • New member
  • *
  • Posts: 9
Re: BGRA-Controls
« Reply #162 on: April 16, 2016, 12:13:46 pm »
Thanks, now it's added to SVN under test folder.

Amazing work!

I've added a copy of the boost license into docs folder too, for uresize.pas (anyone can check the license and see if can use it or not, BTW license is very permissive).

Perfect ;) It's still a work in progress and will post updates from time to time in this thread.

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: BGRA-Controls
« Reply #163 on: April 17, 2016, 09:07:08 pm »
This app looks beautiful.  :)

Regarding the sliding, I would suggest to use a timer with 15 ms and to determine the actual elapsed time in an accumulator.

Code: Delphi  [Select][+][-]
  1. uses DateUtils;
  2.  
  3. var
  4.   PrevTime: TDateTime;
  5.   AccTimeMs: Int64;
  6.  
  7. procedure TfrmMain.Timer1Timer(Sender: TObject);
  8. const TimeGrain = 15;
  9. var NewTime: TDateTime;
  10.   StepsToDo: Int64;
  11. begin
  12.   Timer1.Enabled := false;
  13.   if PrevTime <> 0 then
  14.   begin
  15.     NewTime := Now;
  16.     AccTimeMs += MilliSecondsBetween(PrevTime, NewTime);
  17.     PrevTime := NewTime;
  18.   end;
  19.   StepsToDo := trunc(AccTimsMs/TimeGrain);
  20.   AccTimeMs -= TimeGrain*StepsToDo;
  21.   AnimationProc(StepsToDo);  //your procedure to animate the content
  22.   Timer1.Enabled := true;
  23. end;  
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #164 on: April 30, 2016, 01:03:06 am »
Thanks circular, you can add this directly into the demo and upload it here?

In SVN I've changed BGRABitmapPack to the lcl opengl one, so in the future there's no problem on installing the bgra opengl package and bgra controls.

 

TinyPortal © 2005-2018