Recent

Author Topic: Can I add a dark theme to my form?  (Read 5263 times)

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Can I add a dark theme to my form?
« Reply #30 on: April 28, 2022, 08:48:52 pm »
Dark theme, dark theme...
Did anyone note that at paweld's picture PageControl is drawn inconsistently with other controls? And black font on dark grey background is almost unreadable?

That's because he uses fusion theme, not windows one with dark colors

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: Can I add a dark theme to my form?
« Reply #31 on: April 28, 2022, 10:01:53 pm »
anyone has a tutorial how t use qt5 in Lazarus (video/ text with photos )
small instruktion to make lazarus dark: https://forum.lazarus.freepascal.org/index.php/topic,55550.msg435622.html#msg435622

alaa123456789

  • Sr. Member
  • ****
  • Posts: 260
  • Try your Best to learn & help others
    • youtube:
Re: Can I add a dark theme to my form?
« Reply #32 on: April 30, 2022, 07:29:25 am »
In Lazarus ? Trivial, no tutorial needed.
In the project you are working on, Project->ProjectOption->AdditionsAndOverRides(down near bottom)->LCLWidgetType. Add qt5

If your project has several modes, do that for each.

But you will also have to install Qt5 libraries on your Windows box, thats possibly more of a task and one I cannot help with. Your  end user will also need the qt5 libraries by the way.

Davo
thanks Davo for the advice , i followed it , ad i added all qt dlls , qt5pas1.dll to same folder but i got the messagee as shown in capture.png
anyone has experience with this please help

thanks in advance

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Can I add a dark theme to my form?
« Reply #33 on: April 30, 2022, 07:38:51 am »
One thing to check is that the bitness of your Lazarus and the dlls is the same.
64-bit dlls will not work alongside a 32-bit executable.

alaa123456789

  • Sr. Member
  • ****
  • Posts: 260
  • Try your Best to learn & help others
    • youtube:
Re: Can I add a dark theme to my form?
« Reply #34 on: April 30, 2022, 07:45:22 am »
One thing to check is that the bitness of your Lazarus and the dlls is the same.
64-bit dlls will not work alongside a 32-bit executable.

is there any qt5pas1.dll x64 or only x32?


Gald

  • Full Member
  • ***
  • Posts: 107
Re: Can I add a dark theme to my form?
« Reply #35 on: April 30, 2022, 08:09:43 am »
Hello guys!

I downloaded this version:

https://download.qt.io/archive/qt/5.12/5.12.12/

The reason I choose 5.12.12 is because of this line of the readme.txt that came with Lazarus:
"They only work with qt5 >= 5.6.0 or superior."

But I'm having problems with these three missing DLLs on run the project:

  • qt5core.dll
  • qt5gui.dll
  • qt5network.dll

But I don't even have it on my computer.
What am I doing wrong?

Ps: the Wiki is completely outdated, including links and steps.
Lazarus 2.0.12 r64642 FPC 3.2.0 x86_64-win64-win32/win64/Manjaro KDE 21
AMD Ryzen 3 1300X Quad-Core Processor 3.50 GHz / 8,00 GB RAM / GTX 1500 TI / 2TB M.2 NVMe

paweld

  • Hero Member
  • *****
  • Posts: 970
Re: Can I add a dark theme to my form?
« Reply #36 on: April 30, 2022, 09:53:03 am »
After install qt-opensource-windows-x86-5.12.12.exe you have to copy the following files to the application directory:
- libgcc_s_dw2-1.dll
- libstdc++-6.dll
- libwinpthread-1.dll
- Qt5Core.dll
- Qt5Gui.dll
- Qt5Network.dll
- Qt5PrintSupport.dll
- Qt5Widgets.dll
With the default installation, the files are located in the directory: C:\Qt\Qt5.12.12\5.12.12\mingw73_32\bin\

And to subfolders:
* pluginsplatforms:
- qminimal.dll
- qwindows.dll
z C:\Qt\Qt5.12.12\5.12.12\mingw73_32\plugins\platforms\

* pluginsstyles::
- qwindowsvistastyle.dll
z C:\Qt\Qt5.12.12\5.12.12\mingw73_32\plugins\styles\
Best regards / Pozdrawiam
paweld

tetrastes

  • Sr. Member
  • ****
  • Posts: 473
Re: Can I add a dark theme to my form?
« Reply #37 on: May 03, 2022, 10:49:00 pm »
Dark theme, dark theme...
Did anyone note that at paweld's picture PageControl is drawn inconsistently with other controls? And black font on dark grey background is almost unreadable?

That's because he uses fusion theme, not windows one with dark colors

Strange explanation. So this inconsistency is appropriate for Fusion theme? And what I have to write instead of
Code: Pascal  [Select][+][-]
  1. const
  2.   StyleName: WideString = 'Fusion';

to use "windows one with dark colors"?

P.S. And there is another badly looking inconsistency: arrows in ListBox scroll bar are black, while arrow in ComboBox is white.
« Last Edit: May 03, 2022, 11:06:39 pm by tetrastes »

 

TinyPortal © 2005-2018