Re: Buglets in dlgFunction - Mailing list pgadmin-hackers
From | Guillaume Lelarge |
---|---|
Subject | Re: Buglets in dlgFunction |
Date | |
Msg-id | 49249F69.5010500@lelarge.info Whole thread Raw |
In response to | Re: Buglets in dlgFunction ("Dave Page" <dpage@pgadmin.org>) |
Responses |
Re: Buglets in dlgFunction
|
List | pgadmin-hackers |
Dave Page a écrit : > On Thu, Nov 6, 2008 at 11:15 PM, Guillaume Lelarge > <guillaume@lelarge.info> wrote: >> Still a hack but it works. It even works with GTK. The patch attached >> removes the WXMAC ifdef. >> >>>> I also found on Windows that the check boxes for different privileges >>>> on the privilege panes are touching each other and could use some >>>> spacing. Can you look at that please? >>>> >> I forgot to add a border to the checkboxes. I tried from 4 to 1. 4 was >> really big. I still hesitate between 1 et 2. 2 seems better, so that's >> the value in the patch. I think you should try both of them and tell us >> which one you prefer. > > Hmm, I think they still look a little close. After some > experimentation, I'd say 3 or 4 on Windows, and 3 on Mac - but it > could use a few additional px between the combo and the top checkbox. > If you can add that, I'd say go with 3. > I put #ifdef to define the border size for each plateform. > New bug: The definition pane on dlgFunction is thoroughly broken when > working with C functions :-(. I think this just got overlooked when > you redrew everything. > You're right. It's fixed. > I'm happy for you to apply when you're happy. Things are definitely > going in the right direction! > Can you take a quick look at this new patch? Thanks. I'll commit it if you find it good enough. -- Guillaume. http://www.postgresqlfr.org http://dalibo.com Index: pgadmin/ctl/ctlSecurityPanel.cpp =================================================================== --- pgadmin/ctl/ctlSecurityPanel.cpp (révision 7500) +++ pgadmin/ctl/ctlSecurityPanel.cpp (copie de travail) @@ -99,6 +99,17 @@ itemSizer4->Add(cbGroups, wxEXPAND|wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT); itemSizer3->Add(itemSizer4, 0, wxEXPAND|wxALL, 0); + /* border size depends on the plateform */ + #ifdef __WXMSW__ + int bordersize = 4; + #endif + #ifdef __WXMAC__ + int bordersize = 3; + #endif + #ifdef __WXGTK__ + int bordersize = 0; + #endif + if (needAll) { wxBoxSizer* itemSizer5 = new wxBoxSizer(wxHORIZONTAL); @@ -107,7 +118,7 @@ allPrivilegesGrant = new wxCheckBox(this, CTL_ALLPRIVGRANT, wxT("WITH GRANT OPTION")); itemSizer5->Add(allPrivilegesGrant, wxEXPAND|wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT); allPrivilegesGrant->Disable(); - itemSizer3->Add(itemSizer5, 0, wxALL, 0); + itemSizer3->Add(itemSizer5, 0, wxALL, bordersize); } while (privileges.HasMoreTokens()) @@ -122,7 +133,7 @@ itemSizer6->Add(cb, wxEXPAND|wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT); cb->Disable(); privCheckboxes[i++] = cb; - itemSizer3->Add(itemSizer6, 0, wxALL, 0); + itemSizer3->Add(itemSizer6, 0, wxALL, bordersize); } } Index: pgadmin/dlg/dlgFunction.cpp =================================================================== --- pgadmin/dlg/dlgFunction.cpp (révision 7500) +++ pgadmin/dlg/dlgFunction.cpp (copie de travail) @@ -366,12 +366,10 @@ returncode = dlgSecurityProperty::Go(modal); -#ifdef __WXMAC__ - // This fixes a UI glitch on MacOS X + // This fixes a UI glitch on MacOS X and Windows // Because of the new layout code, the Privileges pane don't size itself properly SetSize(GetSize().GetWidth()+1, GetSize().GetHeight()); SetSize(GetSize().GetWidth()-1, GetSize().GetHeight()); -#endif return returncode; } Index: pgadmin/dlg/dlgTable.cpp =================================================================== --- pgadmin/dlg/dlgTable.cpp (révision 7500) +++ pgadmin/dlg/dlgTable.cpp (copie de travail) @@ -500,12 +500,10 @@ returncode = dlgSecurityProperty::Go(modal); -#ifdef __WXMAC__ - // This fixes a UI glitch on MacOS X + // This fixes a UI glitch on MacOS X and Windows // Because of the new layout code, the Privileges pane don't size itself properly SetSize(GetSize().GetWidth()+1, GetSize().GetHeight()); SetSize(GetSize().GetWidth()-1, GetSize().GetHeight()); -#endif return returncode; } Index: pgadmin/dlg/dlgPackage.cpp =================================================================== --- pgadmin/dlg/dlgPackage.cpp (révision 7500) +++ pgadmin/dlg/dlgPackage.cpp (copie de travail) @@ -86,12 +86,10 @@ returncode = dlgSecurityProperty::Go(modal); -#ifdef __WXMAC__ - // This fixes a UI glitch on MacOS X + // This fixes a UI glitch on MacOS X and Windows // Because of the new layout code, the Privileges pane don't size itself properly SetSize(GetSize().GetWidth()+1, GetSize().GetHeight()); SetSize(GetSize().GetWidth()-1, GetSize().GetHeight()); -#endif return returncode; } Index: pgadmin/dlg/dlgTablespace.cpp =================================================================== --- pgadmin/dlg/dlgTablespace.cpp (révision 7500) +++ pgadmin/dlg/dlgTablespace.cpp (copie de travail) @@ -80,12 +80,10 @@ returncode = dlgSecurityProperty::Go(modal); -#ifdef __WXMAC__ - // This fixes a UI glitch on MacOS X + // This fixes a UI glitch on MacOS X and Windows // Because of the new layout code, the Privileges pane don't size itself properly SetSize(GetSize().GetWidth()+1, GetSize().GetHeight()); SetSize(GetSize().GetWidth()-1, GetSize().GetHeight()); -#endif return returncode; } Index: pgadmin/dlg/dlgDatabase.cpp =================================================================== --- pgadmin/dlg/dlgDatabase.cpp (révision 7500) +++ pgadmin/dlg/dlgDatabase.cpp (copie de travail) @@ -291,12 +291,10 @@ returncode = dlgSecurityProperty::Go(modal); -#ifdef __WXMAC__ - // This fixes a UI glitch on MacOS X + // This fixes a UI glitch on MacOS X and Windows // Because of the new layout code, the Privileges pane don't size itself properly SetSize(GetSize().GetWidth()+1, GetSize().GetHeight()); SetSize(GetSize().GetWidth()-1, GetSize().GetHeight()); -#endif return returncode; } Index: pgadmin/dlg/dlgSequence.cpp =================================================================== --- pgadmin/dlg/dlgSequence.cpp (révision 7500) +++ pgadmin/dlg/dlgSequence.cpp (copie de travail) @@ -127,12 +127,10 @@ returncode = dlgSecurityProperty::Go(modal); -#ifdef __WXMAC__ - // This fixes a UI glitch on MacOS X + // This fixes a UI glitch on MacOS X and Windows // Because of the new layout code, the Privileges pane don't size itself properly SetSize(GetSize().GetWidth()+1, GetSize().GetHeight()); SetSize(GetSize().GetWidth()-1, GetSize().GetHeight()); -#endif return returncode; } Index: pgadmin/dlg/dlgView.cpp =================================================================== --- pgadmin/dlg/dlgView.cpp (révision 7500) +++ pgadmin/dlg/dlgView.cpp (copie de travail) @@ -83,12 +83,10 @@ returncode = dlgSecurityProperty::Go(modal); -#ifdef __WXMAC__ - // This fixes a UI glitch on MacOS X + // This fixes a UI glitch on MacOS X and Windows // Because of the new layout code, the Privileges pane don't size itself properly SetSize(GetSize().GetWidth()+1, GetSize().GetHeight()); SetSize(GetSize().GetWidth()-1, GetSize().GetHeight()); -#endif return returncode; } Index: pgadmin/dlg/dlgSchema.cpp =================================================================== --- pgadmin/dlg/dlgSchema.cpp (révision 7500) +++ pgadmin/dlg/dlgSchema.cpp (copie de travail) @@ -71,12 +71,10 @@ returncode = dlgSecurityProperty::Go(modal); -#ifdef __WXMAC__ - // This fixes a UI glitch on MacOS X + // This fixes a UI glitch on MacOS X and Windows // Because of the new layout code, the Privileges pane don't size itself properly SetSize(GetSize().GetWidth()+1, GetSize().GetHeight()); SetSize(GetSize().GetWidth()-1, GetSize().GetHeight()); -#endif return returncode; } Index: pgadmin/ui/dlgFunction.xrc =================================================================== --- pgadmin/ui/dlgFunction.xrc (révision 7500) +++ pgadmin/ui/dlgFunction.xrc (copie de travail) @@ -346,30 +346,59 @@ <object class="notebookpage"> <label>Definition</label> <object class="wxPanel" name="pnlDefinition"> - <object class="wxStaticText" name="stObjectFile"> - <label>Object file</label> - </object> - <object class="wxTextCtrl" name="txtObjectFile"> - <size>135,-1d</size> - </object> - <object class="wxStaticText" name="stLinkSymbol"> - <label>Link symbol</label> - </object> - <object class="wxTextCtrl" name="txtLinkSymbol"> - <size>135,-1d</size> - </object> <object class="wxFlexGridSizer"> + <cols>1</cols> + <rows>2</rows> + <vgap>5</vgap> + <hgap>5</hgap> + <growablecols>0</growablecols> + <growablerows>0,1</growablerows> <object class="sizeritem"> + <object class="wxFlexGridSizer"> + <cols>2</cols> + <rows>2</rows> + <vgap>5</vgap> + <hgap>5</hgap> + <growablecols>1</growablecols> + <object class="sizeritem"> + <object class="wxStaticText" name="stObjectFile"> + <label>Object file</label> + </object> + <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag> + <border>4</border> + </object> + <object class="sizeritem"> + <object class="wxTextCtrl" name="txtObjectFile"> + <size>135,-1d</size> + </object> + <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag> + <border>4</border> + </object> + <object class="sizeritem"> + <object class="wxStaticText" name="stLinkSymbol"> + <label>Link symbol</label> + </object> + <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag> + <border>4</border> + </object> + <object class="sizeritem"> + <object class="wxTextCtrl" name="txtLinkSymbol"> + <size>135,-1d</size> + </object> + <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag> + <border>4</border> + </object> + </object> + <flag>wxALL|wxEXPAND</flag> + <border>5</border> + </object> + <object class="sizeritem"> <object class="ctlSQLBox" name="txtSqlBox"> <style>wxTE_MULTILINE|wxSUNKEN_BORDER|wxTE_RICH2</style> </object> <flag>wxALL|wxEXPAND</flag> <border>5</border> </object> - <cols>1</cols> - <rows>1</rows> - <growablerows>0</growablerows> - <growablecols>0</growablecols> </object> </object> </object>
pgadmin-hackers by date: