Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit efbb794

Browse files
author
zhourenjian
committed
Fixed bug that Group's title might be crossed by its border in some cases
1 parent 10ad6cd commit efbb794

File tree

1 file changed

+3
-3
lines changed
  • sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets

1 file changed

+3
-3
lines changed

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/Group.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,11 +475,11 @@ public void setText (String string) {
475475
if (!string.equals(groupText)) {
476476
OS.clearChildren(titleText);
477477
titleText.appendChild(document.createTextNode(string));
478-
textWidth = OS.getContainerWidth(titleText);
479-
if (textWidth == 0) {
478+
// textWidth = OS.getContainerWidth(titleText);
479+
// if (textWidth == 0) {
480480
// textWidth = UIStringUtil.calculatePlainStringLineWidth(string);
481481
textWidth = OS.getStringStyledWidth(string, "group-default", handle.style.cssText);
482-
}
482+
// }
483483
if (textWidth != 0) {
484484
int w = this.width - textWidth - 24;
485485
if (w > 0) {

0 commit comments

Comments
 (0)