Incidencia #44851

qt client, changing font hides options dlog

Abrir Fecha: 2022-06-18 05:25 Última actualización: 2022-07-29 05:58

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
3

Details

Seen with 3.0.1 on a Mac - possibly a Mac only bug.

Open the "Set local options" dlg, go to the Font tab. Click on any of the font settings buttons, the "Select font" dlog appears. When you click either "Cancel" or "OK" the "Select font" dlog disappears (correct) but the main window (could be map view, Nations, Cities, Research) comes to the front and hides the "Set local options" dlg (incorrect). Could be related to Ticket #43943.

Ticket History (3/17 Histories)

2022-06-18 05:25 Updated by: ddeanbrown
  • New Ticket "qt client, changing font hides options dlog" created
2022-06-20 18:17 Updated by: cazfi
Comentario

Like #43943, I cannot reproduce this at the moment (should try to setup a virtual machine with an environment where these might happen)

Does this happen both when the options have been opened from a main menu button (client launch screen) and when the options are opened through the menus in game?

2022-06-26 01:41 Updated by: cazfi
Comentario

There's several things that one could experiment with, but one thing that would be Mac specific is "QFontDialog::DontUseNativeDialog" that is documented as "Use Qt's standard font dialog on the Mac instead of Apple's native font panel." - and as we don't set that "Dont" flag, presumably Mac has its own behavior here.

Making a patch to test with that flag set in a second.

2022-06-26 01:53 Updated by: cazfi
Comentario

Reply To cazfi

There's several things that one could experiment with, but one thing that would be Mac specific is "QFontDialog::DontUseNativeDialog" that is documented as "Use Qt's standard font dialog on the Mac instead of Apple's native font panel." - and as we don't set that "Dont" flag, presumably Mac has its own behavior here. Making a patch to test with that flag set in a second.

Attached. It actually makes a difference in my Linux - and I much preferred the native dialog that this disables.

2022-06-26 02:25 Updated by: ddeanbrown
Comentario

Tried the patch and it does fix the bug on my Mac. Suggest make it a Mac-only change if you prefer.

2022-06-26 04:10 Updated by: cazfi
Comentario

Reply To ddeanbrown

Tried the patch and it does fix the bug on my Mac. Suggest make it a Mac-only change if you prefer.

Thanks for testing. So that's one way to resolve the issue, though I'm a bit worried that all this is just a symptom of deeper problem with the options dialog setup. The other a bit similar option type (opening a further selection dlg etc) - color selection - is very buggy: #44947. I've get a rewrite patch for that coming soon, but I wonder if that dialog works on Mac even with my fixes.

(btw. did you notice new comments on #44906?)

2022-06-26 04:47 Updated by: ddeanbrown
Comentario

I have added comments to #44906 and #44947.

2022-06-26 20:36 Updated by: cazfi
Comentario

Reply To cazfi

Reply To cazfi

"QFontDialog::DontUseNativeDialog" Making a patch to test with that flag set in a second.

btw. That patch has a side-effect that it makes the dialog header translatable with our gettext system (not relying on Qt's own translation - which we don't have in some environments). That part we should implement anyway.

2022-06-27 07:29 Updated by: cazfi
Comentario

Reply To cazfi

btw. That patch has a side-effect that it makes the dialog header translatable with our gettext system (not relying on Qt's own translation - which we don't have in some environments). That part we should implement anyway.

-> #44957. I want that one in already, for the translators to have the new strings to work on. For this ticket I still want to investigate options, and update for the color selection dialog part is needed anyway.

2022-07-16 18:31 Updated by: cazfi
Comentario

I wonder if raise() would solve this one too, like it did #43943. Can you test with the attached debug_optdlg_raise.patch ?

2022-07-18 07:37 Updated by: ddeanbrown
Comentario

That patch seems to be based on a reworked optiondlg.cpp file that doesn't match what I have as 3.0.2 source - option_dialog::set_font() renamed to option_dialog::select_font(), and the color change code unrecognizable. But I was able to verify that using raise() instead of using the QFontDialog::DontUseNativeDialog flag does fix the font change problem. I was also able to verify that using raise() will fix the similar color change bug.

2022-07-25 10:35 Updated by: cazfi
Comentario

Reply To ddeanbrown

That patch seems to be based on a reworked optiondlg.cpp file that doesn't match what I have as 3.0.2 source

Nightly generated tarballs of the current code (of each branch) under https://files.freeciv.org/nightly/

Thanks for testing anyway. I'll make a real patch.

2022-07-25 10:40 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
2022-07-29 05:58 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Entrar