Recent

Author Topic: Lazarus Dark Theme Windows  (Read 7604 times)

0x4A4D

  • Newbie
  • Posts: 3
Lazarus Dark Theme Windows
« on: December 14, 2023, 01:18:36 pm »
Recently, I was able to compile Lazarus with a dark theme on Windows 10 without using QT, thanks to this package: https://github.com/zamtmn/metadarkstyle.

Now, I want to see if it's possible to add this package to the default Lazarus packages in the original source. This way, in the next versions of Lazarus, its theme can be changed with the Windows theme without the need to install this package.

« Last Edit: December 14, 2023, 01:20:23 pm by 0x4A4D »

af0815

  • Hero Member
  • *****
  • Posts: 1381
Re: Lazarus Dark Theme Windows
« Reply #1 on: December 14, 2023, 02:13:23 pm »
Now, I want to see if it's possible to add this package to the default Lazarus packages in the original source.
No, i want not. It is for a special windowsversion/widgetset AND special Lazarus version.

There is no requirement to hold this in Lazarus sources. If you want you can ask the maintainer to support the package in OPM.
« Last Edit: December 14, 2023, 02:16:08 pm by af0815 »
regards
Andreas

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Lazarus Dark Theme Windows
« Reply #2 on: December 14, 2023, 08:43:25 pm »
No, i want not. It is for a special windowsversion/widgetset AND special Lazarus version.
I do not know what you mean with phrase "special", it works great on a basic windows with a basic lazarus installation, nothing special at all.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

zamtmn

  • Hero Member
  • *****
  • Posts: 646
Re: Lazarus Dark Theme Windows
« Reply #3 on: December 15, 2023, 11:38:37 am »
where can I read about adding metadarkstyle to OPM?

wp

  • Hero Member
  • *****
  • Posts: 12522
Re: Lazarus Dark Theme Windows
« Reply #4 on: December 15, 2023, 12:09:06 pm »
https://wiki.freepascal.org/Online_Package_Manager

Run OPM, go to "Options" > "Profiles" > "Select profile" > "Package maintainer". On the main screen, there is now a button "Create", select "Create repository package", navigate to the folder with your package files and fill the form. "Create" creates a zip with the package files as well as a JSON file with the package description. I never used the "Submit" button, so I can't tell whether the package files are sent to the OPM maintainer this way. But anyway, you can always contact GetMem directly by sending him a mail with the zip and json in the attachment: opm@lazarus-ide.org


zamtmn

  • Hero Member
  • *****
  • Posts: 646
Re: Lazarus Dark Theme Windows
« Reply #5 on: December 16, 2023, 09:28:01 am »
wp
Thanks! I will add it when the new version of Lazarus is released. Now, due to some difference in the composition of packages, we have to make 2 versions of matadarkstyle, for the trunk and for the Lazarus 2.2.6
Hopefully Lazarus 3.0 will fix this

wp

  • Hero Member
  • *****
  • Posts: 12522
Re: Lazarus Dark Theme Windows
« Reply #6 on: December 16, 2023, 12:28:47 pm »
I will add it when the new version of Lazarus is released. Now, due to some difference in the composition of packages, we have to make 2 versions of matadarkstyle, for the trunk and for the Lazarus 2.2.6
Hopefully Lazarus 3.0 will fix this
Hmm... Can't you merge the two versions into one, by using {$IFDEF LCL_FullVersion >= 3000000} directives for Laz 3.0+ and Laz 2.2.x in the {$ELSE} part?

zamtmn

  • Hero Member
  • *****
  • Posts: 646
Re: Lazarus Dark Theme Windows
« Reply #7 on: December 16, 2023, 01:24:07 pm »
No. the difference is in the composition of the packages. some IDE pas files have been separated into packages. These packets are present in the trunk, but they are not yet in 2.2.6
Yes, in the code, this can be controlled using {$IFDEF ...} But there are no mechanisms for managing this in dependencies
I come across this sometimes. For example, here https://forum.lazarus.freepascal.org/index.php/topic,57865.msg430713.html

wp

  • Hero Member
  • *****
  • Posts: 12522
Re: Lazarus Dark Theme Windows
« Reply #8 on: December 16, 2023, 02:49:34 pm »
Ah I see, I had fotgotten that your package introduces dark mode to the IDE. In this case, Laz3.0 will not resolve this issue, I compiled metadarkstyle and metadarkstyledsgn with 3.0RC2 - it works, but compilation of metadarkstyle226 with 3.0RC2 fails due to the IDEConfig package which is new in v3+.

Therefore, I think there is no other way than to distribute two version-dependent packages. Please ask GetMem if there is a possibility that OPM installs only the one for the current version and ignores the other one.

zamtmn

  • Hero Member
  • *****
  • Posts: 646
Re: Lazarus Dark Theme Windows
« Reply #9 on: December 16, 2023, 04:27:51 pm »
I'll just remove support for 2.2.6, support for only the latest release

cpicanco

  • Hero Member
  • *****
  • Posts: 655
  • Behavioral Scientist and Programmer
    • Portfolio
Re: Lazarus Dark Theme Windows
« Reply #10 on: December 16, 2023, 08:21:00 pm »
Nice, It is working
Be mindful and excellent with each other.
https://github.com/cpicanco/

zamtmn

  • Hero Member
  • *****
  • Posts: 646
Re: Lazarus Dark Theme Windows
« Reply #11 on: December 25, 2023, 10:44:05 am »
Metadarkstyle pkg added to OPM

avra

  • Hero Member
  • *****
  • Posts: 2532
    • Additional info
Re: Lazarus Dark Theme Windows
« Reply #12 on: December 25, 2023, 01:06:53 pm »
Nice. Now I have to make dark pastels color patch so that we can read messages text with colored background  ;D
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Hansaplast

  • Hero Member
  • *****
  • Posts: 689
  • Tweaking4All.com
    • Tweaking4All
Re: Lazarus Dark Theme Windows
« Reply #13 on: January 13, 2024, 08:42:39 pm »
Recently, I was able to compile Lazarus with a dark theme on Windows 10 without using QT, thanks to this package: https://github.com/zamtmn/metadarkstyle.


Forgive me for asking, but how does one apply this to an application?
I've got it to work with the Lazarus IDE, but I'd also like to use this, or something like this, to support dark mode in Windows 10/11.
I was unable to find any documentation and the examples did not work for me.


Any help is very much appreciated.

zamtmn

  • Hero Member
  • *****
  • Posts: 646
Re: Lazarus Dark Theme Windows
« Reply #14 on: January 13, 2024, 10:32:34 pm »
Examples that are included in the package do not work for you?

 

TinyPortal © 2005-2018