Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » DarkTheme support
Re: Please check the list of 2019.1 changes [message #51329 is a reply to message #51221] Thu, 07 March 2019 14:51 Go to previous messageGo to next message
Tom1
Messages: 618
Registered: March 2007
Contributor
Hi Mirek,

Can you give an update on your current plan for the Dark Theme support?

I bet you have more important things to deal with, but still it would be nice to know. Smile

Best regards,

Tom



Re: Please check the list of 2019.1 changes [message #51346 is a reply to message #51329] Wed, 13 March 2019 00:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
Tom1 wrote on Thu, 07 March 2019 14:51
Hi Mirek,

Can you give an update on your current plan for the Dark Theme support?

I bet you have more important things to deal with, but still it would be nice to know. Smile

Best regards,

Tom



I do not think it will happen before 2019.1 release...

Mirek
Re: Please check the list of 2019.1 changes [message #51347 is a reply to message #51346] Wed, 13 March 2019 12:15 Go to previous messageGo to next message
Tom1
Messages: 618
Registered: March 2007
Contributor
Hi,

OK, no worries. I'm not in hurry. Smile

Best regards,

Tom
Re: Please check the list of 2019.1 changes [message #51373 is a reply to message #51347] Sun, 17 March 2019 02:05 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 620
Registered: September 2012
Location: Poland, Kraków
Contributor
Hello Tom and Mirek,

I tested dark them on my Linux machine with dark GTK theme and came into conclusion. The icons for TheIDE doesn't look grate, but the main reason for that is that we convert icons that do not really needs to be converted. It looks grate on both dark and white theme. I believe we should gain good results when we allow the programmer to decide how icons should behave in white/dark environment. In my opinion IconDes should offer following options:
- auto (use conversion algorithm for icon)
- separate icon for white/light themes
- separate icon for dark themes
- none (do not make conversion and use the same icon in both environments dark and light)

Let's look at the this picture. Some of Ide icons look great in IconDes, but the same icons with color inversion doesn't look great in toolbar:
index.php?t=getfile&id=5785&private=0

Sincerely,
Klugier


Ultimate++ - one framework to rule them all.

[Updated on: Sun, 17 March 2019 12:07]

Report message to a moderator

Re: Please check the list of 2019.1 changes [message #51379 is a reply to message #51373] Sun, 17 March 2019 10:15 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
There is no color conversion of .iml icons in the trunk yet.

Are you testing with that code added to trunk, or did you just expected to be there already?

Mirek
Re: Please check the list of 2019.1 changes [message #51382 is a reply to message #51379] Sun, 17 March 2019 11:54 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 620
Registered: September 2012
Location: Poland, Kraków
Contributor
Hello,

It is converted somehow even it is not do intentionally. Look at debug/run icons inside TheIDE. Inside IconDes it's fulfillment are white, but inside TheIDE is is inverted to the dark colors. Here is example:
index.php?t=getfile&id=5787&private=0

Sincerely,
Klugier


Ultimate++ - one framework to rule them all.

[Updated on: Sun, 17 March 2019 11:55]

Report message to a moderator

Re: Please check the list of 2019.1 changes [message #51416 is a reply to message #51382] Sat, 23 March 2019 23:31 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
Well, it appears there was already some code to convert icons in toolbar/menubar for the dark theme (and sadly, I have completely forgot about it...).

Being there, I have removed it and replaced by .iml conversion, experimentally. So now the new algorithm is used there, please test...

Mirek
Re: Please check the list of 2019.1 changes [message #51420 is a reply to message #51416] Sun, 24 March 2019 09:53 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
There are constants that can used to finetune the conversion, in Core/Color.cpp:233

// this represent physiological perception of brightness of R,G,B. Sum = 1
//	static double c[3] = { 0.21, 0.72, 0.07 }; // physiologically correct values
	static double c[3] = { 0.3, 0.5, 0.2 }; // with this set, blues and reds are more pronounced


As you can see, I have tried to alter the set and IMO it now looks even better (previously, blues tended to end as too close to white).

I am posting this here so that it can be eventually experimented on...

Mirek
Re: Please check the list of 2019.1 changes [message #51424 is a reply to message #51329] Sun, 24 March 2019 23:10 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
Tom1 wrote on Thu, 07 March 2019 14:51
Hi Mirek,

Can you give an update on your current plan for the Dark Theme support?

I bet you have more important things to deal with, but still it would be nice to know. Smile

Best regards,

Tom





Well, change of plans, first version is commited. I would appreciate testing, there are likely to be many places where color is broken...

Mirek
Re: Please check the list of 2019.1 changes [message #51431 is a reply to message #51424] Mon, 25 March 2019 11:45 Go to previous messageGo to next message
Tom1
Messages: 618
Registered: March 2007
Contributor
Hi Mirek,

Good news! I'm testing dark theme now...

Surprisingly, a linking issue arised with dual tif libraries when compiling my app. (I have one in gdal and another in plugin/tif. Both needed. Actually I would only need one, but can't figure out how to make gdal use Upp plugin/tif instead of the bundled tiff library.) The picture shows this issue as well as a little bit strange color combination for the message, which is more relevant for the Dark -theme at hand:

index.php?t=getfile&id=5791&private=0

After working awhile with TheIDE and recompliling, the colors of the linking error lines turned to white on pure red. Then when I closed TheIDE and started over with Light theme, I discovered that the linking error was printed with black on relatively dark red. That's hard to read, at least for me.

I need to figure out this linking issue before I can seriously test with my own code. Anyway, I can see that the frame in TheIDE already looks much better on Windows 10 than it did before.

Best regards,

Tom
  • Attachment: Dark.png
    (Size: 76.26KB, Downloaded 121 times)
Re: Please check the list of 2019.1 changes [message #51432 is a reply to message #51431] Mon, 25 March 2019 11:51 Go to previous messageGo to next message
Tom1
Messages: 618
Registered: March 2007
Contributor
OK, now I know: The linking error background color is sluggishly following the Setup>Settings>Syntax highlighting color > White/Dark setting. Therefore it is not in sync with the Windows Dark -theme that is read on startup.

But: Shouldn't the Syntax highlighting (White/Dart) automatically follow the Dark/light theme read from the system on startup as everything else is now?

Best regards,

Tom

[Updated on: Mon, 25 March 2019 11:51]

Report message to a moderator

Re: Please check the list of 2019.1 changes [message #51434 is a reply to message #51432] Mon, 25 March 2019 12:29 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
gdal - I had the same problem, now fixed.

As for that warning background, it is fixed in "Dark theme" predefine for highlighting, but you need to set it to Dark again.

Syntax highlighting should not read Dark/Light, because that would overwrite user's settings.

Mirek
Re: Please check the list of 2019.1 changes [message #51437 is a reply to message #51434] Mon, 25 March 2019 14:02 Go to previous messageGo to next message
Tom1
Messages: 618
Registered: March 2007
Contributor
How about having a selection (Check box?) called "Automatic" in Syntax highlighting? It would simply call what Dark or White buttons call when initializing TheIDE using system theme. Running on either dark or light theme really calls for pressing either of the buttons depending on your selected theme. Unless, of course, the user is interested to tune some of the colors to personal preference.

Anyway, this is not so important after all... Just my personal preference when working in changing lighting conditions. The important things on the platform side have been dealt with already, so all that matters is just fine! (If I find any issues, I will return! It all seems good now.) Smile

Thanks and best regards,

Tom
Re: Please check the list of 2019.1 changes [message #51475 is a reply to message #51437] Fri, 29 March 2019 09:30 Go to previous messageGo to next message
Tom1
Messages: 618
Registered: March 2007
Contributor
Hi Mirek,

It turned out that there are many readability issues when using dark theme colors on Windows 7.

- Toolbar
- Menubar
- ArrayCtrl headers
- e.g. Settings dialog in TheIDE

On Windows 10 you solved the same already.

Best regards,

Tom
Re: Please check the list of 2019.1 changes [message #51476 is a reply to message #51475] Fri, 29 March 2019 10:54 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
Well, dark theme with Win 7 is completely different path (as there the colors are comming from the system).

Anyway, I have just finished another iteration of dark theme issues, so please recheck everything and report.

First of all, immediately after delivering one release on my app with dark theme support, I had reported it as error Smile

So now you have to activate simulated Win10 dark theme by Ctrl::SetDarkThemeEnabled at the start of GUI_APP_MAIN.

Another new features:

bool IsDarkTheme();

Color AdjustIfDark(Color); // adjusts color for dark them if it is active

Also, previously deprecated functions SWhite, SRed().... are now reactivated and represent "dark theme adjusted colors". So if you want to put Red color somewhere, if you use SRed, it will be accordingly converted in dark mode (somewhat pink-ish).

I will try to write some docs about dark theme support soon... (probably as well as about UHD).
Re: Please check the list of 2019.1 changes [message #51478 is a reply to message #51476] Fri, 29 March 2019 16:31 Go to previous messageGo to next message
Tom1
Messages: 618
Registered: March 2007
Contributor
Hi Mirek,

On Windows 10 it all still works (after adding Ctrl::SetDarkThemeEnabled(); ).

On Windows 7 the symptoms I mentioned in my last message remain.

Another thing I noticed is that Windows 10 1809 does not alter any icon color at all (or maybe just pure black/white) when switching between light and dark themes. (Please take a look at Windows "File Explorer" toolbar icons while toggling between Light and Dark app modes on Windows > Settings > Personalization > Colors.) For this to work properly, all icons must be colored in a way that prevents them from sinking into the background. Sorry to bring this up this late down the road, but after using TheIDE with dark theme for a while, I have now noticed that I have some difficulty to identify certain TheIDE icons (e.g. Build and Rebuild All on the toolbar) in their dark variant. This may be related to the fact that I have red-green colorblindness (as about 8 % of males do). Using light theme icons on dark background would in most cases work better for me after all. Of course there are some icons that would need to be changed in order to be visible on both dark and light backgrounds. This involves changing from black to mid-grey to support both white and black backgrounds with a single icon.

I tried this by commenting out the following code in function Iml::Get(int i) in Iml.cpp:
//					if(gui_image && IsDark(SColorPaper()))
//						m.image = DarkTheme(m.image);


The result is easier for me to work with. Some icons (the dark ones including, but not limited to compile (C++) and preprocess (#) ) would need a new lighter color tone that is closer to mid range intensity.

Best regards,

Tom
Re: Please check the list of 2019.1 changes [message #51482 is a reply to message #51478] Sat, 30 March 2019 10:22 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
Tom1 wrote on Fri, 29 March 2019 16:31
Hi Mirek,

On Windows 10 it all still works (after adding Ctrl::SetDarkThemeEnabled(); ).

On Windows 7 the symptoms I mentioned in my last message remain.


Well, M$ dropped the support for Win7 and we have not made it worse by recent changes, so... it will perhaps have to wait before I have some Win7 machine again.

Quote:

Another thing I noticed is that Windows 10 1809 does not alter any icon color at all (or maybe just pure black/white) when switching between light and dark themes. (Please take a look at Windows "File Explorer" toolbar icons while toggling between Light and Dark app modes on Windows > Settings > Personalization > Colors.) For this to work properly, all icons must be colored in a way that prevents them from sinking into the background. Sorry to bring this up this late down the road, but after using TheIDE with dark theme for a while, I have now noticed that I have some difficulty to identify certain TheIDE icons (e.g. Build and Rebuild All on the toolbar) in their dark variant. This may be related to the fact that I have red-green colorblindness (as about 8 % of males do). Using light theme icons on dark background would in most cases work better for me after all. Of course there are some icons that would need to be changed in order to be visible on both dark and light backgrounds. This involves changing from black to mid-grey to support both white and black backgrounds with a single icon.


Oh great...

Mirek
Re: Please check the list of 2019.1 changes [message #51483 is a reply to message #51482] Sat, 30 March 2019 12:50 Go to previous message
Tom1
Messages: 618
Registered: March 2007
Contributor
mirek wrote on Sat, 30 March 2019 11:22
Tom1 wrote on Fri, 29 March 2019 16:31
Hi Mirek,

On Windows 10 it all still works (after adding Ctrl::SetDarkThemeEnabled(); ).

On Windows 7 the symptoms I mentioned in my last message remain.


Well, M$ dropped the support for Win7 and we have not made it worse by recent changes, so... it will perhaps have to wait before I have some Win7 machine again.

Quote:

Another thing I noticed is that Windows 10 1809 does not alter any icon color at all (or maybe just pure black/white) when switching between light and dark themes. (Please take a look at Windows "File Explorer" toolbar icons while toggling between Light and Dark app modes on Windows > Settings > Personalization > Colors.) For this to work properly, all icons must be colored in a way that prevents them from sinking into the background. Sorry to bring this up this late down the road, but after using TheIDE with dark theme for a while, I have now noticed that I have some difficulty to identify certain TheIDE icons (e.g. Build and Rebuild All on the toolbar) in their dark variant. This may be related to the fact that I have red-green colorblindness (as about 8 % of males do). Using light theme icons on dark background would in most cases work better for me after all. Of course there are some icons that would need to be changed in order to be visible on both dark and light backgrounds. This involves changing from black to mid-grey to support both white and black backgrounds with a single icon.


Oh great...

Mirek


Dark theme support on Windows 7 is not critical for me, but as I found it out during testing, I wanted to let you know. Leaving it as it is, is OK with me.

As for the question with icon coloring/theming, I understand your frustration about it and I'm truly sorry I have not been able to realize this before. Embarassed I'm trying to be helpful, but I understand this is not always the case.

Then again, I do not know where Microsoft is going with this subject either. Anyway, the dark theme support has evolved gradually during recent Windows 10 upgrades and there is no evidence that it would stop here. Next update is just around the corner and news on the preview versions point out some slight changes again.

But in the end, you decide how U++ deals with this.

Best regards,

Tom
Previous Topic: Please check the list of 2019.1 changes
Next Topic: Anybody willing to look into OpenSSL Win32 compilation?
Goto Forum:
  


Current Time: Mon May 27 05:02:13 CEST 2019

Total time taken to generate the page: 0.01835 seconds