Recent

Author Topic: Dark Theme in my program?  (Read 8357 times)

d7_2_laz

  • Hero Member
  • *****
  • Posts: 512
Re: Dark Theme in my program?
« Reply #60 on: April 11, 2023, 09:50:06 am »
Yes, fix #5 was a bad surprise for me. I just had been busy to write an answer.
- good listview behaviour went lost
- statusbar vert. var still not visible.
The version from april 07 had been basically fine.
I responded in Github.
« Last Edit: April 11, 2023, 10:10:21 am by d7_2_laz »
Lazarus 3.2  FPC 3.2.2 Win10 64bit

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: Dark Theme in my program?
« Reply #61 on: April 11, 2023, 10:08:50 am »
We need to use one code. I have to compare several different versions of files, it problem((

d7_2_laz

  • Hero Member
  • *****
  • Posts: 512
Re: Dark Theme in my program?
« Reply #62 on: April 11, 2023, 10:23:03 am »
See simply your version from April 07 as base. For the listview.

For statusbar,  try within the paint routine:
Code: Pascal  [Select][+][-]
  1. X:= 1;
  2. LCanvas.Font.Color:= clWhite;
  3. for Index:= 0 to StatusBar.Panels.Count - 1 do
  4. begin
  5.   APanel:= StatusBar.Panels[Index];
  6.   LCanvas.TextOut(X+1, (StatusBar.Height - LCanvas.TextHeight('Ag')) div 2, APanel.Text);
  7.   X+= APanel.Width;
  8.   //LCanvas.Pen.Color:= SysColor[COLOR_BTNFACE];   // Won't work at all
  9.   LCanvas.Pen.Color:= SysColor[COLOR_INACTIVECAPTIONTEXT];
  10.   //LCanvas.Line(x-2, ps.rcPaint.Top, x-2, ps.rcPaint.Bottom);
  11.   LCanvas.Line(x-2, ps.rcPaint.Top+3, x-2, ps.rcPaint.Bottom-4);  // Not quite so high
  12. end;
  13.  

The concrete color for the vertical bar surely needs to be optimized, a second vertical bar line too. I had no better result yet
« Last Edit: April 11, 2023, 10:26:27 am by d7_2_laz »
Lazarus 3.2  FPC 3.2.2 Win10 64bit

furious programming

  • Hero Member
  • *****
  • Posts: 858
Re: Dark Theme in my program?
« Reply #63 on: April 11, 2023, 12:40:56 pm »
I closed it with a commit, there was a link to the forum in the commit text, I had nothing to add there, except to say thank you again))
Can you open the complaint again?

I can't, because I'm not an owner of this repository, so I have no power to do this. That's why I suggest to discuss about the issues there, and here keep the general discusion about the package, ideas, problems etc.

Quote
TStatusBar doesn't have a frame, suggest a concrete color

Standard StatusBar has a line on the top, maybe I should not call this frame. Anyway, in a standard theme, separators have the same color as this top-line but, in dark theme, separators are much brighter. Try to use this color.
« Last Edit: April 11, 2023, 01:26:30 pm by furious programming »
Lazarus 3.2 with FPC 3.2.2, Windows 10 — all 64-bit

Working solo on an acrade, action/adventure game in retro style (pixelart), programming the engine and shell from scratch, using Free Pascal and SDL. Release planned in 2026.

d7_2_laz

  • Hero Member
  • *****
  • Posts: 512
Re: Dark Theme in my program?
« Reply #64 on: April 11, 2023, 01:10:53 pm »
To my experiences yesterday there's a limited access to the colors during paint within the theming.
I exxperienced to see the color (of the verical bar) either white or not at all.

Actually i see a more basic problem (with the latest fix). It's x-pos as deriived from a panel's with is kind of unreliable. Wouldn't know yet how to solve.
Lazarus 3.2  FPC 3.2.2 Win10 64bit

furious programming

  • Hero Member
  • *****
  • Posts: 858
Re: Dark Theme in my program?
« Reply #65 on: April 11, 2023, 01:19:02 pm »
To my experiences yesterday there's a limited access to the colors during paint within the theming.

Currently you are using the SysColor[COLOR_GRAYTEXT] to paint the separator lines, which is two times brighter than the top line of the status bar. Try to use something close to the RGB 85,85,85.

Quote
Actually i see a more basic problem (with the latest fix). It's x-pos as deriived from a panel's with is kind of unreliable. Wouldn't know yet how to solve.

In the case of serious problems with rendering separators, maybe it would be better to not render them at all. For now better is to have clean and readable statusbar, instead of fully but incorrectly rendered. We should also discuss about creating regular releases with the list of things done (fixed). Also, the repository needs the readme.md with the list of currently working features, so everyone will see the value of the package and the progress of work will be clearly visible. 8)
« Last Edit: April 11, 2023, 01:30:44 pm by furious programming »
Lazarus 3.2 with FPC 3.2.2, Windows 10 — all 64-bit

