Skip to content

Commit

Permalink
Wrap with isWeb()
Browse files Browse the repository at this point in the history
  • Loading branch information
HiromuHota committed Jan 1, 2021
1 parent df3d864 commit 60fe057
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ui/src/main/java/org/apache/hop/ui/core/widget/TableView.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.apache.hop.ui.core.gui.GuiResource;
import org.apache.hop.ui.hopgui.HopGui;
import org.apache.hop.ui.hopgui.TextSizeUtilFacade;
import org.apache.hop.ui.util.EnvironmentUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.custom.CCombo;
Expand Down Expand Up @@ -2235,6 +2236,11 @@ private void setColumnWidthBasedOnTextField( final int colnr, final boolean useV
int strmax = TextSizeUtilFacade.textExtent(str).x + 20;
int colmax = tablecolumn[ colnr ].getWidth();
if ( strmax > colmax ) {
if (!EnvironmentUtils.getInstance().isWeb()) {
if ( Const.isOSX() || Const.isLinux() ) {
strmax *= 1.4;
}
}
tablecolumn[ colnr ].setWidth( strmax + 30 );

// On linux, this causes the text to select everything...
Expand Down

0 comments on commit 60fe057

Please sign in to comment.