Dialog appearance in Rhino 8 dark mode

Hi,
I have running Rhino 8 on Windows 11 in dark mode.
Unfortunately some GUI widgets are looking strange, displayed in wrong colors for dark mode. Especially texts on group boxes (black on dark grey) and text on some buttons (bright on white, CRhinoUiOptionsListCtrlPushButton). See images below. My questions are:

  • Can I programatically (C++) find out, if Rhino is currently in dark mode?
  • Do you have any suggestion for setting the appearance globally for all GUI objects of a type (like group box)?
  • Or do I need to address this problem individually on each dialog?
    Many thanks

grafik

Please find here the Rhino SystemInfo:

Rhino 8 SR6 2024-4-10 (Rhino 8, 8.6.24101.05001, Git hash:master @ 32c244aa711e0034e75bec2e87d093c764820b96)
License type: Kommerziell, build 2024-04-10
License details: Cloud Zoo

Windows 11 (10.0.22631 SR0.0) or greater (Physical RAM: 32GB)
.NET 7.0.0

Computer platform: LAPTOP - Plugged in [92% battery remaining]

Hybrid graphics configuration.
Primary display: Intel(R) UHD Graphics (Intel) Memory: 1GB, Driver date: 7-11-2023 (M-D-Y).
> Integrated graphics device with 4 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port
Primary OpenGL: NVIDIA GeForce RTX 4060 Laptop GPU (NVidia) Memory: 8GB, Driver date: 9-27-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 537.53
> Integrated accelerated graphics device with 4 adapter port(s)
- Video pass-through to primary display device

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 9-27-2023
Driver Version: 31.0.15.3753
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 8188 MB

Rhino plugins that do not ship with Rhino
C:\Users\ps\Develop\CS_RhinoPlugin_build_RhinoPlugIns_64_R8\bin\Debug\CS_ModelingPlugIn.rhp “Cyberstrak Modeling PlugIn”

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 8\Plug-ins\Commands.rhp “Commands” 8.6.24101.5001
C:\Program Files\Rhino 8\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 8.6.24101.5001
C:\Program Files\Rhino 8\Plug-ins\RhinoRender.rhp “Legacy Rhino Render”
C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 8.6.24101.5001
C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp “MeshCommands” 8.6.24101.5001
C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp “RhinoCycles” 8.6.24101.5001
C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 8.6.24101.5001
C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp “Displacement”
C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp “SectionTools”

1 Like

@curtisw can you help with this?

1 Like

Hi Peter,

seems you have the same problem as me

@dale made a comment on my post Dark/Light theme GUI changes - #2 by dale and suggested to derive all static texts (and i assume also your group boxes) from CRhinoUiStaticEx or at least CRhinoUiStatic

Unfortunately this leads to a lot of work changing all those static text fields (same on my project).
Dale also mentioned this problem is well known at least since V7, but he did not say anything if it’s reported or planned to fix.

1 Like

Hi dsw,
yes it looks the same.
Even if we derive all statics it would still be very useful, to get at least the information if Rhino is running in dark mode or not.

I was looking in CRhinoAppSettings, but only in the Mac part there is something like this:

// application visual theme
enum {
application_visual_light_theme = 0,
application_visual_dark_theme,
};

Something like this should also be supposed on Windows.

1 Like

Hi @Peter_Salzman,

I’m working on some SDK additions to help. I’m hoping to get these additions into Rhino 8.8.

Thanks,

– Dale

1 Like

Great to hear! I’m always looking for the newest SDK versions.

1 Like

@Peter_Salzman - I’ve added a new CRhinoUiPaintColorSettings::RunningInDarkMode method to the Rhino 8.7 C++ SDK. I’m hoping this and the colors found on this class are enough for C++ developers.

– Dale

1 Like

@Dale, thanks a lot, this is great!
Btw, the Text colors on the group boxes look now OK automatically!

2 Likes

Hm, it looks I was not correct in my last remark. Had to dp some other things and just came back to the topic these days.

My problem is concerning the group box texts. When I toggle Rhino to dark mode, some dialogs appear with white, some with dark text color. Maybe it depends, if OnInitDialog() was called already, when the mode was changed.

1 Like

With Dales latest changes I can now find out, that Rhino runs in dark mode. Then I tried to find a way to change the text color of my group box text. Unfortunately all my goup boxes are created using the MFC resource editor (I know, this is a very old legacy kind way of doing it…).

So they are just accessible as CButton via getDlgItem(IDC_MY_GROUPBOX). Is there any other idea to influence the text color?

1 Like

One addition: I also tried to implement OnCtlColor();

I was successfully able to influence some colors (as CStatic label colors). But the whole dialog is ignoring Rhino’s dark mode setting, the dialog appears in bright mode and it looks that I have to configure now the complete dialog appearance.

OK, I tried it and can configure statics, edit fields, dialog background etc. But I did not find any way to change group box label colors…

1 Like

Hi @Peter_Salzman,

I don’t believe group boxes can be owner drawn. And since tabbed dockbars are not receiving WM_CTLCOLOR messages, I think the best approach is to create a new static control that draws like a group box. This instead of using a button with the BS_GROUPBOX style.

Our CRhinoUiSeparator is a good start on this.

image

The Continuity and Preserve other ends labels are CRhinoUiSeparator controls. It wouldn’t take much to draw a line around the bounding rectangle.

I’ll add it to my pile.

– Dale

1 Like

Thanks Dale!
For now I used a quick & dirty solution (removed all texts from the group boxes and added static texts which work OK):
grafik

1 Like