xrc Fonts / resizing
xrc Fonts / resizing
От:
Andreas Pflug <pgadmin@pse-consulting.de>
Дата:
This is moved from pgadmin-support to hackers. Mark A. Taff wrote: >Andreas, are you talking about something like wxMatrixSizer as described at: > >http://wxworkshop.sourceforge.net/matrixx/default.html > No. In fact, this is what I want to avoid technically and by it's bad look. The last example is just worse case for me. > >I can appreciate that you want this fixed The Right Way(tm). I am the same >way when it comes to stuff I do. And I can certainly appreciate the beauty >of having wxWindows automatically resize and re-layout dialogs based on font >properties. However, I am in the position where I _have_ to change all the >.xrc files to make pgadmin3 usable on my machine. > >Do you have another solution to making the dialogs usable on my machine other >than rewriting the .xrc files? I've been at this for a month of my spare >time (granted, my spare time is rather limited), and I haven't come across >any other workable solutions. > I've been investigating a little, and what's coming is this: The dialogs *need* some redesign, because currently they are designed in pixels, while they should be designed in dialog units. Originally, I was quite sure we already did, but unfortunately we failed. Redesigning means recalculating all sizes and positions, and adding a 'd'. All widths have to be multiplied by 4/6, and all heights by 8/13, thus 200x20 would become 133,12d We could write a little program to recalculate all dialogs, unfortunately the vertical current spacing of 25 (sometimes 20) would lead to uneven spacing for rounding reasons, so to get it really nice all vertical positions need manual correction. New design guides will have the following values: First control at (5, 5), vertical spacing 15 for normal controls, 12 if checkboxes, statics need 2 extra vertical dlg units. Standard text control size is 133, 12 Standard button size (ok, cancel) is 46,12 I'll patch wx to obey the desktop setting for fonts, and the dialogs will redesign according to the font automatically then. Regards, Andreas
Re: xrc Fonts / resizing
От:
"Stefan Csomor" <csomor@advancedconcepts.ch>
Дата:
Hi please consider moving to sizers sooner or later, because even dialog units will fail among systems where certain controls have a different layout proportions, eg notebook tabs under OSX. Using sizers will also allow us in the future to embed the default layouting guidelines of a platform. Thanks, Stefan > -----Original Message----- > From: pgadmin-hackers-owner@postgresql.org > [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of > Andreas Pflug > Sent: Montag, 29. September 2003 09:28 > To: Mark A. Taff > Cc: pgadmin-hackers > Subject: [pgadmin-hackers] xrc Fonts / resizing > > This is moved from pgadmin-support to hackers. > > Mark A. Taff wrote: > > >Andreas, are you talking about something like wxMatrixSizer > as described at: > > > >http://wxworkshop.sourceforge.net/matrixx/default.html > > > No. In fact, this is what I want to avoid technically and by > it's bad look. The last example is just worse case for me. > > > > >I can appreciate that you want this fixed The Right Way(tm). > I am the > >same way when it comes to stuff I do. And I can certainly > appreciate > >the beauty of having wxWindows automatically resize and re-layout > >dialogs based on font properties. However, I am in the > position where > >I _have_ to change all the .xrc files to make pgadmin3 > usable on my machine. > > > >Do you have another solution to making the dialogs usable on > my machine > >other than rewriting the .xrc files? I've been at this for > a month of > >my spare time (granted, my spare time is rather limited), > and I haven't > >come across any other workable solutions. > > > I've been investigating a little, and what's coming is this: > > The dialogs *need* some redesign, because currently they are > designed in pixels, while they should be designed in dialog > units. Originally, I was quite sure we already did, but > unfortunately we failed. > > Redesigning means recalculating all sizes and positions, and > adding a 'd'. > All widths have to be multiplied by 4/6, and all heights by > 8/13, thus 200x20 would become 133,12d We could write a > little program to recalculate all dialogs, unfortunately the > vertical current spacing of 25 (sometimes 20) would lead to > uneven spacing for rounding reasons, so to get it really nice > all vertical positions need manual correction. > > New design guides will have the following values: > First control at (5, 5), vertical spacing 15 for normal > controls, 12 if checkboxes, statics need 2 extra vertical dlg units. > Standard text control size is 133, 12 > Standard button size (ok, cancel) is 46,12 > > I'll patch wx to obey the desktop setting for fonts, and the > dialogs will redesign according to the font automatically then. > > Regards, > Andreas > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 8: explain analyze is your friend >