Thread: XRC Editting
Hi Andreas, How are you editting XRC's these days? It's painful in XRCed as it doesn't like the new sizing units. Any tips - I'm working (slowly) on filtering/sorting in the edit grid. On that note, recent builds are creating very large widgets for me on XP - Hiroshi mentioned a similar problem on 2K. Regards, Dave.
Dave Page wrote: >Hi Andreas, > >How are you editting XRC's these days? It's painful in XRCed as it >doesn't like the new sizing units. Any tips - I'm working (slowly) on >filtering/sorting in the edit grid. > > I already posted a bug on that, with no answer for two weeks. I'm testing this with pgAdmin3 itself; no need to restart it if compiled for debugging. >On that note, recent builds are creating very large widgets for me on XP >- Hiroshi mentioned a similar problem on 2K. > > ctor sysSettings reads the wxSYS_ICONTITLE_FONT, grabbing the font you're using on the desktop. In mostly any case, the dialog calculation should be correct anyway (I found the exception of the windows extralarge font, which reports wrong metrics...) I didn't make this changeable, do we need that? Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 15 October 2003 13:36 > To: Dave Page > Cc: pgadmin-hackers > Subject: Re: [pgadmin-hackers] XRC Editting > > Dave Page wrote: > > >Hi Andreas, > > > >How are you editting XRC's these days? It's painful in XRCed as it > >doesn't like the new sizing units. Any tips - I'm working > (slowly) on > >filtering/sorting in the edit grid. > > > > > > I already posted a bug on that, with no answer for two weeks. > I'm testing this with pgAdmin3 itself; no need to restart it > if compiled for debugging. Oh yes, so you can :-) It also seems the you can get around it by simply removing the d from the dialogue size, and temporarily doubling the size values. It's only the d on the dialogue it doesn't like which the message doesn't make clear. > >On that note, recent builds are creating very large widgets > for me on > >XP > >- Hiroshi mentioned a similar problem on 2K. > > > > > ctor sysSettings reads the wxSYS_ICONTITLE_FONT, grabbing the > font you're using on the desktop. In mostly any case, the > dialog calculation should be correct anyway (I found the > exception of the windows extralarge font, which reports wrong > metrics...) I didn't make this changeable, do we need that? We definately need something as there are at least 2 systems on which it doesn't work well. I don't know about Hiroshi's system, but it looked like it was probably standrd w2k fonts, and mine is certainly standard XP fonts. Regards, Dave.
Dave Page wrote: >>> >>> >>I already posted a bug on that, with no answer for two weeks. >>I'm testing this with pgAdmin3 itself; no need to restart it >>if compiled for debugging. >> >> > >Oh yes, so you can :-) > >It also seems the you can get around it by simply removing the d from >the dialogue size, and temporarily doubling the size values. It's only >the d on the dialogue it doesn't like which the message doesn't make >clear. > > But that's dangerous, you could forget to recalc it. > >We definately need something as there are at least 2 systems on which it >doesn't work well. I don't know about Hiroshi's system, but it looked >like it was probably standrd w2k fonts, and mine is certainly standard >XP fonts. > > So what's your icon font? in wx/src/msw/settings.cpp (one of my patches) around line 255 the font is read from the system SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lf), &lf, 0); This should be your desktop font. On my W2K it works as expected. What's the returned logfont looking like on your system? Regards, Andreas
Le Mercredi 15 Octobre 2003 16:04, Dave Page a écrit : > We definately need something as there are at least 2 systems on which it > doesn't work well. Three systems. See my screenshot under Debian here: http://snake.pgadmin.org/jean-michel/shot.png I contacted Raphaël who does not have the same problem. Cheers, Jean-Michel
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 15 October 2003 15:18 > To: Dave Page > Cc: pgadmin-hackers > Subject: Re: [pgadmin-hackers] XRC Editting > > >It also seems the you can get around it by simply removing > the d from > >the dialogue size, and temporarily doubling the size values. > It's only > >the d on the dialogue it doesn't like which the message doesn't make > >clear. > > > > > But that's dangerous, you could forget to recalc it. Not really. Double size is so much bigger that you wouldn't fail to notice whilst testing the code. > So what's your icon font? 8 point Tahoma > in wx/src/msw/settings.cpp (one of my patches) around line > 255 the font is read from the system > SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lf), > &lf, 0); This should be your desktop font. On my W2K it works > as expected. What's the returned logfont looking like on your system? Not sure what you mean. lf has a value of -11... Regards, Dave.
Dave Page wrote: > > > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 15 October 2003 15:18 >>To: Dave Page >>Cc: pgadmin-hackers >>Subject: Re: [pgadmin-hackers] XRC Editting >> >> >> >>>It also seems the you can get around it by simply removing >>> >>> >>the d from >> >> >>>the dialogue size, and temporarily doubling the size values. >>> >>> >>It's only >> >> >>>the d on the dialogue it doesn't like which the message doesn't make >>>clear. >>> >>> >>> >>> >>But that's dangerous, you could forget to recalc it. >> >> > >Not really. Double size is so much bigger that you wouldn't fail to >notice whilst testing the code. > > > >>So what's your icon font? >> >> > >8 point Tahoma > > > That's very standard. >>in wx/src/msw/settings.cpp (one of my patches) around line >>255 the font is read from the system >>SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lf), >>&lf, 0); This should be your desktop font. On my W2K it works >>as expected. What's the returned logfont looking like on your system? >> >> > >Not sure what you mean. lf has a value of -11... > > > Yes, that's Microsoft. lf.leHeight is -(fontsize+3). lfFaceName should be Tahoma, right? This should be used throughout the app (except for menu and caption, which use individual font settings from the "desktop appearance" settings). Does your app behave correctly if you change your desktop font? Regards, Andreas
Jean-Michel POURE wrote: >Le Mercredi 15 Octobre 2003 16:04, Dave Page a écrit : > > >>We definately need something as there are at least 2 systems on which it >>doesn't work well. >> >> > >Three systems. See my screenshot under Debian here: >http://snake.pgadmin.org/jean-michel/shot.png > >I contacted Raphaël who does not have the same problem. > Hi all, I've just tried more testing, here is what is goin'on : I have three different build environments, stable, testing and unstable. These three build environments correspond to the three actual debian distributions and are just chrooted environment with all packages up to date regarding the debian release. My display environment (another host), is something between stable and testing one with X well configured and Gnome 2.2. I have no problem at all on this host when using pga3 locally. When I chroot to the "stable build env" and launch pgadmin3, it runs well and I have no font problem but some messages in the background: ** (pgadmin3:9429): WARNING **: Couldn't load font "Arial 10" falling back to "Sans 10" (Arial 10 is my actual default font for Gnome 2.2 desktop) When I chroot to the "unstable build env" and launch pgadmin3, I have no warning and it appears "differently"... It's more "basic" (less nice to look at). If I go in "preferences" menu after setting fr_FR as the locale for pgadmin, everything is ok but one word is cut in the last line... As far as I understand, everything has changed in debian unstable, fonts are managed in "pango" and I don't know anything about it. I'll document myself and try to understand what's going on. What I don't understand well is why fonts seem now managed by applications (may be wx) and not by the X server itself. Don't hesitate to contact me if you need more information or more testing. Regards, Raphaël
Raphaël Enrici wrote: > Jean-Michel POURE wrote: > > > When I chroot to the "unstable build env" and launch pgadmin3, I have > no warning and it appears "differently"... It's more "basic" (less > nice to look at). If I go in "preferences" menu after setting fr_FR as > the locale for pgadmin, everything is ok but one word is cut in the > last line... As far as I understand, everything has changed in debian > unstable, fonts are managed in "pango" and I don't know anything about > it. > I'll document myself and try to understand what's going on. I worte "pango" but wanted to write *defoma*... regards, Raphaël
Dave Page wrote: > > > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 15 October 2003 16:42 >>To: Dave Page >>Cc: pgadmin-hackers >>Subject: Re: [pgadmin-hackers] XRC Editting >> >>Dave Page wrote: >> >>Yes, that's Microsoft. lf.leHeight is -(fontsize+3). >>lfFaceName should be Tahoma, right? >>This should be used throughout the app (except for menu and >>caption, which use individual font settings from the "desktop >>appearance" >>settings). Does your app behave correctly if you change your >>desktop font? >> >> > >If I change the fonts to Extra Large, the menus and title bars change as >expected. Everything else remains the same. > >Changing the icon font (to 18pt) makes no difference to pgAdmin, but is >obviously different elsewhere. > I just noticed that I left a define that made sysSettings compilable with older wx versions in the source, effectively disabling font detection under MSW. Regards, Andreas
Jean-Michel POURE wrote: >Le Mercredi 15 Octobre 2003 16:04, Dave Page a écrit : > > >>We definately need something as there are at least 2 systems on which it >>doesn't work well. >> >> > >Three systems. See my screenshot under Debian here: >http://snake.pgadmin.org/jean-michel/shot.png > >I contacted Raphaël who does not have the same problem. > > > This bad appearance wouldn't be fixed by the possibility to select the font. The dialog units are not correctly translated to pixels, which must be a problem with the reported font metrics. This would mean that a) the system reports wrong values (e.g. under msw, when selecting Tahoma.12; 11 and 13 will be ok) or b) there's still a wrong calculation in wx In this case, obviously the reported height is completely wrong. Could you have a debugger look at gtk/window.cpp line 3327 ff, where the height is retrieved from Pango? Regards, Andreas
> > In this case, obviously the reported height is completely wrong. Could > you have a debugger look at gtk/window.cpp line 3327 ff, where the > height is retrieved from Pango? Forgot to mention: If debug logging is enabled, the used font metrics (average size of char) is logged from frmMain constructor. Please check if that looks ok. Regards, Andreas
Hi Andreas. From: "Andreas Pflug" <pgadmin@pse-consulting.de> > Dave Page wrote: > > >>-----Original Message----- > >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > >>Sent: 15 October 2003 16:42 > >>To: Dave Page > >>Cc: pgadmin-hackers > >>Subject: Re: [pgadmin-hackers] XRC Editting > >> > >>Dave Page wrote: > >> > >>Yes, that's Microsoft. lf.leHeight is -(fontsize+3). > >>lfFaceName should be Tahoma, right? > >>This should be used throughout the app (except for menu and > >>caption, which use individual font settings from the "desktop > >>appearance" > >>settings). Does your app behave correctly if you change your > >>desktop font? > >> > >> > > > >If I change the fonts to Extra Large, the menus and title bars change as > >expected. Everything else remains the same. > > > >Changing the icon font (to 18pt) makes no difference to pgAdmin, but is > >obviously different elsewhere. > > > > I just noticed that I left a define that made sysSettings compilable > with older wx versions in the source, effectively disabling font > detection under MSW. Hmm... It seems to me problem goes on. I was while this problem was being examined. However, I doesn't have material to discuss clearly with you still. Time is a little more necessary... regards, Hiroshi Saito
> -----Original Message----- > From: Hiroshi Saito [mailto:saito@inetrt.skcapi.co.jp] > Sent: 16 October 2003 04:22 > To: Andreas Pflug; Dave Page > Cc: pgadmin-hackers > Subject: Re: [pgadmin-hackers] XRC Editting > > > Hmm... > It seems to me problem goes on. > I was while this problem was being examined. > However, > I doesn't have material to discuss clearly with you still. > Time is a little more necessary... Hi Hiroshi Please don't feel you have to find the cause of problems before you report them. Whilst we're in development, I think a policy of 'you break it, you fix it' is appropriate! In other words, whoever is responsible for introducing the error should take the responsibility of tracking it down and fixing it. Of course, there's no reason that person couldn't ask for help as required... Regards, Dave.
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 15 October 2003 20:40 > To: Dave Page > Cc: pgadmin-hackers > Subject: Re: [pgadmin-hackers] XRC Editting > > > I just noticed that I left a define that made sysSettings > compilable with older wx versions in the source, effectively > disabling font detection under MSW. OK, that gives the correct font in the app, but makes no change to the sizing at all (see attachment). Regards, Dave.
Attachment
> -----Original Message----- > From: Hiroshi Saito [mailto:saito@inetrt.skcapi.co.jp] > > Hmm... > It seems to me problem goes on. > I was while this problem was being examined. > However, > I doesn't have material to discuss clearly with you still. > Time is a little more necessary... From: "Dave Page" <dpage@vale-housing.co.uk> >Hi Hiroshi > > Please don't feel you have to find the cause of problems before you > report them. Whilst we're in development, I think a policy of 'you break > it, you fix it' is appropriate! > > In other words, whoever is responsible for introducing the error should > take the responsibility of tracking it down and fixing it. Of course, > there's no reason that person couldn't ask for help as required... Ah..Sorry. I understand the thing that you say. I have followed two more problems since last week. One is discussed now. http://cre-ent.skcapi.co.jp/~saito/pgadmin3/20030922_2.jpg http://cre-ent.skcapi.co.jp/~saito/pgadmin3/20031007_2.jpg One more is a permeation problem. (It is Japanese Windows-XP Only) http://cre-ent.skcapi.co.jp/~saito/pgadmin3/wxWindows-20031010-problem.jpg regards, Hiroshi Saito
Dave Page wrote: > > > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 15 October 2003 20:40 >>To: Dave Page >>Cc: pgadmin-hackers >>Subject: Re: [pgadmin-hackers] XRC Editting >> >> >>I just noticed that I left a define that made sysSettings >>compilable with older wx versions in the source, effectively >>disabling font detection under MSW. >> >> > >OK, that gives the correct font in the app, but makes no change to the >sizing at all (see attachment). > > This is how it looks if the sizes/positions are *not* created with the trailing 'd'. With my "font inheritance" patch, the fonts will be set according to the desktop font, apparently this succeeds on your system. The Dialog Unit sizing (in contrast to pixel sizing) didn't need any patch, so the only reason for failure would be a wrong xrc resource. Maybe xrcDialogs.cpp wasn't up-to-date (I just created a new), was this snapshot taken from a release build? Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 16 October 2003 12:09 > To: Dave Page > Cc: pgadmin-hackers > Subject: Re: [pgadmin-hackers] XRC Editting > > This is how it looks if the sizes/positions are *not* created > with the trailing 'd'. > With my "font inheritance" patch, the fonts will be set > according to the desktop font, apparently this succeeds on > your system. The Dialog Unit sizing (in contrast to pixel > sizing) didn't need any patch, so the only reason for failure > would be a wrong xrc resource. > Maybe xrcDialogs.cpp wasn't up-to-date (I just created a > new), was this snapshot taken from a release build? Nope, cvs tip, just updated to get your sysSettings ctor fix: Regards Dave. <?xml version="1.0" ?> <resource> <object class="wxDialog" name="frmConnect"> <title>Connect to a Server</title> <size>205,130d</size> <style>wxDEFAULT_DIALOG_STYLE|wxSTAY_ON_TOP|wxDIALOG_MODAL|wxCAPTION|wxS YSTEM_MENU</style> <object class="wxStaticText" name="lblDescription"> <label>Description</label> <pos>5,7d</pos> </object> <object class="wxTextCtrl" name="txtDescription"> <pos>70,5d</pos> <size>130,12d</size> <tooltip>Enter a description of this database connection.</tooltip> </object> <object class="wxStaticText" name="lblServer"> <label>Server</label> <pos>5,22d</pos> </object> <object class="wxTextCtrl" name="txtServer"> <pos>70,20d</pos> <size>130,12d</size> <tooltip>Enter the hostname or IP address of the server to connect to.</tooltip> </object> <object class="wxStaticText" name="lblPort"> <label>Port</label> <pos>5,37d</pos> </object> <object class="wxTextCtrl" name="txtPort"> <value>5432</value> <pos>70,35d</pos> <size>26,12d</size> <tooltip>Enter the port number that the server is listening on.</tooltip> </object> <object class="wxStaticText" name="lblSSL"> <label>SSL</label> <pos>100,37d</pos> </object> <object class="wxComboBox" name="cbSSL"> <content/> <selection>0</selection> <pos>120,35d</pos> <size>80,12d</size> <style>wxCB_READONLY|wxCB_DROPDOWN</style> </object> <object class="wxStaticText" name="lblDatabase"> <label>Initial database</label> <pos>5,52d</pos> </object> <object class="wxTextCtrl" name="txtDatabase"> <value>template1</value> <pos>70,50d</pos> <size>130,12d</size> <tooltip>Enter the name of the database on the server to use to make the initial connection. Normally this will be template1.</tooltip> </object> <object class="wxStaticText" name="lblUsername"> <label>Username</label> <pos>5,67d</pos> </object> <object class="wxTextCtrl" name="txtUsername"> <pos>70,65d</pos> <size>130,12d</size> <tooltip>Enter the username to use when connecting to the server.</tooltip> </object> <object class="wxStaticText" name="lblTrusted"> <label>Trusted</label> <pos>5,82d</pos> </object> <object class="wxCheckBox" name="chkTrusted"> <label></label> <checked>0</checked> <pos>70,82d</pos> </object> <object class="wxStaticText" name="lblPassword"> <label>Password</label> <pos>5,97d</pos> </object> <object class="wxTextCtrl" name="txtPassword"> <pos>70,95d</pos> <size>130,12d</size> <style>wxTE_PASSWORD</style> <tooltip>Enter the password to use when connecting to the server.</tooltip> </object> <object class="wxButton" name="btnHelp"> <label>&Help</label> <pos>2,112d</pos> <size>50,15d</size> <style></style> </object> <object class="wxButton" name="btnOK"> <label>&OK</label> <default>1</default> <pos>97,112d</pos> <size>50,15d</size> <style></style> </object> <object class="wxButton" name="btnCancel"> <label>&Cancel</label> <default>0</default> <pos>150,112d</pos> <size>50,15d</size> </object> </object> </resource>