Skip to content

Commit f5ed0d6

Browse files
committed
Adjust the size of the icon so large images work
1 parent 425b7d4 commit f5ed0d6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/neuronrobotics/bowlerstudio/BowlerStudioController.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import javafx.application.Platform;
3333
import javafx.scene.Node;
3434
import javafx.scene.control.Tab;
35+
import javafx.scene.image.ImageView;
3536
import javafx.scene.paint.PhongMaterial;
3637
import javafx.scene.shape.CullFace;
3738
import javafx.scene.transform.Affine;
@@ -171,8 +172,12 @@ public void run() {
171172
}
172173

173174
fileTab.setContent(t);
175+
ImageView icon = AssetFactory.loadIcon("Script-Tab-" + ScriptingEngine.getShellType(file.getName()) + ".png");
176+
icon.setFitHeight(30);
177+
icon.setFitWidth(30);
178+
174179
fileTab.setGraphic(
175-
AssetFactory.loadIcon("Script-Tab-" + ScriptingEngine.getShellType(file.getName()) + ".png"));
180+
icon);
176181

177182
addTab(fileTab, true);
178183
widgets.put(file.getAbsolutePath(), t);

0 commit comments

Comments
 (0)