Revision: 56266
http://sourceforge.net/p/brlcad/code/56266
Author: vladbogo
Date: 2013-07-27 19:02:13 +0000 (Sat, 27 Jul 2013)
Log Message:
-----------
Resize the Qt window when the Tk one changes size.
Modified Paths:
--------------
brlcad/trunk/src/libdm/dm-qt.cpp
Modified: brlcad/trunk/src/libdm/dm-qt.cpp
===================================================================
--- brlcad/trunk/src/libdm/dm-qt.cpp 2013-07-27 18:30:31 UTC (rev 56265)
+++ brlcad/trunk/src/libdm/dm-qt.cpp 2013-07-27 19:02:13 UTC (rev 56266)
@@ -322,11 +322,11 @@
HIDDEN int
qt_configureWin(struct dm *dmp, int force)
{
- /* struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars; */
+ struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
struct qt_vars *privars = (struct qt_vars *)dmp->dm_vars.priv_vars;
- int width = privars->win->width();
- int height = privars->win->height();
+ int width = Tk_Width(pubvars->xtkwin);
+ int height = Tk_Height(pubvars->xtkwin);
if (!force &&
dmp->dm_height == height &&
@@ -334,6 +334,7 @@
return TCL_OK;
qt_reshape(dmp, width, height);
+ privars->win->resize(width, height);
*privars->pix = privars->pix->scaled(width, height);
if (dmp->dm_debugLevel) {
@@ -769,8 +770,7 @@
privars->pix = new QPixmap(dmp->dm_width, dmp->dm_height);
privars->win = new QTkMainWindow(privars->pix, window);
- privars->win->setWidth(dmp->dm_width);
- privars->win->setHeight(dmp->dm_height);
+ privars->win->resize(dmp->dm_width, dmp->dm_height);
privars->win->show();
privars->font = NULL;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits