← Back to team overview

kicad-developers team mailing list archive

Re: UIpolicies.txt

 

I wasn't suggesting unconditional support for this. As I expected,
there are cases where it doesn't work. I was trying to alert other
developers to a possible solution to layout differences between
platforms. Maybe the policy should be more generic to have developers
make sure that initial dialog layouts are sane.

Yes, we should make a policy saying that people may not do insane things. I'm all for that. :)

I think this should be
part of UIPolicies.txt. Remember the previous EESchema options dialog
where the word "Parameters" was truncated due to a sizer issue? I think
most users would expect the initial dialog size not to obscure any
control text and at least be usable without having to first resize it.


OK.


A far more useful benefit to the user is to remember the size and position of these dialogs on close, so it can come up with size he likes according to how he set it previously. This is what I have been coding recently and you can find it in DRC and Layer setup. The nice thing here is that for a dual monitor setup, the dialog can be told to come up on the second monitor, and with the size you last preferred.


Agreed. After the initial size, let the user configure the dialog the
way they want it. I see a base dialog class in your future;)


Well I have found a rather simple trick to override the Show(bool) method of the dialog and to save or use the static last size and position. But the problem with hiding this in a base class is that the static position and size would then become common to all derived dialogs, meaning all your dialogs would be the same size and be in the same position. Funny hey? So I won't rush to that solution. But I still have one curiosity I'd like answered about the strategy, before I call it perfected. If you take a look at


bool DIALOG_LAYERS_SETUP::Show( bool show ) in dialog_layers_setup2.cpp

and at

bool DIALOG_DRC_CONTROL::Show( bool show ) in dialog_drc.cpp

And compare the if( show ) block in both. In one I am first calling the old Show() before SetSize() whereas in the other I am calling SetSize() before the old Show(). Either works fine. Don't know which to stick with. You have any ideas on this?


Thanks,

Dick














Follow ups

References