Skip to content

Commit

Permalink
Remove scroll bar (FAForever#1661)
Browse files Browse the repository at this point in the history
  • Loading branch information
1-alex98 authored and Chris Haggan committed Apr 15, 2022
1 parent 6821de7 commit 185c479
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ public GameDetailController(I18n i18n, MapService mapService, ModService modServ
}

public void initialize() {
gameDetailRoot.parentProperty().addListener(observable -> {
if (!(gameDetailRoot.getParent() instanceof Pane)) {
return;
}
gameDetailRoot.maxWidthProperty().bind(((Pane) gameDetailRoot.getParent()).widthProperty());
});
watchButton = watchButtonController.getRoot();

joinButton.managedProperty().bind(joinButton.visibleProperty());
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/theme/play/custom_games.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<StackPane xmlns:fx="http://javafx.com/fxml/1" fx:id="gamesRoot" alignment="TOP_CENTER"
xmlns="http://javafx.com/javafx/10.0.2" fx:controller="com.faforever.client.game.CustomGamesController">
xmlns="http://javafx.com/javafx/11.0.1" fx:controller="com.faforever.client.game.CustomGamesController">
<children>
<GridPane fx:id="gamesGridPane">
<columnConstraints>
Expand Down Expand Up @@ -80,8 +80,8 @@
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
</padding>
</VBox>
<ScrollPane fx:id="gameDetailPane" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1"
GridPane.rowSpan="2147483647">
<ScrollPane fx:id="gameDetailPane" hbarPolicy="NEVER" maxWidth="1.7976931348623157E308"
GridPane.columnIndex="1" GridPane.rowSpan="2147483647">
<content>
<fx:include fx:id="gameDetail" source="game_detail.fxml"/>
</content>
Expand Down
17 changes: 9 additions & 8 deletions src/main/resources/theme/play/game_detail.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<GridPane xmlns:fx="http://javafx.com/fxml/1" fx:id="gameDetailRoot" minWidth="50.0" vgap="10.0" xmlns="http://javafx.com/javafx/8.0.141" fx:controller="com.faforever.client.game.GameDetailController">
<GridPane xmlns:fx="http://javafx.com/fxml/1" fx:id="gameDetailRoot" maxWidth="-Infinity" minWidth="50.0" vgap="10.0"
xmlns="http://javafx.com/javafx/11.0.1" fx:controller="com.faforever.client.game.GameDetailController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"/>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"/>
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
Expand Down

0 comments on commit 185c479

Please sign in to comment.