How about a dark GUI for TC?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: How about a dark GUI for TC?

Post by *MVV »

Why do you ask here? TC doesn't use Windows 10 dark/light mode feature, it has own color settings...
User avatar
SSc
Junior Member
Junior Member
Posts: 67
Joined: 2015-10-27, 10:12 UTC
Location: Karlsruhe

Re: How about a dark GUI for TC?

Post by *SSc »

MVV wrote: 2019-10-01, 06:57 UTC Why do you ask here? TC doesn't use Windows 10 dark/light mode feature, it has own color settings...
As Ghisler wrote clearly in the course of this thread, the upcoming version will support the Win 10 API functions for dark mode. And since he does it based on a Github sample for Win32 apps, the user is asking for a hint on how to do that on his own application. Quite legitimate, actually.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How about a dark GUI for TC?

Post by *ghisler(Author) »

2Erik-DJ
It's not easy. For some controls like listboxes, you can simply call
SetWindowTheme(handle,'DarkMode_Explorer',nil);
Others need to be owner drawn by yourself.

Also make sure to call AllowDarkModeForApp BEFORE opening any forms, otherwise context menus will be wrong.
But it's a LOT of work, I've been working on that for months now...

Here is how I load the special functions:

Code: Select all

type
     tIsDarkModeAllowedForApp=function:bool; stdcall;
     tShouldAppsUseDarkMode=function:integer; stdcall;  // only bit 1!
     tAllowDarkModeForWindow= function(a_HWND:HWND;a_Allow:boolean):bool; stdcall;
     tAllowDarkModeForApp=function(mode:integer):bool; stdcall;

var
    IsDarkModeAllowedForApp:tIsDarkModeAllowedForApp=nil;
    ShouldAppsUseDarkMode:tShouldAppsUseDarkMode=nil;
    AllowDarkModeForWindow:tAllowDarkModeForWindow=nil;
    AllowDarkModeForApp:tAllowDarkModeForApp=nil;

      IsDarkModeAllowedForApp:=GetProcAddress(themelib, MAKEINTRESOURCE(139));
      ShouldAppsUseDarkMode:=GetProcAddress(themelib, MAKEINTRESOURCE(132));
      AllowDarkModeForWindow:=GetProcAddress(themelib, MAKEINTRESOURCE(133));
      AllowDarkModeForApp:=GetProcAddress(themelib, MAKEINTRESOURCE(135));
Author of Total Commander
https://www.ghisler.com
Erik-DJ
Junior Member
Junior Member
Posts: 39
Joined: 2007-09-15, 14:53 UTC
Location: Noord-Brabant, The Netherlands

Re: How about a dark GUI for TC?

Post by *Erik-DJ »

Thank you Christian, it's beginning to work in my project, but it's a lot of work indeed.
I also found this Pascal example: https://www.haijin-boys.com/wiki/ダークモード対応
I can get the main menu items dark, but not the main menu itself. And I think it's strange you have to set the color of the forms yourself... Perhaps I'm doing something wrong.
Good luck with testing TC 9.5.
Thany
Senior Member
Senior Member
Posts: 292
Joined: 2003-09-30, 09:20 UTC
Location: Netherlands

Re: How about a dark GUI for TC?

Post by *Thany »

I've tried it out in the latest beta 9.50, but I feels a bit too contrasty still. I'm sure it'll get some more love before the final version, but I thought I'd mention it. It feels a bit rudimentary.

Maybe it's because TC has a very "liney" interface :) There are a lot of lines everywhere, to separate elements, rather than using background colours or spacing, or other ways to separate elements. Sometimes just glueing things together is fine, too. Designing GUI's is a subtle practice, and definitely not easy.
Maybe it's a good idea to take a look at the dark mode of a popular code editor, Visual Studio Code (not Visual Studio!). They've absolutely *nailed* dark mode, and I think TC could (or should) at least borrow some ideas from VS Code.
Total Commander 11 on Windows 10
User avatar
brouer
Junior Member
Junior Member
Posts: 5
Joined: 2016-12-05, 15:25 UTC

Re: How about a dark GUI for TC?

Post by *brouer »

Well, VS Code is using Electron (HTML + CSS) for its look. Total Commander uses native Win32 widgets.
Some differences in design language are to be expected.

IMHO (and such things will always be a matter of personal preference), I greatly prefer Total Commander's current dark mode to any other file managers' attempts at the same, and also prefer this old-school native look to the current trend for space-wasting webby interfaces.

