Feature - Implemented Req: Dark Theme (from InfoPowerBroker)

philmasterplus

Active member
  1. For me, the Flatlaf themes put 36 lines in the same space that the native themes have 33 lines. Your gCLI has about 40 lines. Might be this flatlaf/openJDK issue. I can try changing that setting, but it's not necessarily fixable. What OS version/Java version/Theme do you see this with?

  • OS: Windows 10 Enterprise 2004 (build 19041.630) KR
  • Java: AdoptOpenJDK build 11.0.8+10 (64-bit). If it helps, I'm launching the JAR via javaw -jar.
  • Theme: Dracula, though I have tested ~20 new themes so far and all of them have smaller gCLI fonts than the "OS default" (Windows)/Metal/Nimbus themes.
 

Xande1

Member
Not 100% sure this is related to the new theme support code (UI stuff is way out of my area), but that seemed like the best bet, so I'm reporting here. Feel free to move if this turns out to be unrelated to the recent theme fiddling.

Using "OS Default" look & feel (but seems to happen with other themes as well), the number of adventures box is only wide enough to display a single digit. Taking the number of adventures beyond 10 results in only the last digit displaying. Re-sizing the mafia window to be wider (I tried up to about 2.5 times the default width) doesn't increase the size of the box. Was working fine a few versions ago. See attached partial screenshot.

Running on Linux.


r20535 fixed this issue! That's what I get for not updating before I complain! Thanks for the prompt action.
 
Last edited:

MCroft

Developer
Staff member
Not 100% sure this is related to the new theme support code (UI stuff is way out of my area), but that seemed like the best bet, so I'm reporting here. Feel free to move if this turns out to be unrelated to the recent theme fiddling.

r20535 fixed this issue! That's what I get for not updating before I complain! Thanks for the prompt action.
Yep, that was the theme support. I needed to adjust it a bit and got it wrong. Last thing I touched, first thing I fixed...

And thank you for the report!
 
Last edited:

MCroft

Developer
Staff member
  • OS: Windows 10 Enterprise 2004 (build 19041.630) KR
  • Java: AdoptOpenJDK build 11.0.8+10 (64-bit). If it helps, I'm launching the JAR via javaw -jar.
  • Theme: Dracula, though I have tested ~20 new themes so far and all of them have smaller gCLI fonts than the "OS default" (Windows)/Metal/Nimbus themes.
The Flatlaf themes specify Helvetica Neue 13 on MacOS.
This is the font for all the built in themes, as detected on my system.

Mac OS X[family=Lucida Grande,name=Lucida Grande,style=plain,size=13]
Metal[family=Dialog,name=Dialog,style=plain,size=12]
Nimbus[family=SansSerif,name=sansserif,style=plain,size=12[/TD]
CDE/Motif[family=Serif,name=Serif,style=plain,size=12]
All the Flatlaf themes[family=Helvetica Neue,name=Helvetica Neue,style=plain,size=13]
[TD]

Clearly some of that isn't happening. CDE/Motif doesn't show me fonts with serifs.

Helvetica Neue is likely to be replaced by Arial on Windows, but that won't break this, unless you have a very odd sized Arial. It also looked like it wasn't a HiDPI font, but maybe that was just the image. The theme is HiDPI compatible, supposedly.

I can't reproduce it, so I either need someone with a Windows dev setup to help, or I need to give you an instrumented jar file that you can run and report what it says.
 

AlbinoRhino

Active member
If you go to Preferences > Chat Options ... the first 3 options in that panel seem to affect the text size in the cli. For the themes which appear with small fonts, I was able to easily adjust the size to something more readable with those.
 

MCroft

Developer
Staff member
If you go to Preferences > Chat Options ... the first 3 options in that panel seem to affect the text size in the cli. For the themes which appear with small fonts, I was able to easily adjust the size to something more readable with those.
Well, I definitely wouldn't have tried that. Not sure this solves @philmasterplus 's problem, but it might give us a workaround...
 

philmasterplus

Active member
If you go to Preferences > Chat Options ... the first 3 options in that panel seem to affect the text size in the cli. For the themes which appear with small fonts, I was able to easily adjust the size to something more readable with those.

Perfect! This solved the gCLI font size issue.
 

Captain Scotch

New member
Croft, thank you for your work on this. Really excited to have a less-glaring mafia experience. :) I think this was mentioned on a prior page, but I'd echo that the red/blue coloring for stats being above/below your base on the sidebar is a bit painful on essentially all of the dark mode themes. My simple fix recommendation would be to make the "above stat" color equivalent to whatever the "suggested" text color is on the sidebar and the "below stat" color equivalent to the color of the leveling bar; this would make it stand out when it's below your base stats, which (IME) is the more important highlight point.
 

MCroft

Developer
Staff member
Yeah, I’m not good with colors. The goal was “not unusable”, so I could get feedback, which is working.

I think I’m going to pick better defaults (Phil master’s suggestions)and then add these to the color picker, so it’s no longer up to me.
 

philmasterplus

Active member
Tweak: r20535 fixes the issue where some themes set the AdventureSelect.countField size too small.

Could we increase the countField size a little bit more? The field is still a bit too small on my system when using any of the new flatlaf themes.

By the way, my system is:

  • OS: Windows 10 Enterprise 2004 (build 19041.630) KR
  • Java: AdoptOpenJDK build 11.0.8+10 (64-bit)

I increased the width from 60 to 75 and it seems good enough. Here are screenshots of before & after:

r20543-countField-before.png r20543-countField-after.png

I'm also attaching a patch file in case you need one.

