Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu buttons text are disturbed when O's Dark/dusk color scheme have been used. #239

Open
Hakansv opened this issue Jul 7, 2023 · 3 comments
Assignees
Labels

Comments

@Hakansv
Copy link
Collaborator

Hakansv commented Jul 7, 2023

Compare this CF post

When dark/dusk color scheme are or have been used menu buttons text are not correct shifted.
One example using Emulator:
"Threshold" is the first button in the "Advanced" menu. That text is used for a lot other buttons in dusk color scheme.
Although a false button text the underlying function is correct.
The one method to come back to correct text function after a non daylight scheme have been used is to restart OCPN.

Examples...
Menu: "Advanced=>Installation"
bild
Menu: "View"
bild

@keesverruijt keesverruijt self-assigned this Jul 11, 2023
@keesverruijt
Copy link
Contributor

This is probably a Windows only issue. This suggests it is a bug in wxWidgets as the other platforms don't have this problem as far as I can see.

As I don't use Windows regularly this may prove to be hard to fix.

@Hakansv can you provide an EXACT set of actions how you get this problem? E.g. with ALL button presses? Is it OK if the Menu dialog stays open during the switch to Dusk/Night mode?

@Hakansv
Copy link
Collaborator Author

Hakansv commented Jul 11, 2023

I'll try to fill more details:
The repeated menu text seems to always be the first used in the "Advanced box" described in ConstrolsDialog.cpp: 695
For a 4G where "Noise rejection" is active, as for Franziska, that text is reused. For me at home using Emulator, where "Noise rejection" is not use, the next used menu text is "Threshold" and here that's the one being reused.

Is it OK if the Menu dialog stays open during the switch to Dusk/Night mode?

No. The failure is there as soon a color scheme, dusk/night, is present. No matter if I "Hide radar" or show it. Also if disable radar_pi, restart OCPN, set it to dusk mode and enable radar_pi. So it's not about a certain set of actions to force the failure. It's there all time a dusk/night color scheme is used and all time after that. Even when the color scheme is again reset to day mode. A O restart is needed to get rid of the failure.

As said it's the first used menu text in the "Advanced" menu that's used. In my case with Emulator it's "Threshold".
But the text "Threshold" is not used everywhere. Here comes a collection of all affected menu texts:
Button Adjust: (Should have shown "Range")
bild
Button Advanced=>Installation:
bild
Button View:
bild
Button Guard zones (Is OK)
bild
Button Window. (The second last should be "Transparency")
bild

I could try to debug this but I'm not sure where set a brake and what details to look for. Any advises?

@Hakansv
Copy link
Collaborator Author

Hakansv commented Jul 12, 2023

FWIW:

  • The buttons affected are only those using wxWindowID: ID_CONTROL_BUTTON.
  • When O dusk/night mode is active also the background color for our buttons are changed to gray. I've not so far been to figure out where this background color change is coded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants