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
DarkTheme support [message #51142] Fri, 08 February 2019 16:17 Go to next message
Tom1
Messages: 659
Registered: March 2007
Contributor
Hi Mirek,

Nice to hear about the upcoming release! You have done great work.

I spotted the work on dark themes from the list and decided to try immediately, as I have long wanted to switch there for less eye strain.

In Windows, there are still some details to check. Please temporarily switch on a dark theme on your Windows 10 desktop to see what I'm referring to below. (Just open Settings in Windows and select High contrast, Turn on high contrast and then select some reasonable dark theme colors for Text, Hyperlinks, Disabled Text, Selected Text, Button Text and Background. Press Apply.) Then, run TheIDE to see where the tight spots are.

My eye immediately catches the following details when a Dark theme is enabled on Windows:

- Checkboxes on menu items stay in light theme coloring
- Close boxes on file tabs stay in light theme coloring
- package list text color stays black
- file list text color stays black (The same is true on FileSel)
- maybe code editor 'Dark theme' (as the button says in Settings dialog) could follow the window background color to use correct theme automatically.
- Settings dialog - Syntax highlighting - array column titles are not readable (light on light)
- Settings dialog (and other locations) - radio buttons have rough edges while the colors are swapped nicely though

Anyway, very nice work and quite a lot of it really!

Thanks and best regards,

Tom
Re: Please check the list of 2019.1 changes [message #51152 is a reply to message #51142] Mon, 11 February 2019 11:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Tom1 wrote on Fri, 08 February 2019 16:17
Hi Mirek,

Nice to hear about the upcoming release! You have done great work.

I spotted the work on dark themes from the list and decided to try immediately, as I have long wanted to switch there for less eye strain.

In Windows, there are still some details to check. Please temporarily switch on a dark theme on your Windows 10 desktop to see what I'm referring to below. (Just open Settings in Windows and select High contrast, Turn on high contrast and then select some reasonable dark theme colors for Text, Hyperlinks, Disabled Text, Selected Text, Button Text and Background. Press Apply.) Then, run TheIDE to see where the tight spots are.

My eye immediately catches the following details when a Dark theme is enabled on Windows:

- Checkboxes on menu items stay in light theme coloring
- Close boxes on file tabs stay in light theme coloring
- package list text color stays black
- file list text color stays black (The same is true on FileSel)
- maybe code editor 'Dark theme' (as the button says in Settings dialog) could follow the window background color to use correct theme automatically.
- Settings dialog - Syntax highlighting - array column titles are not readable (light on light)
- Settings dialog (and other locations) - radio buttons have rough edges while the colors are swapped nicely though

Anyway, very nice work and quite a lot of it really!

Thanks and best regards,

Tom


Would it be possible to post some screenshots and also screenshot of your settings?

Other than that, I can see 2 issues here:

- currently we are not adjusting colors if .iml images. I can do that, maybe if icon is not "no resolution" (probably could be renamed to 'raw' or 'fixed' or something), it would have its colors adjusted by DarkTheme function. Would that be a good idea?

- we are probably not getting correct colors from host platform. Maybe it would be fine to reduce the number of colors we are trying to read to minimum (paper, ink, dialog paper, menu item highlight) and derive rest from those...
Re: Please check the list of 2019.1 changes [message #51153 is a reply to message #51152] Mon, 11 February 2019 16:19 Go to previous messageGo to next message
Tom1
Messages: 659
Registered: March 2007
Contributor
Hi Mirek,

First, as for the .iml images, adjusting their color through DarkTheme sounds good. (The current visibility on dark background is a bit challenging.)

As for the screenshots: For starters, I decided to tune the colors a little to make them a bit more what I would like to have (along the lines of "Mint-Y-Dark" theme on Linux Mint 19.1) as the 'Dark Theme on High Contrast' -selection was not exactly what I wanted. So, I started to look around for the UI color setting dialog on Windows 10. Well, there's no such dialog anymore. And as far as my googling went, there is no replacement either. In the end I'm under impression that there is no single decent place to set the colors. There are at least two registry areas that have an effect on Desktop application colors, but this is not complete:

Computer\HKEY_CURRENT_USER\Control Panel\Colors

Computer\HKEY_CURRENT_USER\Control Panel\Desktop\Colors

Changing the colors therein does have an effect on colors on part of the items (after logging out and back in), but not all as far as I can see.

Additionally, most applications I have installed on my computer do not handle dark color themes (or changing the system colors above) too well. They either ignore it or have mixed results. No wonder though as Windows 10 itself does not seem to have a clear approach to this either. (Actually, e.g. Microsoft Edge does have its private Theme selection (Dark/Light) in its settings and does not follow system colors.)

So, IMO, your idea of picking up those few system colors from Windows that are actually available (on Windows 10 too) and then deriving the rest out of them sounds good. Just need to figure out which colors are actually adjustable in Windows 10 (through standard Settings) and then decide how to proceed.

I will try to create a dark theme for Windows 10 and then post it here for reference.

Best regards,

Tom
Re: Please check the list of 2019.1 changes [message #51154 is a reply to message #51153] Mon, 11 February 2019 21:03 Go to previous messageGo to next message
Tom1
Messages: 659
Registered: March 2007
Contributor
Hi,

I looked at the issue here at home on Windows 7, which still has old school color settings available: I found out that in TheIDE "Settings>IDE>GUI theme>Host platform" is responsible of making many of the coloring choices that override the system color settings I tried to do today in the office on Windows 10. If I switch over to GUI theme = Standard or Classic (here on Windows 7), most of the colors start to follow what is defined in Windows colors. At least with Windows 7, the dark theme looks quite nice with Classic, although, the controls are quite rough and well from the past... Maybe a new GUI theme with "Host platform" widgets but pure system colors will solve the issue. It seems that TheIDE knows the colors already but "Host platform" theme just overrides them.

I will next try to take a look at this back on Windows 10.

Best regards,

Tom

Re: Please check the list of 2019.1 changes [message #51155 is a reply to message #51154] Tue, 12 February 2019 09:30 Go to previous messageGo to next message
Tom1
Messages: 659
Registered: March 2007
Contributor
Hi Mirek,

On Windows 10 the 'Classic' theme on TheIDE was better than 'Host platform' but not perfect. The package list and file list still use black font on my dark gray background. Menu's become readable.

I have now looked a bit deeper at the Microsoft documentation to find out about the "Dark Theme". It seems the new way, that has replaced system colors, is called 'Visual Styles'. And as far as my googling went, there is no easy way to get the Windows 10 desktop completely into a dark theme. While the new Windows Store apps (or UWP apps) support the Windows 10 Dark theme (default app mode) setting, the desktop applications are generally not aware of that at all. And Windows does not help by making similar changes to old school system colors, so they are not in sync. And most Windows desktop apps only read those old system colors, so they cannot follow the current theme. It seems to me that the Desktop applications are pretty much on their own.

If there's a way to read (in a Desktop application) the 'Settins>Personalization>Colors>Choose your default app mode: Light/Dark' -flag and the selected 'Accent color', then resolving the rest of the colors to fit the landscape should be possible to some extent. Maybe this would solve the Windows 10 specific dark theme problem. But is it worth the trouble? Most applications are not usable with dark themed system colors on Windows 10 anyway.

Best regards,

Tom

EDIT: There is a way to detect Windows 10 dark/light theme setting: In registry " Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\Curren tVersion\Themes\Personalize\AppsUseLightTheme " contains 1 for light or 0 for dark. (Found it in https://stackoverflow.com/questions/51334674/how-to-detect-w indows-10-light-dark-mode-in-win32-application)

EDIT2: And more in registry: "Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM" contains Windows 10 colorization color and accent color entries along with other related info.

[Updated on: Tue, 12 February 2019 11:29]

Report message to a moderator

Re: Please check the list of 2019.1 changes [message #51156 is a reply to message #51155] Tue, 12 February 2019 12:44 Go to previous messageGo to next message
Tom1
Messages: 659
Registered: March 2007
Contributor
Hi,

I composed some code to pick up the Windows 10 light/dark theme and accent/colorization colors:

bool IsSystemThemeDark(){
#ifdef WIN32
    HKEY	SWKey;
    HKEY	MSKey;
    HKEY	WINKey;
    HKEY	CVKey;
    HKEY	ThemesKey;
    HKEY	PersonalizeKey;
    
    LONG	Status;
	bool	darkTheme=false;

    Status = RegOpenKeyEx(HKEY_CURRENT_USER,TEXT("Software"),0,KEY_READ,&SWKey);
    if(Status == ERROR_SUCCESS){
		Status = RegOpenKeyEx(SWKey,TEXT("Microsoft"),0,KEY_READ,&MSKey);
	    if(Status == ERROR_SUCCESS){
			Status = RegOpenKeyEx(MSKey,TEXT("Windows"),0,KEY_READ,&WINKey);
			if(Status == ERROR_SUCCESS){
				Status = RegOpenKeyEx(WINKey,TEXT("CurrentVersion"),0,KEY_READ,&CVKey);
				if(Status == ERROR_SUCCESS){
					Status = RegOpenKeyEx(CVKey,TEXT("Themes"),0,KEY_READ,&ThemesKey);
					if(Status == ERROR_SUCCESS){
						Status = RegOpenKeyEx(ThemesKey,TEXT("Personalize"),0,KEY_READ,&PersonalizeKey);
						if(Status == ERROR_SUCCESS){
						    DWORD RegType;
						    DWORD BufferSize=16;
						    char pStr[16];
							
					        Status=RegQueryValueEx(PersonalizeKey,TEXT("AppsUseLightTheme"),NULL,&RegType,(LPBYTE)pStr,&BufferSize);
					        if(Status == ERROR_SUCCESS) if((*(DWORD*)pStr)==0) darkTheme=true;
					        RegCloseKey(PersonalizeKey);
						}
						RegCloseKey(ThemesKey);
					}
					RegCloseKey(CVKey);
				}
				RegCloseKey(WINKey);
			}
			RegCloseKey(MSKey);
	    }
	    RegCloseKey(SWKey);
    }
    if(Status == ERROR_SUCCESS) return darkTheme;
#endif

	// Generic solution for GTK and older Windows
    Color paper=SColorPaper();

    if(paper.GetR()<128 && paper.GetG()<128 && paper.GetB()<128) return true; // Dark background
    return false;
}

RGBA GetSystemColorizationColor(){
	RGBA	color=Gray(); // Default
	
#ifdef WIN32
    HKEY	SWKey;
    HKEY	MSKey;
    HKEY	WINKey;
    HKEY	DWMKey;
    
    LONG	Status;
	
	// "Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM"

    Status = RegOpenKeyEx(HKEY_CURRENT_USER,TEXT("Software"),0,KEY_READ,&SWKey);
    if(Status == ERROR_SUCCESS){
		Status = RegOpenKeyEx(SWKey,TEXT("Microsoft"),0,KEY_READ,&MSKey);
	    if(Status == ERROR_SUCCESS){
			Status = RegOpenKeyEx(MSKey,TEXT("Windows"),0,KEY_READ,&WINKey);
			if(Status == ERROR_SUCCESS){
				Status = RegOpenKeyEx(WINKey,TEXT("DWM"),0,KEY_READ,&DWMKey);
				if(Status == ERROR_SUCCESS){
				    DWORD RegType;
				    DWORD BufferSize=16;
				    char pStr[16];
					
			        Status=RegQueryValueEx(DWMKey,TEXT("ColorizationColor"),NULL,&RegType,(LPBYTE)pStr,&BufferSize);
			        
			        if(Status == ERROR_SUCCESS) color=(*(RGBA*)pStr);
			        
					RegCloseKey(DWMKey);
				}
				RegCloseKey(WINKey);
			}
			RegCloseKey(MSKey);
	    }
	    RegCloseKey(SWKey);
    }
    if(Status == ERROR_SUCCESS) return color; // Success
    
#endif
	// TODO solve other sources
	
	return color; // Default
}

RGBA GetSystemAccentColor(){
	RGBA	color=Gray(); // Default
	
#ifdef WIN32
    HKEY	SWKey;
    HKEY	MSKey;
    HKEY	WINKey;
    HKEY	DWMKey;
    
    LONG	Status;
	
	// "Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM"

    Status = RegOpenKeyEx(HKEY_CURRENT_USER,TEXT("Software"),0,KEY_READ,&SWKey);
    if(Status == ERROR_SUCCESS){
		Status = RegOpenKeyEx(SWKey,TEXT("Microsoft"),0,KEY_READ,&MSKey);
	    if(Status == ERROR_SUCCESS){
			Status = RegOpenKeyEx(MSKey,TEXT("Windows"),0,KEY_READ,&WINKey);
			if(Status == ERROR_SUCCESS){
				Status = RegOpenKeyEx(WINKey,TEXT("DWM"),0,KEY_READ,&DWMKey);
				if(Status == ERROR_SUCCESS){
				    DWORD RegType;
				    DWORD BufferSize=16;
				    char pStr[16];
					
			        Status=RegQueryValueEx(DWMKey,TEXT("AccentColor"),NULL,&RegType,(LPBYTE)pStr,&BufferSize);
			        
			        if(Status == ERROR_SUCCESS) color=(*(RGBA*)pStr);
			        
					RegCloseKey(DWMKey);
				}
				RegCloseKey(WINKey);
			}
			RegCloseKey(MSKey);
	    }
	    RegCloseKey(SWKey);
    }
    if(Status == ERROR_SUCCESS) return color; // Success
    
#endif
	// TODO solve other sources
	
	return color; // Default
}


At least this works on relatively current Windows 10, but I do not know how to make U++ tune its colors along these colors, so I'll just drop this here.

Best regards,

Tom

[Updated on: Tue, 12 February 2019 12:45]

Report message to a moderator

Re: Please check the list of 2019.1 changes [message #51158 is a reply to message #51156] Tue, 12 February 2019 13:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Meanwhile, I was playing with 'darkening the icons'. It is promising, but still not quite there:

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

All seems ok, except "reporticon". I guess there is a trouble with yellow... Smile

Mirek
Re: Please check the list of 2019.1 changes [message #51159 is a reply to message #51158] Tue, 12 February 2019 13:50 Go to previous messageGo to next message
Tom1
Messages: 659
Registered: March 2007
Contributor
Hi Mirek,

Good! This looks promising. Smile

It is easy to see that most turn out great, but some would be better off just as they were. E.g. earth looks better in green+blue just as in light theme. In my opinion, the same goes for many of the folder images. I think that in some cases the color is part of what makes us understand what the icon stands for. Is the plan to create a dark themed icon set on the side or just automatically convert any icon on the fly? A dark themed icon set on the side (originally created from the light themed icons) would allow fine tuning the result for each.

Only running TheIDE with the new icon set on dark theme will tell if they need any tuning.

Best regards,

Tom
Re: Please check the list of 2019.1 changes [message #51160 is a reply to message #51159] Tue, 12 February 2019 14:02 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 12 February 2019 13:50
Hi Mirek,

Good! This looks promising. Smile

It is easy to see that most turn out great, but some would be better off just as they were. E.g. earth looks better in green+blue just as in light theme. In my opinion, the same goes for many of the folder images. I think that in some cases the color is part of what makes us understand what the icon stands for. Is the plan to create a dark themed icon set on the side or just automatically convert any icon on the fly? A dark themed icon set on the side (originally created from the light themed icons) would allow fine tuning the result for each.

Only running TheIDE with the new icon set on dark theme will tell if they need any tuning.

Best regards,

Tom


Plan is to try to get this right to be done automagically. There is always a option to override icons, but I guess U++ niche right now is small teams / individual projects with not much resources to provide multiple icon sets (normal, UHD, dark normal, dark UHD).

I believe UHD scaling is not perfect, but acceptable. I hope for the same w.r.t. dark theme.

Mirek
Re: Please check the list of 2019.1 changes [message #51161 is a reply to message #51160] Tue, 12 February 2019 14:15 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Another try (posting here mostly for myself to keep the track...)

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

Color DarkTheme2(Color c)
{
	int h = 255 - Grayscale(c);

	int v[3], t[3];
	v[0] = c.GetR();
	v[1] = c.GetG();
	v[2] = c.GetB();
	
	t[0] = h;
	t[1] = h;
	t[2] = h;
	
	int i0 = 0;
	int i1 = 1;
	int i2 = 2;
	
	if(v[i0] > v[i1])
		Swap(i0, i1);
	if(v[i1] > v[i2])
		Swap(i1, i2);
	if(v[i0] > v[i1])
		Swap(i0, i1);

	t[i0] = clamp(h - (v[1] - v[0]), 0, 255);
	int h2 = h + (v[2] - v[1]);
	t[i2] = clamp(h2, 0, 255);
	h2 -= t[i2];
	t[i0] -= h2;
	t[i1] -= h2;
	
	return Color(t[i0], t[i1], t[i2]);
}

[Updated on: Tue, 12 February 2019 14:16]

Report message to a moderator

Re: Please check the list of 2019.1 changes [message #51162 is a reply to message #51160] Tue, 12 February 2019 15:02 Go to previous messageGo to next message
Tom1
Messages: 659
Registered: March 2007
Contributor
OK, good point. I can live with that... Smile

While on the subject, I hope we can get global functions like:

int GUI_GetDarkLightMode();
void GUI_SetDarkLightMode(int mode);

, where mode can be THEME_MODE_LIGHT, THEME_MODE_DARK or THEME_MODE_AUTO.

THEME_MODE_AUTO would automatically follow what 'IsSystemThemeDark()' can tell. There is a WM_DWMCOLORIZATIONCOLORCHANGED, that can tell about system colorization changes in Windows. However, WM_SETTINGCHANGE can detect that and also a change in Dark/Light mode. (Just checked.)

Best regards,

Tom

[Updated on: Tue, 12 February 2019 15:08]

Report message to a moderator

Re: Please check the list of 2019.1 changes [message #51163 is a reply to message #51161] Tue, 12 February 2019 15:26 Go to previous messageGo to next message
Tom1
Messages: 659
Registered: March 2007
Contributor
Your 'another try' with DarkTheme2 is even better. I applied it to my chart view showing maps in dark theme mode instead of my own function which I built for the same purpose a couple of years ago. Your DarkTheme2 is better, so I'm switching over! Thanks!

(We need to have a dark night display mode for our clients working in the dark in vehicles.)

BR, Tom
Re: Please check the list of 2019.1 changes [message #51166 is a reply to message #51162] Wed, 13 February 2019 09:38 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 12 February 2019 15:02
OK, good point. I can live with that... Smile

WM_DWMCOLORIZATIONCOLORCHANGED
WM_SETTINGCHANGE


Not going there for now. Long time ago I decided that we will freeze the settings upon program launch.

I know it is not perfect, but changing while running is a source of hard to resolve situations and bugs (mostly because some widget stores some color internally).

Mirek


Re: Please check the list of 2019.1 changes [message #51167 is a reply to message #51166] Wed, 13 February 2019 10:30 Go to previous messageGo to next message
Tom1
Messages: 659
Registered: March 2007
Contributor
I see. Is it 'no' for WM_... triggered automatic changes only or also 'no' for the user requested dark/light mode changes?

BR, Tom

Re: Please check the list of 2019.1 changes [message #51191 is a reply to message #51167] Tue, 19 February 2019 12:10 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Well, I have to say that supporting dark theme in win32 is uphill battle... There are 3 issues:

- system colors. These are wrong, but this is fixable - I can say that if registry says we are dark and paper is light, I can adjust colors with DarkTheme function. So this is barely solvable.

- Theme GUI elements. Obviously, win32 does not change these to dark colors. We can try to invert colors in the same way as with icons. Not sure how good it will look though (not tested yet)

- Windows non-client areas, like caption. These remain "light" in dark mode. This would be quite hard to solve, in fact this would require overriding really a lot of things.... While above issues are barely survivable, this one makes me stop...

Mirek
Re: Please check the list of 2019.1 changes [message #51196 is a reply to message #51191] Tue, 19 February 2019 13:30 Go to previous messageGo to next message
Tom1
Messages: 659
Registered: March 2007
Contributor
Hi Mirek,

I only just a couple of days ago updated my Windows 10 to version 1809, which introduced Dark Theme support in Windows File Explorer, which is not a store app, but a desktop application. (This was not available in 1803.) This IMO proves that Microsoft is just in the middle of transition of Windows 10 desktop theming. (E.g. Wordpad and Notepad do not have a clue about the Light/Dark mode.) I would expect Microsoft to release some documentation about how this Dark/Light theme support is supposed to be done on Windows 10 with desktop applications. (Unless they have and I just could not find it, of course.)

I think the non-client areas are controlled by DWM which can use the user selected accent color to draw the caption. Just select "Personalize > Colors > Show accent color on the following surfaces > [V] Title bars and window borders". And this is up to Windows and the user to select and handle anyway. U++ is only responsible for painting the client area.

-

In my opinion, just basic handling of Dark/Light theme in a way that makes the application to fit in is enough. In case of Windows 10, it is all about using the knowledge of Windows Dark/Light mode, the Colorization color and the Accent color. (For those functions I posted the code earlier here.) Everything else could be solved from there. Nothing fancy, just the basics.

-

In the end of the day, this is not a high priority issue for me. I can largely live on light theme too. I just have the feeling that the dark theme is slowly emerging and it will need sufficient support, but maybe not this month yet.

Best regards,

Tom
Re: Please check the list of 2019.1 changes [message #51210 is a reply to message #51161] Thu, 21 February 2019 09:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Next iteration of DarkTheme function. I guess this is the final one...

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

Color DarkTheme2(Color color)
{
	if(IsNull(color))
		return Null;
	
	double v[3];
	v[0] = color.GetR();
	v[1] = color.GetG();
	v[2] = color.GetB();
	
	static double c[3] = { 0.21, 0.72, 0.07 };

	double m0 = 0.21 * v[0] + 0.72 * v[1] + 0.07 * v[2];
	double m = 256 - m0;
	
	int i0 = 0;
	int i1 = 1;
	int i2 = 2;
	
	if(v[i0] > v[i1])
		Swap(i0, i1);
	if(v[i1] > v[i2])
		Swap(i1, i2);
	if(v[i0] > v[i1])
		Swap(i0, i1);

	if(m0 < m) {
		m -= m0;
		double a = min(v[i2] + m, 255.0) - v[i2];
		v[i0] += a;
		v[i1] += a;
		v[i2] += a;
		m -= a;

		a = min(v[i1] + m / (c[i0] + c[i1]), 255.0) - v[i1];
		v[i0] += a;
		v[i1] += a;
		m -= (c[i0] + c[i1]) * a;

		v[i0] = min(v[i0] + m / c[i1], 255.0);
	}
	else {
		m = m0 - m;
		double a = v[i0] - max(v[i0] - m, 0.0);
		v[i0] -= a;
		v[i1] -= a;
		v[i2] -= a;
		m -= a;

		a = v[i1] - max(v[i1] - m / (c[i1] + c[i2]), 0.0);
		v[i1] -= a;
		v[i2] -= a;
		m -= (c[i1] + c[i2]) * a;

		v[i2] = max(v[i2] - m / c[i2], 0.0);
	}
	
	return Color((int)v[0], (int)v[1], (int)v[2]);
}


Re: Please check the list of 2019.1 changes [message #51211 is a reply to message #51196] Thu, 21 February 2019 09:53 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 19 February 2019 13:30
Hi Mirek,

I only just a couple of days ago updated my Windows 10 to version 1809, which introduced Dark Theme support in Windows File Explorer, which is not a store app, but a desktop application. (This was not available in 1803.) This IMO proves that Microsoft is just in the middle of transition of Windows 10 desktop theming. (E.g. Wordpad and Notepad do not have a clue about the Light/Dark mode.) I would expect Microsoft to release some documentation about how this Dark/Light theme support is supposed to be done on Windows 10 with desktop applications. (Unless they have and I just could not find it, of course.)

I think the non-client areas are controlled by DWM which can use the user selected accent color to draw the caption. Just select "Personalize > Colors > Show accent color on the following surfaces > [V] Title bars and window borders". And this is up to Windows and the user to select and handle anyway. U++ is only responsible for painting the client area.

-

In my opinion, just basic handling of Dark/Light theme in a way that makes the application to fit in is enough. In case of Windows 10, it is all about using the knowledge of Windows Dark/Light mode, the Colorization color and the Accent color. (For those functions I posted the code earlier here.) Everything else could be solved from there. Nothing fancy, just the basics.

-

In the end of the day, this is not a high priority issue for me. I can largely live on light theme too. I just have the feeling that the dark theme is slowly emerging and it will need sufficient support, but maybe not this month yet.

Best regards,

Tom


Well, I have meanwhile found that you can actually activate correct windows captions in settings, so the game is back on... Smile

The key now is the fact that we can detect that system colors do not correspont to dark mode settings and adjust everything accordingly.
Re: Please check the list of 2019.1 changes [message #51217 is a reply to message #51211] Fri, 22 February 2019 08:40 Go to previous messageGo to next message
Tom1
Messages: 659
Registered: March 2007
Contributor
mirek wrote on Thu, 21 February 2019 10:53

...

Well, I have meanwhile found that you can actually activate correct windows captions in settings, so the game is back on... Smile

The key now is the fact that we can detect that system colors do not correspont to dark mode settings and adjust everything accordingly.


Hi,

Can you point out where the correct windows captions are set?

BR, Tom
Re: Please check the list of 2019.1 changes [message #51221 is a reply to message #51217] Fri, 22 February 2019 19:04 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Tom1 wrote on Fri, 22 February 2019 08:40
mirek wrote on Thu, 21 February 2019 10:53

...

Well, I have meanwhile found that you can actually activate correct windows captions in settings, so the game is back on... Smile

The key now is the fact that we can detect that system colors do not correspont to dark mode settings and adjust everything accordingly.


Hi,

Can you point out where the correct windows captions are set?

BR, Tom


Uhm same place you suggest... "Personalize > Colors > Show accent color on the following surfaces > [V] Title bars and window borders"
Previous Topic: Please check the list of 2019.1 changes
Next Topic: Anybody willing to look into OpenSSL Win32 compilation?
Goto Forum:
  


Current Time: Thu Nov 14 07:13:15 CET 2019

Total time taken to generate the page: 0.03425 seconds