Forum > Third party

New controls to use with SpkToolbar

(1/1)

1-berto:
Hi, guys.

I wrote a lib for use with SpkToolbar ribbon menu. Its a personal project that i want to share with some one brave, who want to make a themed
application. The lib is a package "SpkControls", is a minimal set of controls for "connect" with your SpkToolbar in main window and use the menu
appearance to draw this set of control according the defined colors/corners. The idea is turn the LCL application retro/y2k or 
flat interface with a minimal effort. There is an exception of Scrollbars and edit boxes because its is very painful to do, and at some point is
important to keep it native for OS gui features.
 

I love the pure LCL/native controls, but for some kind of applications this interface look like "tired" or old-school, mainly for the generation Z
or people that had a digital education by cell phone or modern web. I personally dont care about this shit, but i dont develop softwares only for my self.
That's my idea for a new interface with some customization without reeinvent the wheel. The SpkControls have a few options and is not deveped to be
complex and complete in features. For some controls, a just copyed the draw code of SpkToolbar for identical appearence and some are original, using the SpkToolbar draw methods. The controls are not related to SpkToolbar Project, they just use the draw methods and the menu itself as draw metric source.



The initial version of the project i had a problem with the corner of controls. The controls looks like cutted down,
then i solve copying the background(parent) and painting above the background copy. This solution don't turn the controls heavy but may be
not a good choice to develop a legacy control that need very much repaint calls.
For beyond this question, the controls are good in general use for desktop applications with limitations of design of SpkToolbar, like a height of controls limited to keep the cohesive visual. I had some problems with dark colors, but its about appearance choices not a bug or limitation. Its very easy to create variants of the controls with minimal work and compose new ones. There is a Readme file to assist and the license is the same of SpkToolbar, so you can do anything you usually do with SpkToolbar. I only advice to never pack or redistribute the controls together, because they are written by distint people and i don't know if the SpkToolbar authors would like this association. I took the caution to choose another pallete to install the controls in Lazarus, that remember you this is an another project, but you may use this pallete if you want, to derivated projects or new inherited controls.



The lazarus package is available in some internet repositories.
Any fix or further version is updated only for gitlab and codeberg. I will update in gitlab untill they force me to use 2FA, then i leave.
The best source is codeberg to check updates.



* * I have tested for Lazarus 3.6/FPC3.2.2; Not yet for Lazarus 4 series.


https://github.com/1-berto/SpkControls
https://gitlab.com/1-berto/spkcontrols
https://codeberg.org/1-berto/spkcontrols


👍 Enjoy !

wp:
Excellent work! Thanks for contributing. When your work has reached some kind of stable state send a mail to opm@lazarus-ide.org and I'll take care of adding the package to the online-package-manager.

Tested with Laz/main + FPC/3.22 (Windows 11) - running fine.

There seems to be an issue with vertical scaling of some dimensions. Compiling the demo at 96ppi and running it on 96ppi and 144ppi system shows that, for example, the distance between the top of the first and last tree nodes is about 160px at 96ppi and about 350ppi at 155ppi - it should be 240ppi (150% of 160). Similar effect for the height of the grid's fixed cells and the height of the "List item 1". I am attaching screenshots.

Navigation

[0] Message Index

Go to full version