SDLIDE Dark Mode?

Discussions related specifically to the Windows, Linux (86), Mac OS-X and Raspberry Pi editions of BB4W and BBCSDL
guest
Posts: 268
Joined: Mon 02 Apr 2018, 09:12

SDLIDE Dark Mode?

Post by guest » Fri 07 Dec 2018, 15:15

I've received a request to implement a 'Dark Mode' in SDLIDE (in which the background colours are predominantly dark and the foreground colours light, the reverse of the normal colour scheme). Personally I'm not a great fan of this style, but it does seem to be popular with some people (both Windows 10 and MacOS Mojave have Dark Mode settings).

Before attempting this, and it's not at all straightforward to achieve (not least because of all the various 'selected', 'pressed' and 'disabled' colour combinations used) I would be interested to know what the demand for it is. Would you use a Dark Mode if it was provided? Do you think it's a good idea?

p_m21987
Posts: 137
Joined: Mon 02 Apr 2018, 21:51

Re: SDLIDE Dark Mode?

Post by p_m21987 » Fri 07 Dec 2018, 15:48

yes I would use a dark mode
Last edited by p_m21987 on Fri 07 Dec 2018, 18:12, edited 2 times in total.

David Williams
Posts: 80
Joined: Wed 04 Jul 2018, 16:23

Re: SDLIDE Dark Mode?

Post by David Williams » Fri 07 Dec 2018, 16:03

guest wrote:
Fri 07 Dec 2018, 15:15
Before attempting this, and it's not at all straightforward to achieve (not least because of all the various 'selected', 'pressed' and 'disabled' colour combinations used) I would be interested to know what the demand for it is. Would you use a Dark Mode if it was provided? Do you think it's a good idea?
I would be interested -- although, for me, I would especially like it for the BB4W IDE (because that's what I use). it's an option I've been meaning to request for years. I don't know if that's on offer, or if it's only SDLIDE that would include the option of a 'dark theme'. I do my programming activities at night in a dark room (actually a shed), and the white background of the current IDEs can be like staring into a flashlight! (And yes, I have the screens dimmed as far down as possible without resorting to 3rd party utilities).

David.
--

guest
Posts: 268
Joined: Mon 02 Apr 2018, 09:12

Re: SDLIDE Dark Mode?

Post by guest » Fri 07 Dec 2018, 16:56

David Williams wrote:
Fri 07 Dec 2018, 16:03
I would especially like it for the BB4W IDE (because that's what I use).
The BB4W IDE uses standard Windows GUI elements so the colour scheme is out of my control; it should automatically adopt whatever 'theme' the user has chosen (although since it does not respond to the WM_THEMECHANGED broadcast message you will need to close and re-open it to pick up any changes). For whatever reason, the Windows 10 'dark mode' seems not to be implemented by changing the theme, therefore you will need to use traditional means for changing the GUI colours, but absolutely BB4W should follow suit.
I don't know if that's on offer, or if it's only SDLIDE that would include the option of a 'dark theme'.
It's only SDLIDE because, naturally for a cross-platform utility, it takes no notice of the Windows theme.
the white background of the current IDEs can be like staring into a flashlight!
There's never been any need to run BB4W with a bright background if you don't want to. Of course if you change the background colour it will affect not just BB4W but all other apps which respect the current theme, and it's possible that you have some apps that don't look good with that change. In that event I would suggest you write a custom 'app launcher' for BB4W which switches the theme to a dark background, runs BB4W, and then restores the theme to what it was. That way you can actually take advantage of BB4W not handling the WM_THEMECHANGED message!

guest
Posts: 268
Joined: Mon 02 Apr 2018, 09:12

Re: SDLIDE Dark Mode?

Post by guest » Fri 07 Dec 2018, 17:12

Patrick M wrote:
Fri 07 Dec 2018, 15:48
I achieved the result by hacking the code very messily and haphazardly until the result looked good enough to use.
In that case how do you repeat the changes for each new version? SDLIDE has been updated at virtually every new release of BBCSDL, several of the changes having been to fix serious bugs and others to enable important new features like 'Create Application'. It will be changed again in the next release (even if the 'dark mode' is not implemented).
If you want, I can post the code for my modified version.
Not given what you have said about how the modifications were achieved, no! :roll:

guest
Posts: 268
Joined: Mon 02 Apr 2018, 09:12

Re: SDLIDE Dark Mode?

Post by guest » Fri 07 Dec 2018, 18:55

guest wrote:
Fri 07 Dec 2018, 16:56
I would suggest you write a custom 'app launcher' for BB4W which switches the theme to a dark background, runs BB4W, and then restores the theme to what it was.
Here's an (over-) simplistic example of what I had in mind (you will of course also need to change the syntax colouring using BB4W's normal mechanism). It doesn't achieve a proper 'dark mode' because it only changes the background colour of the editing pane, but it could be modified to change more of the GUI colours:

Code: Select all

      _COLOR_WINDOW = 5
      SW_SHOWDEFAULT = &A
      SYS "GetSysColor", _COLOR_WINDOW TO oldbk%
      newbk% = &404040
      idcol% = _COLOR_WINDOW
      SYS "SetSysColors", 1, ^idcol%, ^newbk%
      OSCLI "RUN C:\progra~2\bbcbas~1\bbcwin6.exe"
      SYS "SetSysColors", 1, ^idcol%, ^oldbk%
With some fiddling hopefully you can achieve an acceptable result. I hope you haven't been cursing the bright background when this option has been available to you all along. 8-)

p_m21987
Posts: 137
Joined: Mon 02 Apr 2018, 21:51

Re: SDLIDE Dark Mode?

Post by p_m21987 » Fri 07 Dec 2018, 19:05

guest wrote:
Fri 07 Dec 2018, 17:12
In that case how do you repeat the changes for each new version? SDLIDE has been updated at virtually every new release of BBCSDL, several of the changes having been to fix serious bugs and others to enable important new features like 'Create Application'. It will be changed again in the next release (even if the 'dark mode' is not implemented).
oh, well, i just kept using the same old version because it worked. whatever those bugs were, they probably never affected me.
Last edited by p_m21987 on Sun 09 Dec 2018, 20:21, edited 1 time in total.

guest
Posts: 268
Joined: Mon 02 Apr 2018, 09:12

Re: SDLIDE Dark Mode?

Post by guest » Fri 07 Dec 2018, 20:18

Patrick M wrote:
Fri 07 Dec 2018, 19:05
oh, well, i just kept using the same old version because it worked.
Only recently you reported a bug in SDLIDE (in the '2D game using SDL functions. Should I continue this project?' thread) and in so doing presumably you were hoping that I would fix it. I'm rather puzzled if it wasn't your intention to take advantage of that fix (which I have now carried out).

You seem to have removed the screenshots you posted of your modified version, so I don't even have the option of trying to persuade you to update by matching your 'dark mode' with something of my own devising. Incidentally, how did you manage to change the menu bar and toolbar colours? They are simply *DISPLAYed as a bitmap image so if you have an edited 'dark' version of that bitmap it would be very helpful to have a copy.

guest
Posts: 268
Joined: Mon 02 Apr 2018, 09:12

Re: SDLIDE Dark Mode?

Post by guest » Fri 07 Dec 2018, 23:59

In the absence of a reference to work towards, a very quick tweak gives this (ignore the toolbar button colours):

Image

Is this anything like what people are looking for?

David Williams
Posts: 80
Joined: Wed 04 Jul 2018, 16:23

Re: SDLIDE Dark Mode?

Post by David Williams » Sat 08 Dec 2018, 00:48

guest wrote:
Fri 07 Dec 2018, 23:59
Is this anything like what people are looking for?
Yes, as far as I'm concerned.


David.
--

Post Reply