P.S. Another problem with the new themes: many UI elements become too narrow height-wise, e.g. the login ID/PW textfields, mall search text fields, dropdowns in the Gear Changer/Choice Adventures panel, ... it might be an OS/JDK-specific thing, so I'm hesitant to file it as a bug.
 

Attachments

  • philmasterplus-increase-countField-width.patch
    1,004 bytes · Views: 2

MCroft

Developer
Staff member
Could we increase the countField size a little bit more? The field is still a bit too small on my system when using any of the new flatlaf themes.

By the way, my system is:



I increased the width from 60 to 75 and it seems good enough. Here are screenshots of before & after:

View attachment 10014 View attachment 10013

I'm also attaching a patch file in case you need one.
always welcome,

r20544
P.S. Another problem with the new themes: many UI elements become too narrow height-wise, e.g. the login ID/PW textfields, mall search text fields, dropdowns in the Gear Changer/Choice Adventures panel, ... it might be an OS/JDK-specific thing, so I'm hesitant to file it as a bug.
Is it that they're too narrow or that they have a margin? I've seen what looks like both...

I've had a lot of trouble figuring that out. some fields I added a pixel or two to. Some that look good with everything look too far apart in the Motif LaF.
 

MCroft

Developer
Staff member
20546 adds the more harmonious colors from this post.

Still need to look at location browser and remove dark background from the mini brower.

Still haven't implemented Hot Dog Stand.

I have a way in mind to not overwhelm Frono (and others) with 60+ new themes. Will play with that. When I initially messed with Darkmode, I assumed that fixing it to change on-the-fly would handle this, but a checkmark for all but the basic 5 or so FlatLaf themes would be in keeping with the FlatLaf demo...
 

infopowerbroker

New member
Wow, I'm late to the party but I'm thrilled to see this new development. I'm trying out Arc Dark - Orange, and so far it's really good.

For KOL proper, I've been rolling a dark theme in Stylus (inverting image color and swapping white and black colors within the CSS, making minor tweaks to tourguide and chit css as needed), so this lets me play without the blinding white - it's amazing!

Playing around with this the past few hours, the one thing I noticed:
Dark Mode - Mafia Loathing Chat - Player nnames are difficult to read in the chat window when they post
(Ex: [14:50] Infopowerbroker: Dark Mode in Mafia is neat!]

Everything else is really coming along after a I realized I needed to restart mafia for things like tab names to change color.

Also, if anyone wants to see my chicken-scratch stylus 'dark theme', let me know and I can post it.

Thank you. You are all +1 in my book.
 

MCroft

Developer
Staff member
Thanks for the suggestion in the first place. It was fun to work with and I learned a bunch about Look and Feel by doing it.

I'll take a look at chat. As a loner curmudgeon, I don't chat in KoLMafia chat much...

I also have problems if I start in Dark mode and switch to light mode with icons.

It used to be that KoLmafia handled that by not changing the L&F until you restarted. That's also the official recommendation from Oracle, but it seems like most programs ignore that advice.

So, my solution has been to fix the ones that need fixing as we find them, prioritizing
 

fronobulax

Developer
Staff member
I'll take a look at chat. As a loner curmudgeon, I don't chat in KoLMafia chat much...
I haven't used chat to interact with another person for several years.

I have a multi who has never visited the Altar of Literacy so I can smugly point out a fix or feature was implemented incorrectly :)
 

MCroft

Developer
Staff member
Frono, I found that I could talk to chatbot and it gave me the color issues, so we can keep on working without breaking our streak.

It seems like there are two possible approaches:
1: change the background back to browser-isn off-white for the chat window
2: Intercept and re-write incoming chats to use different colors (perhaps from the color picker, or a standard set of dark-colors, like we're doing elsewhere).

I'd prefer approach #2. Ideally, I'd prefer approach #2 and it included a set of colors that looked good on light and dark backgrounds.

The description window and the mini-browser also need work in this area.

For the mini-browser approach #1 may have to be done, because a number of graphical elements depend on transparency over a white field and
 

infopowerbroker

New member
Frono, I found that I could talk to chatbot and it gave me the color issues, so we can keep on working without breaking our streak.

It seems like there are two possible approaches:
1: change the background back to browser-isn off-white for the chat window
2: Intercept and re-write incoming chats to use different colors (perhaps from the color picker, or a standard set of dark-colors, like we're doing elsewhere).

I'd prefer approach #2. Ideally, I'd prefer approach #2 and it included a set of colors that looked good on light and dark backgrounds.

The description window and the mini-browser also need work in this area.

For the mini-browser approach #1 may have to be done, because a number of graphical elements depend on transparency over a white field and
Depending on if someone is wearing the vampyric cloake , a's and b's have dark red colors (made worse in dark mode) If the html rewrite can force those colors into a different color scheme, that could be helpful.

Sample HTML:
HTML:
font color="#7695B4">[20:10]</font> <a href="showplayer.php?who=1234567"><b><font color="black">player1234567</font></b></a>: <font color=darkred>o</font>h ye<font color=darkred>a</font>h - since I h<font color=darkred>a</font>ven't <font color=darkred>b</font>e <font color=darkred>a</font>r<font color=darkred>o</font>und since the <font color=darkred>o</font>p<font color=darkred>a</font>ndemic st<font color=darkred>a</font>rted - I n<font color=darkred>o</font>w d<font color=darkred>o</font> duet style <font color=darkred>a</font>udi<font color=darkred>o</font><font color=darkred>b</font><font color=darkred>o</font><font color=darkred>o</font>ks <font color=darkred>a</font>lm<font color=darkred>o</font>st exclusively<br>
 
Top