Author Topic: Multi theme controls  (Read 818 times)

Tomxe

  • Full Member
  • ***
  • Posts: 163
Multi theme controls
« on: August 23, 2026, 12:29:44 pm »
XelUI is a package available in OPM. It offers multiple different controls, all themeable.

Tomxe

  • Full Member
  • ***
  • Posts: 163
Re: Multi theme controls
« Reply #1 on: August 23, 2026, 12:30:22 pm »
More screenshots

AlexTP

  • Hero Member
  • *****
  • Posts: 2738
    • UVviewsoft
Re: Multi theme controls
« Reply #2 on: August 23, 2026, 12:39:29 pm »
Maybe you can make a new page https://wiki.freepascal.org/XelUI and there write the full list of included controls. Panel? Groupbox? Button? Calendar? etc.

Tomxe

  • Full Member
  • ***
  • Posts: 163
Re: Multi theme controls
« Reply #3 on: August 23, 2026, 01:11:38 pm »
I added a page.

Thaddy

  • Hero Member
  • *****
  • Posts: 19805
  • Glad to be alive.
Re: Multi theme controls
« Reply #4 on: August 23, 2026, 02:20:39 pm »
Two remarks:
- A slight quirk: if I install XelComponents/XelControls too there is a duplicate unit warning
- Examples on how to handle theming.
Any "programmer" that knows only one programming language is not a programmer

Ed78z

  • Jr. Member
  • **
  • Posts: 76
Re: Multi theme controls
« Reply #5 on: August 24, 2026, 07:25:12 am »
Beautiful!
I guess it's easier to select themes by a combo box
Light
Dark
Dark gray
Colorful
....

Also, you may add the "Accent" feature... I implemented it in the TDWEdit...

Great job 👏

Tomxe

  • Full Member
  • ***
  • Posts: 163
Re: Multi theme controls
« Reply #6 on: August 24, 2026, 12:22:34 pm »
I don't know what you mean by "accent" and TDWEdit is nowhere to be found.

Ed78z

  • Jr. Member
  • **
  • Posts: 76
Re: Multi theme controls
« Reply #7 on: August 24, 2026, 04:24:25 pm »
I don't know what you mean by "accent" and TDWEdit is nowhere to be found.
Oh, The TDWEdit is one of my components that I shared last year here, like TQButton, TQToggleSwitch, ....
TDWEdit (https://forum.lazarus.freepascal.org/index.php/topic,71946.msg570444.html#msg570444)
TQButton (https://forum.lazarus.freepascal.org/index.php/topic,74507.msg587805.html#msg587805)
TQToggleSwitch (https://forum.lazarus.freepascal.org/index.php/topic,74507.msg587857.html#msg587857)

Basically, the Accent color is a core factor of the theme. While the base theme dictates the passive structural colors (like backgrounds and text), the Accent color acts as the anchor for interactivity. It highlights active or selected elements and serves as the baseline to generate colors for states like Hover and Pressed.

For example, see the pressed color of the horizontal scroll bar and the selected text highlight in the TDWEdit in the attached screenshots:

JohnJ

  • Newbie
  • Posts: 5
Re: Multi theme controls
« Reply #8 on: August 24, 2026, 07:05:49 pm »
This is really nice, great job!

wp

  • Hero Member
  • *****
  • Posts: 13666
Re: Multi theme controls
« Reply #9 on: August 24, 2026, 08:11:03 pm »
[...]TDWEdit is nowhere to be found.
Oh, The TDWEdit is one of my components that I shared last year here, like TQButton, TQToggleSwitch, ....
TDWEdit (https://forum.lazarus.freepascal.org/index.php/topic,71946.msg570444.html#msg570444)
TQButton (https://forum.lazarus.freepascal.org/index.php/topic,74507.msg587805.html#msg587805)
TQToggleSwitch (https://forum.lazarus.freepascal.org/index.php/topic,74507.msg587857.html#msg587857)
The links that you give here point to your personal Google Drive. Of course, you can publish your work in any way you like, but nowadays code is published on git servers (GitHub, GitLab, CodeBerg, and probably some more) (or svn on SourceForge.net) so that everybody who has ideas or found bugs can send you patches or pull requests - this is OpenSource at its best... And for yourself the big advantage is that you have version control, i.e. you can always switch back to any previously committed version without losing anything. A bit learning required, though, but there are lots of tutorials on the internet. If you are on Windows use TortoiseGIT, a great GUI for the myriads of git commands and their options: The few items it adds to the Explorer context menu are all you need in practice.

When your component(s) have reached some stable state you should also think about releasing them to the Online-Package-Manager of Lazarus (OPM, https://wiki.lazarus.freepascal.org/Online_Package_Manager) where users need only a single click to install them. The requirements for OPM are:
- you must be willing to maintain your submission (we are only distributing it)
- your components must be put into Lazarus packages
- you must make a statement about the license
- you must send an e-mail to opm-at-lazarus-ide.org containing a brief description of the submission and a zip file with the package (or a link to some web storage of it). After reviewing I upload the package to OPM.
- for learning how to use the package it should contain some documentation and/or sample project(s) besides the main component code.

Ed78z

  • Jr. Member
  • **
  • Posts: 76
Re: Multi theme controls
« Reply #10 on: August 24, 2026, 10:15:19 pm »
Thank you, WP, for your detailed explanation. You are right! I don't know how to set up version control environments like GitHub. I'm just an electrical engineer working on my own projects as a hobby.

In the past, my focus was exclusively on Windows. I developed the QControl package, which included TDWEdit (an advanced text editor component based on Windows DirectWrite).

I abandoned it, even though 90% of the entire QControl package was already developed.

Now, I am working on developing the QSkControl package, which includes TSkiaEdit as a replacement for TDWEdit, but with more features such as shapes, tables, and advanced text effects. I made this switch because Google's Skia is cross-platform (Windows, Linux, macOS, Android), allowing it to be used across various operating systems.

At the moment, I am sharing my component from time to time to collect feedback and apply it to the final QSkControl package. I will share my entire QSkControl package as soon as I complete it.

Again, I appreciate your feedback; you are completely right. My bad! :)

Tomxe

  • Full Member
  • ***
  • Posts: 163
Re: Multi theme controls
« Reply #11 on: August 25, 2026, 08:11:18 am »
The simplest way to use Github:
- register on Github
- go to:
https://github.com/YOUR_NAME?tab=repositories
and click green "New" button
- go to that repository:
https://github.com/YOUR_NAME/REPOSITORY_NAME/upload/main
- drag & drop your files here
- commit (green button on the bottom)

 

TinyPortal © 2005-2018