Skip to content

Commit 4ea1f30

Browse files
author
Bytekeeper
committed
Fixed scrollbars for report view and activity text is no longer cut of on activities view
1 parent b2381b1 commit 4ea1f30

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

src/main/java/org/stt/gui/jfx/ReportController.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,6 @@ public void initialize() {
182182

183183
presetSortingToAscendingCommentColumn();
184184

185-
columnForComment.prefWidthProperty().bind(
186-
tableForReport.widthProperty().subtract(
187-
columnForRoundedDuration.widthProperty().add(
188-
columnForDuration.widthProperty())));
189-
190185
applyClipboardTooltip(columnForComment::setGraphic, "report.tooltips.copyActivity");
191186
applyClipboardTooltip(columnForDuration::setGraphic, "report.tooltips.copyRow");
192187
applyClipboardTooltip(columnForRoundedDuration::setGraphic, "report.tooltips.copyRow");

src/main/java/org/stt/gui/jfx/TimeTrackingItemCell.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,15 @@ class TimeTrackingItemCell extends ListCell<TimeTrackingItem> {
7070
stopButton.setOnAction(event -> actionsHandler.stop(getItem()));
7171

7272
Pane space = new Pane();
73-
HBox.setHgrow(space, Priority.ALWAYS);
73+
HBox.setHgrow(space, Priority.SOMETIMES);
7474
timePane.setPrefWidth(180);
7575
timePane.setSpacing(10);
7676
timePane.setAlignment(Pos.CENTER_LEFT);
7777

7878
StackPane labelArea = new StackPaneWithoutResize(labelForComment);
7979
StackPane.setAlignment(labelForComment, Pos.CENTER_LEFT);
8080

81+
HBox.setHgrow(labelArea, Priority.ALWAYS);
8182
labelArea.setPrefWidth(450);
8283

8384
cellPane.getChildren().addAll(

src/main/resources/org/stt/gui/jfx/ReportPanel.fxml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@
1010
<VBox prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
1111
<TableView fx:id="tableForReport" prefHeight="300.0" prefWidth="400.0" VBox.vgrow="ALWAYS">
1212
<columns>
13-
<TableColumn fx:id="columnForRoundedDuration" prefWidth="100.0" text="%report.rounded"/>
14-
<TableColumn fx:id="columnForDuration" minWidth="0.0" prefWidth="100.0" text="%report.duration"/>
15-
<TableColumn fx:id="columnForComment" minWidth="0.0" prefWidth="108.0" text="%report.activity"/>
13+
<TableColumn fx:id="columnForRoundedDuration" maxWidth="1000.0" prefWidth="50.0"
14+
text="%report.rounded"/>
15+
<TableColumn fx:id="columnForDuration" maxWidth="1000.0" prefWidth="50.0" text="%report.duration"/>
16+
<TableColumn fx:id="columnForComment" maxWidth="5000" minWidth="0.0" prefWidth="300.0"
17+
text="%report.activity"/>
1618
</columns>
19+
<columnResizePolicy>
20+
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY"/>
21+
</columnResizePolicy>
1722
</TableView>
1823
<FlowPane hgap="10.0">
1924
<children>

0 commit comments

Comments
 (0)