Recent

Author Topic: ATFlatControls  (Read 20008 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
ATFlatControls
« on: April 13, 2015, 03:10:02 am »
ATFlatControls is set of custom-drawn flat controls.
https://github.com/Alexey-T/ATFlatControls
Components here:

*    ATButton: custom-drawn button: http://wiki.freepascal.org/ATButton
*    ATFlatToolbar: toolbar based on ATButton: http://wiki.freepascal.org/ATFlatToolbar
*    ATListbox: custom-drawn listbox: http://wiki.freepascal.org/ATListbox
*    ATGauge: progress indicator like in Delphi7: http://wiki.freepascal.org/ATGauge
*    ATScrollbar: most powerful custom-drawn scrollbar: http://wiki.freepascal.org/ATScrollBar
*    ATStatubar: custom-drawn statusbar, no IDE designer support: http://wiki.freepascal.org/ATStatusBar

Simple controls:

*    ATLinkLabel: label which shows clickable URL: http://wiki.freepascal.org/ATLinkLabel
*    ATPanelSimple: simple TCustomControl child, no caption/border
*    ATPanelColor: simple TCustomControl child, with caption/color/bordercolor/borderwidth
« Last Edit: January 16, 2018, 06:15:03 pm by Alextp »

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATSimpleButton
« Reply #1 on: April 13, 2015, 05:15:06 pm »
Colors/fontname are inside "theme" now for all btns:

Code: [Select]
var
  BtnTheme: TATButtonTheme;

type
  TATButtonTheme = record
    FontName: string;
    FontSize: integer;
    FontStyles: TFontStyles;
    ColorFont,
    ColorBgPassive,
    ColorBgOver,
    ColorBgChecked,
    ColorBorderPassive,
    ColorBorderOver: TColor;
    MouseoverBorderWidth: integer;
    PressedBorderWidth: integer;
    PressedCaptionLower: integer;
  end;

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: ATSimpleButton
« Reply #2 on: April 13, 2015, 05:48:12 pm »
You can use TPersistent instead of record. It has one adventage: record cannot be published but subclass TPersistent can, and it will appear in OI.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATSimpleButton
« Reply #3 on: April 13, 2015, 08:46:52 pm »
Blaazen
Hm, TPersistent not needed, I have *global var* (record), not a class member.

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: ATSimpleButton
« Reply #4 on: April 13, 2015, 09:04:39 pm »
You are not planning to make some set of your visual components (*.lpk) which should be installed to Lazarus component palette?
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATSimpleButton
« Reply #5 on: April 13, 2015, 09:16:03 pm »
Added LPK file now. It 's ok in IDE, OnClick can be set

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATSimpleButton
« Reply #6 on: July 31, 2015, 02:43:23 pm »
Button code update.
+ colors "font/bg disabled"
- fix: OnClick must call after Checked change

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATButton
« Reply #7 on: July 21, 2016, 01:35:54 am »
ATButton update:

- prop Flat (set False to make look like toolbar btn)
- prop ImageList
- prop ImageIndex

demo look, flat buttons at rgt - see file.
« Last Edit: July 21, 2016, 01:37:33 am by Alextp »

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: ATButton
« Reply #8 on: July 21, 2016, 09:37:27 am »
+1 like

Downloaded and tested. Nice!

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATButton
« Reply #9 on: July 21, 2016, 04:29:42 pm »
Added ATButtonsToolbar, it can paint | and "v"




AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATButton
« Reply #10 on: January 04, 2017, 04:53:17 am »
Now ATButtonToolbar items have styles

-usual btn
-button with icon
-only arrow down
-text + arrow down
-separator


lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: ATButton
« Reply #11 on: January 04, 2017, 05:43:40 am »
Nice components!

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATButton
« Reply #12 on: March 17, 2017, 01:54:57 am »
Update

ATButtonsToolbar has property KindVertical, to paint/align buttons in vertical row
Screenshot of demo:


AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATFlatControls
« Reply #13 on: November 08, 2017, 12:25:59 pm »
Rewritten 1st post.
ATFlatControls is new name for several controls package: ATButton, ATListbox, etc, see 1st post.
They are used in CudaText.

Will post here updates about these controls.

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATFlatControls
« Reply #14 on: November 08, 2017, 03:16:48 pm »
Update to ATStatusbar:
- can set FontColor, BackColor for each panel. Demo_statusbar shows it.
- can set Images (for statusbar) and ImageIndex for each panel.

 

TinyPortal © 2005-2018