Hi Guillaume/Dave,
Please find the patch for the same.
*--**
**Thanks & Regards,**
**Ashesh Vashi**
**EnterpriseDB INDIA:* Enterprise Postgres Company<http://www.enterprisedb.com>
On Mon, Aug 30, 2010 at 6:21 PM, Ashesh Vashi <[email protected]
> wrote:
> That's means - the current hard coded value: GQB_MIN_WIDTH->1280
> & GQB_MIN_HEIGHT->800 are not enough on some system.
> We need some way to identify the actual size of the window, by modifying
> the updateModelSize function in the gqb/gqbView.cpp file.
>
> I am working on it.
>
> *--*
> *
> **Thanks & Regards,**
>
> **Ashesh Vashi**
> **EnterpriseDB INDIA:* Enterprise Postgres
> Company<http://www.enterprisedb.com>
>
>
>
> On Mon, Aug 30, 2010 at 6:11 PM, Steffen Kuhn <[email protected]> wrote:
>
>> Hi Ashesh,
>>
>> moving behind this point / border is possible.
>> A refresh does not trigger a repaint. But a double click
>> for adding an alias does and the border moves a bit to the right and
>> the table is viewed completely.
>>
>> Regards Steffen
>>
>>
>> On 30.08.2010 13:37 "Ashesh Vashi" <[email protected]>
>> wrote:
>> > Hi Steffen,
>> >
>> >
>> >
>> > Can add a table in to that view and take it to beyond that point and say
>> > 'refresh'?
>> >
>> > Does it refresh it well?
>> >
>> >
>> >
>> > -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA:Enterprise Postgres
>> > Company <http://www.enterprisedb.com>
>> >
>> >
>> >
>> > On Mon, Aug 30, 2010 at 4:57 PM, Steffen Kuhn <<[email protected]>>
>> > wrote:
>> >
>> > > Hi Ashesh,
>> > >
>> > > no refresh does not solve the problem.
>> > >
>> > > Regards Steffen
>> > >
>> > >
>> > > On 30.08.2010 12:37 "Ashesh Vashi" <<[email protected]>>
>> > > wrote:
>> > >
>> > > > Hi Stefen,
>> > > >
>> > > >
>> > > >
>> > > > Does right click on canvas and press "refresh" context menu resolves
>> > > > the
>> > > > issue?
>> > > >
>> > > >
>> > > > -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA:Enterprise
>> > > > Postgres
>> > >
>> > > > Company <<http://www.enterprisedb.com>>
>> > >
>> > >
>> > >
>> > > >
>> > > >
>> > > >
>> > > > On Mon, Aug 30, 2010 at 3:38 PM, Steffen Kuhn
>> > > > <<<[email protected]>>>
>> > > > wrote:
>> > > >
>> > > > > Hi Guillaume,
>> > > > >
>> > > > > there are still this strange visual relicts (seen on Windows
>> > > > > Vista) in
>> > > > > pgAdmin III 12.0 rc1.
>> > > > > See a screenshot attached. It looks like the "canvas" size is not
>> > > > > determined
>> > > > > correct and difference is not repainted.
>> > > > >
>> > > > > Regards Steffen
>> > > > >
>> > > > > --
>> > > > > Sent via pgadmin-hackers mailing list
>> > > > > (<<[email protected]>>)
>> > > > > To make changes to your subscription:
>> > > > > <<http://www.postgresql.org/mailpref/pgadmin-hackers>>
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > >
>> >
>> >
>>
>> --
>> Sent via pgadmin-hackers mailing list ([email protected])
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>
>
diff --git a/pgadmin/gqb/gqbView.cpp b/pgadmin/gqb/gqbView.cpp
index 44a9691..9e7b311 100644
--- a/pgadmin/gqb/gqbView.cpp
+++ b/pgadmin/gqb/gqbView.cpp
@@ -36,6 +36,7 @@
#include "images/gqbJoinCursor.xpm"
BEGIN_EVENT_TABLE(gqbView, wxScrolledWindow)
+EVT_SIZE(gqbView::OnSize)
EVT_PAINT(gqbView::onPaint)
EVT_MOTION(gqbView::onMotion)
EVT_LEFT_DOWN(gqbView::onMotion)
@@ -740,17 +741,37 @@ void gqbView::updateModelSize(gqbQueryObject* obj, bool updateAnyWay)
modelSize.SetHeight(h);
}
bool updateView = false;
+ int viewW, viewH;
+ GetSize(&viewW, &viewH);
- if ((modelSize.GetWidth() > GQB_MIN_WIDTH || canvasSize.GetWidth() > GQB_MIN_WIDTH) &&
+ if (viewW < GQB_MIN_WIDTH)
+ viewW = GQB_MIN_WIDTH;
+
+ if (viewH < GQB_MIN_HEIGHT)
+ viewH = GQB_MIN_HEIGHT;
+
+ if ((modelSize.GetWidth() > viewW || canvasSize.GetWidth() > viewW) &&
modelSize.GetWidth() != canvasSize.GetWidth())
{
- canvasSize.SetWidth((modelSize.GetWidth() > GQB_MIN_WIDTH ? modelSize.GetWidth() : GQB_MIN_WIDTH));
+ canvasSize.SetWidth((modelSize.GetWidth() > viewW ? modelSize.GetWidth() : viewW));
updateView = true;
}
- if ((modelSize.GetHeight() > GQB_MIN_HEIGHT || canvasSize.GetHeight() > GQB_MIN_HEIGHT) &&
+ if ((modelSize.GetHeight() > viewH || canvasSize.GetHeight() > viewH ) &&
modelSize.GetHeight() != canvasSize.GetHeight())
{
- canvasSize.SetHeight((modelSize.GetHeight() > GQB_MIN_HEIGHT ? modelSize.GetHeight() : GQB_MIN_HEIGHT));
+ canvasSize.SetHeight((modelSize.GetHeight() > viewH ? modelSize.GetHeight() : viewH));
+ updateView = true;
+ }
+
+ if (canvasSize.GetWidth() < viewW)
+ {
+ canvasSize.SetWidth(viewW);
+ updateView = true;
+ }
+
+ if (canvasSize.GetHeight() < viewH)
+ {
+ canvasSize.SetHeight(viewH);
updateView = true;
}
@@ -758,6 +779,14 @@ void gqbView::updateModelSize(gqbQueryObject* obj, bool updateAnyWay)
{
SetVirtualSize(canvasSize);
}
+
+ FitInside();
+ Refresh();
+}
+
+void gqbView::OnSize(wxSizeEvent& event)
+{
+ updateModelSize(NULL, true);
}
diff --git a/pgadmin/include/gqb/gqbViewController.h b/pgadmin/include/gqb/gqbViewController.h
index 80a1e19..da0d54b 100644
--- a/pgadmin/include/gqb/gqbViewController.h
+++ b/pgadmin/include/gqb/gqbViewController.h
@@ -33,9 +33,6 @@
#include "gqb/gqbGridJoinTable.h"
#include "gqb/gqbBrowser.h"
-#define GQB_MIN_WIDTH 1280
-#define GQB_MIN_HEIGHT 800
-
class gqbView;
enum pointerMode
@@ -125,6 +122,7 @@ public:
void onErase(wxEraseEvent& event);
void onEraseBackGround(wxEraseEvent& event);
void OnKeyDown(wxKeyEvent& event);
+ void OnSize(wxSizeEvent& event);
wxPanel* getColsGridPanel(){ return (wxPanel*)projectionPanel; };
wxPanel* getCriteriaPanel(){ return (wxPanel*)criteriaPanel; };
wxPanel* getOrderPanel(){ return (wxPanel*)orderPanel; };
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers