GtkFramePeer.java (setResizable): Override GtkWindowPeer's setResizable method to account for menu bar height when...

2004-01-20  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkFramePeer.java (setResizable):
	Override GtkWindowPeer's setResizable method to account for menu
	bar height when setting the frame's size.

From-SVN: r76227
This commit is contained in:
Thomas Fitzsimmons 2004-01-20 20:56:53 +00:00 committed by Thomas Fitzsimmons
parent 6a59927d0c
commit cbc635173f
2 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2004-01-20 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkFramePeer.java (setResizable):
Override GtkWindowPeer's setResizable method to account for menu
bar height when setting the frame's size.
2004-01-19 Matthias Klose <doko@debian.org>
* libtool-version: Increased `current' to 6.

View File

@ -79,6 +79,18 @@ public class GtkFramePeer extends GtkWindowPeer
}
}
public void setResizable (boolean resizable)
{
// Call setSize; otherwise when resizable is changed from true to
// false the frame will shrink to the dimensions it had before it
// was resizable.
setSize (awtComponent.getWidth() - insets.left - insets.right,
awtComponent.getHeight() - insets.top - insets.bottom
+ menuBarHeight);
set ("allow_shrink", resizable);
set ("allow_grow", resizable);
}
protected void postSizeAllocateEvent()
{
if (menuBar != null)