Recent

Author Topic: Lazarus Dark theme...  (Read 26411 times)

chrv

  • Jr. Member
  • **
  • Posts: 58
Re: Lazarus Dark theme...
« Reply #45 on: April 17, 2023, 12:49:17 pm »
Quote
Just a guess, a more current version of Lazarus.
You are write : it works without problem on Laz2.2.6.

Unfortunately, my app does not compile on Laz2.2.6
Is there any plan Dark theme to be compatible with Laz2.0.12 ?
Win32 Lazarus 2.0.12 FPC 3.2.0

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: Lazarus Dark theme...
« Reply #46 on: April 17, 2023, 08:41:47 pm »
These are some changes in the package system, I don't think there are any objective reasons to not work, everything is going to work with fpc 3.2. Try to recreate package in your version. I don't support older versions of lazarus

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Lazarus Dark theme...
« Reply #47 on: April 17, 2023, 09:52:33 pm »
My only bug is with some checkboxes, like those inside of OPM, you will not see if they are checked or not (because dark checkbox with same dark ✓ sign)
Thank you for fixing! Latest release working cool on Windows 10 64bit with Lazarus 2.3.0 (rev main-2_3-3223-g00a23612bf) FPC 3.2.2 x86_64-win64-win32/win64
[] is now having a very good contrast!
And some highlighters not working, but still everything is very usable.
In general I do now see that a button (TBitButton? TSpeedButton?) is getting slightly highlighted, thanks man, you rock!
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Lazarus Dark theme...
« Reply #48 on: April 17, 2023, 09:57:58 pm »
Is it planned to add to IDE project option an entry like "Style [ ] native [ ] light [✓] dark" ? - That would be amazing!

And is it possible to explain me, I guess I missed that information somewhere, how is it currently meant to be done to compile a project that should not be dark?

Many many kudos!  :-*
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: Lazarus Dark theme...
« Reply #49 on: April 18, 2023, 11:53:36 pm »
A small problem with MetaDarkStyleDSGN settings implementing.
registerMetaDarkStyleDSGN.SetDarkStyle need run before Lazarus forms create, I'm doing it now in registerMetaDarkStyleDSGN initialization section, but EnvironmentOptions it's not ready yet... Therefore, we need changes in Lazarus, or our own mechanism for saving settings. Maybe there are solutions that I haven't seen?

I figured it out, now it works
« Last Edit: April 19, 2023, 03:31:03 pm by zamtmn »

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: Lazarus Dark theme...
« Reply #50 on: May 22, 2023, 10:57:51 am »
A small update.
It is possible to use color schemes (not all gui elements can do this at the moment, but you can try) a color scheme is a file like https://github.com/zamtmn/metadarkstyle/blob/main/src/test.darkstylecolors linked inside with LResources or placed in PrimaryConfigPath+'/userschemes/' or SecondaryConfigPath+'/userschemes/' paths. File name is the scheme name, the extension should be 'darkstylecolors'. Need restart lazarus

madel

  • New Member
  • *
  • Posts: 19
Re: Lazarus Dark theme...
« Reply #51 on: June 11, 2023, 12:06:16 am »
I'm not sure what I'm doing wrong but I can't get metadarkstyle to work on Windows 11 and Lazarus 2.2.6. I installed both packages as in screenshot and rebuilt the IDE many times but nothing changes. I also tried removing and reinstalling the packages but nothing still. Any guidance?

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: Lazarus Dark theme...
« Reply #52 on: June 11, 2023, 10:55:39 am »
You need set
Code: Pascal  [Select][+][-]
  1. PreferredAppMode - Force dark
  2. Color scheme - dark
in options\darkstyle

Raf20076

  • Full Member
  • ***
  • Posts: 173
    • https://github.com/Raf20076
Re: Lazarus Dark theme...
« Reply #53 on: June 11, 2023, 11:20:00 am »
Dark theme is not good for your eyes.

When it comes to visual-acuity tasks and proofreading tasks, studies have shown that people with normal and corrected vision perform better with Light mode. This means that text in Light mode is clearer and quicker to understand for people with normal or corrected vision.

The researchers put this down to the fact that when we look at a bright background, our pupils constrict and increase acuity while scanning text. When looking at a black background, the opposite effect occurs, and dilated pupils make it harder to focus on the text. Dark theme  also causes your eyes to dilate. Since there is less light to take in, your eyes have to work harder to see clearly. Eye dilation can reduce your vision's sharpness, so you may have to strain to see well.

I never use dark theme on anything.

madel

  • New Member
  • *
  • Posts: 19
Re: Lazarus Dark theme...
« Reply #54 on: June 11, 2023, 04:01:28 pm »
You need set
Code: Pascal  [Select][+][-]
  1. PreferredAppMode - Force dark
  2. Color scheme - dark
in options\darkstyle
There's nothing like that in Lazarus -> Options. I tried setting these in code, recompiled and reinstalled the package but nothing.

Trying with a fresh Lazarus install. I can install the metadarkstyle.lpk file fine. But the other file (metadarkstyledsgn.lpk) gives the following error.
'
Lazarus 2.2.6 (rev lazarus_2_2_6) FPC 3.2.2 x86_64-win64-win32/win64
Windows 11 Pro x64
« Last Edit: June 11, 2023, 04:03:32 pm by madel »

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: Lazarus Dark theme...
« Reply #55 on: June 11, 2023, 08:18:02 pm »
this leapfrog with IDE packages - appeared in the trunk version, they are not in the stable version.
Ok, in https://github.com/zamtmn/metadarkstyle/commit/703c82eda117dc64cba058a80769fa8c3b4729c5 I add Lazarus 2.2.6 support. If you use 2.2.6 please install metadarkstyledsgn226 instead metadarkstyledsgn for trunk lazarus.

madel

  • New Member
  • *
  • Posts: 19
Re: Lazarus Dark theme...
« Reply #56 on: June 11, 2023, 10:52:19 pm »
this leapfrog with IDE packages - appeared in the trunk version, they are not in the stable version.
Ok, in https://github.com/zamtmn/metadarkstyle/commit/703c82eda117dc64cba058a80769fa8c3b4729c5 I add Lazarus 2.2.6 support. If you use 2.2.6 please install metadarkstyledsgn226 instead metadarkstyledsgn for trunk lazarus.

Thank you for your help!
This works but unfortunately trying to open Lazarus - Options gives an Access Violation error.

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: Lazarus Dark theme...
« Reply #57 on: June 12, 2023, 12:07:35 pm »
>>This works but unfortunately trying to open Lazarus - Options gives an Access Violation error.
Stacktrace?
Run lazarus under gdb, and run "bt" command after AV

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: Lazarus Dark theme...
« Reply #58 on: June 12, 2023, 10:19:10 pm »
@madel
fixed, please try again

madel

  • New Member
  • *
  • Posts: 19
Re: Lazarus Dark theme...
« Reply #59 on: June 12, 2023, 10:57:09 pm »
@zamtmn
Works perfectly now. Sorry for not being able to get back to you faster.
Thanks for your amazing work!

 

TinyPortal © 2005-2018