Working solo on an acrade, action/adventure game in retro style (pixelart), programming the engine and shell from scratch, using Free Pascal and SDL. Release planned in 2026.

d7_2_laz

  • Hero Member
  • *****
  • Posts: 512
Re: Dark Theme in my program?
« Reply #66 on: April 11, 2023, 02:04:57 pm »
Sorry about my last remark concerning the separator's x-pos ... that was my bad as i just recognized.
Lazarus 3.2  FPC 3.2.2 Win10 64bit

d7_2_laz

  • Hero Member
  • *****
  • Posts: 512
Re: Dark Theme in my program?
« Reply #67 on: April 11, 2023, 03:42:09 pm »
Quote
Try to use something close to the RGB 85,85,85.

Test:
Code: Pascal  [Select][+][-]
  1.      //LCanvas.Pen.Color:= SysColor[COLOR_GRAYTEXT];
  2.       LCanvas.Pen.Color:= RGBToColor(85, 85, 85);

==> Would be possible, but imo useless. What's the benefit of such a marker that one cannot recognize without a magnifying glass?
Lazarus 3.2  FPC 3.2.2 Win10 64bit

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: Dark Theme in my program?
« Reply #68 on: April 11, 2023, 03:49:48 pm »
I'll add, it's not difficult. Butwe will have to collect all these values and create a centralized palette. the fewer digital values used, the better

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2093
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Dark Theme in my program?
« Reply #69 on: April 11, 2023, 03:50:24 pm »
What's the benefit of such a marker that one cannot recognize without a magnifying glass?
I guess because I am on Windows that I am total used to such markers and believe it or not, I do not need any kind of tool to recognize such so on that point I am full with furious programming
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

furious programming

  • Hero Member
  • *****
  • Posts: 858
Re: Dark Theme in my program?
« Reply #70 on: April 11, 2023, 03:51:35 pm »
What's the benefit of such a marker that one cannot recognize without a magnifying glass?

In the original (native) theme, the separators are also barely visible. 8)

Separators should not be clearly visible, because the are not as important as the text of its panels.

I'll add, it's not difficult. Butwe will have to collect all these values and create a centralized palette. the fewer digital values used, the better

IMO the centralized palette is a must-have — it will simplify the development.

If we talk about the colors palette, I strongly suggest to use only custom colors, without asking the system for them. Just define an array with colors, fill them with constant values (using RGBToColor function) and use everywhere in the package source code. This will allow the IDE to look the same in every user's environment.
« Last Edit: April 11, 2023, 04:04:45 pm by furious programming »
Lazarus 3.2 with FPC 3.2.2, Windows 10 — all 64-bit

Working solo on an acrade, action/adventure game in retro style (pixelart), programming the engine and shell from scratch, using Free Pascal and SDL. Release planned in 2026.

d7_2_laz

  • Hero Member
  • *****
  • Posts: 512
Re: Dark Theme in my program?
« Reply #71 on: April 11, 2023, 04:08:53 pm »
Centralized palette or not - if we begin to burden this task by making things less readable - only for to keep a kind of "theme-compliancy",  without having the chance to stop that resp. to preserve preferences, i'll out of this thread. This is not mine.
Lazarus 3.2  FPC 3.2.2 Win10 64bit

furious programming

  • Hero Member
  • *****
  • Posts: 858
Re: Dark Theme in my program?
« Reply #72 on: April 11, 2023, 04:12:12 pm »
What do you mean? One array with all palette colors will de facto increase the readability and will make the development easier. Currently we have a little mess, some colors are read from the array, some are hardcoded in the methods code — this is not the good idea.
Lazarus 3.2 with FPC 3.2.2, Windows 10 — all 64-bit

Working solo on an acrade, action/adventure game in retro style (pixelart), programming the engine and shell from scratch, using Free Pascal and SDL. Release planned in 2026.

d7_2_laz

  • Hero Member
  • *****
  • Posts: 512
Re: Dark Theme in my program?
« Reply #73 on: April 11, 2023, 04:28:36 pm »
If we begin to make things less readable - only for to keep a kind of "theme-compliancy" -,  without having the chance to stop that resp. to preserve preferences, it's useless for me.
Lazarus 3.2  FPC 3.2.2 Win10 64bit

furious programming

  • Hero Member
  • *****
  • Posts: 858
Re: Dark Theme in my program?
« Reply #74 on: April 11, 2023, 04:33:54 pm »
Ok, so do what you thing is best. If I will not like something, I will just change the source code of my local copy of the package. Win-Win.
« Last Edit: April 11, 2023, 04:36:30 pm by furious programming »
Lazarus 3.2 with FPC 3.2.2, Windows 10 — all 64-bit

Working solo on an acrade, action/adventure game in retro style (pixelart), programming the engine and shell from scratch, using Free Pascal and SDL. Release planned in 2026.

 

TinyPortal © 2005-2018