kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #06263
Re: Zone corner chamfers/fillets and CPolyLine
On 02/22/2011 10:05 AM, Jerry Jacobs wrote:
> On 2/19/11 11:15 AM, Marco Mattila wrote:
>> Related to this discussion, I just committed a new zone dialog layout.
>> As always, I welcome feedback.
> The dialog looks very good on OSX, only the width of the layer list
> should be a bit more wide. And also it should dynamic scale when
> resizing the window. Same as for the nets list.
>
> http://kicad.xor-gate.org/screenshots/zone-properties.png
>
> Good work Marco,
Marco,
Thanks for all your help. The dialog does look good.
In additional to our goal of having all dialogs resize-able, something that
can also enhance the UI experience is to "remember" the user's desired size
and position of that adjustment, after he/she makes it.
bool DIALOG_LAYERS_SETUP::Show( bool show )
{
bool ret;
if( show )
{
if( s_LastPos.x != -1 )
{
SetSize( s_LastPos.x, s_LastPos.y, s_LastSize.x, s_LastSize.y, 0 );
}
ret = DIALOG_LAYERS_SETUP_BASE::Show( show );
}
else
{
// Save the dialog's position before hiding
s_LastPos = GetPosition();
s_LastSize = GetSize();
ret = DIALOG_LAYERS_SETUP_BASE::Show( show );
}
return ret;
}
Above, taken from pcbnew/dialogs/dialog_layers_setup.cpp, is probably the
best example on how to do this.
It just involves two static members, s_LastPos, and s_LastSize. The user
then only has to position or stretch the dialog one time per run session.
Dick
References