From 034a977c3d5f66c8d7ce6c9dc18210e9deb05a1b Mon Sep 17 00:00:00 2001 From: David Rose Date: Sat, 29 Aug 2009 16:31:51 +0000 Subject: [PATCH] set frame size --- panda/src/pgui/pgButton.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panda/src/pgui/pgButton.cxx b/panda/src/pgui/pgButton.cxx index 527e1d4aef..0643991f56 100644 --- a/panda/src/pgui/pgButton.cxx +++ b/panda/src/pgui/pgButton.cxx @@ -243,6 +243,12 @@ setup(const NodePath &ready, const NodePath &depressed, instance_to_state_def(S_depressed, depressed); instance_to_state_def(S_rollover, rollover); instance_to_state_def(S_inactive, inactive); + + // Set the button frame size. + LPoint3f min_point, max_point; + ready.calc_tight_bounds(min_point, max_point); + set_frame(min_point[0], max_point[0], + min_point[2], max_point[2]); } ////////////////////////////////////////////////////////////////////