Jump to content
The Dark Mod Forums

Dark theme Linux - dark text


Recommended Posts

When having a dark theme applied in Linux, text in the Properties and console window is hard to see because it is black text on a dark window background (the same text color when light theme applied). Is there a way to change this text color manually?

dark-text.jpg.b3f5a06d0a3f1ac38045b8da06c4cfac.jpg

Link to comment
Share on other sites

Ok, thanks for the answer at least. A shame, but it's not overly problematic when I increase the display brightness. I tried looking it up myself, but I have no idea where this would go, so I gave up on it. What is strange is that other text in the ui does change (to light color), for example the names of the textures in the Textures section.

Link to comment
Share on other sites

I can have a look at the code and see if there is something specific we're doing that would override automatic text colour changes (perhaps we are forcing black rather than setting just the default colour for non-inherited properties).

  • Like 1
Link to comment
Share on other sites

9 hours ago, OrbWeaver said:

I can have a look at the code and see if there is something specific we're doing that would override automatic text colour changes (perhaps we are forcing black rather than setting just the default colour for non-inherited properties).

It turns out we were doing exactly this. I have removed all forced colour setting in the Entity Inspector, and instead show the inherited properties in italic text. I think this makes the distinction clear (along with the lack of property type icons) without compromising visibility in either light or dark themes.

darklight.gif.e3d0fa24e51e5b023276f5b43d089b1e.gif

  • Thanks 2
Link to comment
Share on other sites

On 5/20/2021 at 10:01 AM, OrbWeaver said:

I have to rebuild DR again to make this work right?

I tried to find this code in the installation directory, but couldn't find it. I don't really understand where the code ends up after a build, the install folder is a lot smaller than the original source folder.

Link to comment
Share on other sites

Yes, it's source code so you need to rebuild. The code doesn't end up in the installation directory because it gets compiled into machine code and written into the "darkradiant" binary executable and its shared libraries.

  • Like 1
Link to comment
Share on other sites

On 5/19/2021 at 9:32 PM, OrbWeaver said:

It turns out we were doing exactly this. I have removed all forced colour setting in the Entity Inspector, and instead show the inherited properties in italic text. I think this makes the distinction clear (along with the lack of property type icons) without compromising visibility in either light or dark themes.

Thanks for doing this. The text in the Console view in that window is still black though. Could this also be changed with the theme?

Current look in dark theme:

Spoiler

console.jpg.85a98b35cb8f2c92347f1cfe76d3adfd.jpg

Edit (possible solution by editing source files):

Spoiler

The file ConsoleView.cpp in source folder DarkRadiant/libs/wxutil/ has the following code:


ConsoleView::ConsoleView(wxWindow* parent) :
	wxTextCtrl(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH2|wxTE_READONLY),
	_errorAttr(*wxRED),
	_warningAttr(wxColour(128, 128, 0)),
	_standardAttr(wxColour(wxBLACK))

_standardAttr(wxColour(wxBlack)) is the color setting for the standard log text, which currently is black. You can change it to for example wxColour(87, 87, 255) to make it i.m.o. look better on dark themes. So that code looks like this:


ConsoleView::ConsoleView(wxWindow* parent) :
	wxTextCtrl(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH2|wxTE_READONLY),
	_errorAttr(*wxRED),
	_warningAttr(wxColour(128, 128, 0)),
	_standardAttr(wxColour(87, 87, 255))

And this is the look in dark and light theme:

image.png.ea993fac55cd26165465c3cbdd328577.pngimage.png.dc26c3d34af8c033f45693ee0f8ea3ba.png

 

 

 

 

 

Edited by datiswous
Link to comment
Share on other sites

Thanks for locating the relevant code. I fixed it not by choosing a standard colour but by defaulting to no colour at all, which seems to use the default theme-appropriate colour just like the fixed entity property list.

  • Like 1
Link to comment
Share on other sites

Cool, I didn't know of wxNullColour and how that works.

On 5/19/2021 at 9:32 PM, OrbWeaver said:

I have removed all forced colour setting in the Entity Inspector, and instead show the inherited properties in italic text

I was thinking something else earlier. This totally works, but I wonder if it's not clearer if the entity properties (not the inherited ones) are bolted and in that way differentiated instead of making the inherited entities italic. I could test it, but I don't know the relevant code.

 

Edited by datiswous
Link to comment
Share on other sites

The GitHub repository is Greebo's, the GitLab one is mine. Code is synchronised between the two sporadically (usually after a release or one of us implements a significant change), while at other times the code may diverge.

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...