Revision: 75612
http://sourceforge.net/p/brlcad/code/75612
Author: starseeker
Date: 2020-04-26 17:17:45 +0000 (Sun, 26 Apr 2020)
Log Message:
-----------
Expand canvas size with parent window.
Modified Paths:
--------------
brlcad/trunk/src/libdm/tcl_img.cpp
Modified: brlcad/trunk/src/libdm/tcl_img.cpp
===================================================================
--- brlcad/trunk/src/libdm/tcl_img.cpp 2020-04-26 17:09:02 UTC (rev 75611)
+++ brlcad/trunk/src/libdm/tcl_img.cpp 2020-04-26 17:17:45 UTC (rev 75612)
@@ -229,8 +229,11 @@
// Define a canvas widget, pack it into the root window, and associate the
image with it
- std::string canvas_cmd = std::string("pack [canvas ") +
std::string(DM_CANVAS) + std::string(" -width ") + std::to_string(wsize) +
std::string(" -height ") + std::to_string(wsize) + std::string("]") ;
+ // TODO - should the canvas be inside a frame?
+ std::string canvas_cmd = std::string("canvas ") + std::string(DM_CANVAS) +
std::string(" -width ") + std::to_string(wsize) + std::string(" -height ") +
std::to_string(wsize) ;
Tcl_Eval(interp, canvas_cmd.c_str());
+ std::string pack_cmd = std::string("pack ") + std::string(DM_CANVAS) +
std::string(" -fill both -expand 1");
+ Tcl_Eval(interp, pack_cmd.c_str());
std::string canvas_img_cmd = std::string(DM_CANVAS) + std::string(" create
image 0 0 -image ") + std::string(DM_PHOTO) + std::string(" -anchor nw");
Tcl_Eval(interp, canvas_img_cmd.c_str());
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits