← Back to team overview

kicad-developers team mailing list archive

Re: Kicad's Dialogs

 

emmedics4 wrote:
I'm looking to various dialogs in kicad are positioned in various parts of the screen depending on which is and is very annoying.
Change on this behaviuor could be easy to fix using wxWindow::CentreOnParent().

>From what i know dialogs are cured by Dick i wish know if he agrees on this change and in this case if he prefers i can prepare a patch to fix this behaviour.


Marco,


I have two monitors, each 28" wide. (And it still seems like I am going blind.)


I don't always want dialogs to appear on top of my work, so I have started implementing

retentative dialog coordinates:
------------------------------------

where the dialog remembers its last size and position. This way the user is made happy after the first time. On the first time he may move and resize the dialog.

This is particularly friendly in a dual monitor environment. The user can position the dialog on either monitor.
See my work in pcbnew/dialog_layers_setup.cpp as a model implementation.

The only improvement I can think of to this and one which dove-tails in your idea, is to call CentreOnParent() on the first showing of the dialog. However, I think you might be seeing a platform specific artifact. Usually the dialogs I see are centered on the parent even without this call. (Excluding the cases where I am setting the position from retentative coordinates.)


In summary, I am 100% sold on the retentative dialog coordinates strategy, which includes resizeable dialogs. Resizeable dialogs are in our UIpolicy.txt guideline document.


If you wanted to go through and duplicate that strategy (as found in dialog_layers_setup.cpp) everywhere, you would have my support for this, and I believe support from others as well.

grep for s_LastPos and s_LastSize in dialog_layers_setup.cpp

// We want our dialog to remember its previous screen position
wxPoint DIALOG_LAYERS_SETUP::s_LastPos( -1, -1 );
wxSize DIALOG_LAYERS_SETUP::s_LastSize;


Dick








Follow ups

References