Of course, I am an ancient relic when it comes to computers, so what do I know. 👴

(I suspect the average age of Total Commander users to be somewhat advanced.) :D
Thany
Senior Member
Senior Member
Posts: 292
Joined: 2003-09-30, 09:20 UTC
Location: Netherlands

Re: How about a dark GUI for TC?

Post by *Thany »

I'm pretty ancient as well, but I tend to embrace modern UI a little bit more easily. No offense :)

I really don't think the programming language, or UI framework for that matter, needs to make much of a difference. In the end the application typically has full control over how a control draws itself. In my past life I've been hobby'ing with Delphi and I know it's not easy, but certainly doable, to make "native" controls draw themselves completely differently.

I also really don't think GUI style/layout is *completely* a matter of personal preference. There aren't whole studies about UI and UX design for nothing, and the extent to how well a UI works is completely measurable by usertesting. This is how many high-budget programs get an excellent UI. Low-budget programs tend to go with community-driven testing, as well as designers willing to donate some of their time.

That last part is difficult for TC to pull off, because of its "closed" nature. It's not opensource, is it. TC has always felt like a one man show (not sure if it is), which results in UI that tends to have a strange learning curve, or a slow pace towards something really good and awesome. Not entirely sure how (and if) TC should deal with this kind of issue.
Total Commander 11 on Windows 10
Thany
Senior Member
Senior Member
Posts: 292
Joined: 2003-09-30, 09:20 UTC
Location: Netherlands

Re: How about a dark GUI for TC?

Post by *Thany »

And also, please rename `Dark<>Normal` in the menu to `Dark`.
It's a checkbox, so Dark checked means dark mode. If `Dark<>Normal` is checked, it's confusing UX-wise, which one the program thinks is active.

Also, `Dark<>Normal` feels diminuitive, as if dark mode is not normal :(
You would never say "Asain people and normal people" so the same logic applies to user settings.
Total Commander 11 on Windows 10
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How about a dark GUI for TC?

Post by *ghisler(Author) »

I think it's more clear as it is now. Dark<->Normal tells the user that he can toggle the option, and "Dark" gets checked when in dark mode.
Author of Total Commander
https://www.ghisler.com
Thany
Senior Member
Senior Member
Posts: 292
Joined: 2003-09-30, 09:20 UTC
Location: Netherlands

Re: How about a dark GUI for TC?

Post by *Thany »

Dark is normal to me.
Total Commander 11 on Windows 10
Paul Mountit
Junior Member
Junior Member
Posts: 66
Joined: 2020-04-18, 21:04 UTC

Re: How about a dark GUI for TC?

Post by *Paul Mountit »

I did a quick mockup of a TC with dark theme based on the colours of Visual Studio 2019, I think it's better without all that white lines
Image: https://1drv.ms/u/s!AimXu829oSwehH2DAVbeE4EREXUA
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Re: How about a dark GUI for TC?

Post by *Ovg »

2Paul Mountit
I don't think so, for me look quite ugly....
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
bogordo
Member
Member
Posts: 150
Joined: 2019-12-06, 09:07 UTC

Re: How about a dark GUI for TC?

Post by *bogordo »

Paul Mountit wrote: 2020-04-18, 21:13 UTC I did a quick mockup of a TC with dark theme based on the colours of Visual Studio 2019, I think it's better without all that white lines
Image: https://1drv.ms/u/s!AimXu829oSwehH2DAVbeE4EREXUA
Nice, how did you remove the white lines?
TC license #346559
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: How about a dark GUI for TC?

Post by *Hacker »

Paul Mountit,
Habe you tried
wincmd.ini
[Layout]
DarkListBorders=0
:?:

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Paul Mountit
Junior Member
Junior Member
Posts: 66
Joined: 2020-04-18, 21:04 UTC

Re: How about a dark GUI for TC?

Post by *Paul Mountit »

bogordo wrote: 2020-04-19, 06:08 UTC
Paul Mountit wrote: 2020-04-18, 21:13 UTC I did a quick mockup of a TC with dark theme based on the colours of Visual Studio 2019, I think it's better without all that white lines
Image: https://1drv.ms/u/s!AimXu829oSwehH2DAVbeE4EREXUA
Nice, how did you remove the white lines?
it's a mock-up. a simulation, a picture, not a real app :)
Post Reply