Skip to content

Commit b02f3aa

Browse files
committed
modified JSTextUI setPreferredSize removes insets. needs checking.
1 parent 11a8a89 commit b02f3aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSTextUI.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,14 +673,14 @@ protected void updateRootView() {
673673
public Dimension getMinimumSize(JComponent jc) {
674674
Dimension d = getPreferredSize(jc);// new Dimension();
675675
// Document doc = editor.getDocument();
676-
Insets i = jc.getInsets();
676+
// Insets i = jc.getInsets();
677677
// if (doc instanceof AbstractDocument) {
678678
// ((AbstractDocument)doc).readLock();
679679
// }
680680
// try {
681681

682-
d.width += i.left + i.right;
683-
d.height += i.top + i.bottom;
682+
//d.width += i.left + i.right;
683+
//d.height = jc.getFont().getSize() + i.top + i.bottom;
684684

685685
// d.width = (int) rootView.getMinimumSpan(View.X_AXIS) + i.left + i.right;
686686
// d.height = (int) rootView.getMinimumSpan(View.Y_AXIS) + i.top + i.bottom;

0 commit comments

Comments
 (0)