4545import javafx .scene .layout .BackgroundFill ;
4646import javafx .scene .layout .CornerRadii ;
4747import javafx .scene .layout .HBox ;
48- import javafx .scene .layout .Pane ;
4948import javafx .scene .layout .Priority ;
5049import javafx .scene .paint .Color ;
5150import javafx .util .Duration ;
@@ -66,7 +65,7 @@ public TestCaseListCell(TestCollectionController testCollectionController) {
6665 @ Override
6766 protected Pair <Node , Subscription > getNonEditingGraphic (LiveTestCase testCase ) {
6867 HBox hBox = new HBox ();
69- hBox .setSpacing (10 );
68+ hBox .setSpacing (5 );
7069
7170 FontIcon statusIcon = new FontIcon ();
7271 Label statusLabel = new Label ();
@@ -99,34 +98,34 @@ protected Pair<Node, Subscription> getNonEditingGraphic(LiveTestCase testCase) {
9998 }
10099 });
101100
102-
103- Label descriptionLabel = new Label ();
104-
105- ControlUtil .bindLabelPropertyWithDefault (descriptionLabel , "(no description)" , testCase .descriptionProperty ());
106-
107- ControlUtil .registerDoubleClickListener (descriptionLabel , this ::doStartEdit );
108-
109101 Button editDescription = new Button ();
110102 editDescription .setGraphic (new FontIcon ("far-edit" ));
111103 editDescription .getStyleClass ().addAll ("edit-test-description" , "icon-button" );
112104 Tooltip .install (editDescription , new Tooltip ("Edit test description" ));
113105 editDescription .setOnAction (e1 -> doStartEdit ());
114106 sub = sub .and (() -> editDescription .setOnAction (null ));
115107
116- Pane spacer = new Pane ();
117- HBox .setHgrow (spacer , Priority .ALWAYS );
108+ Label descriptionLabel = new Label ();
109+ ControlUtil .bindLabelPropertyWithDefault (descriptionLabel , "(no description)" , testCase .descriptionProperty ());
110+
111+ HBox descriptionPane = new HBox ();
112+ descriptionPane .getChildren ().addAll (editDescription , descriptionLabel );
113+ descriptionPane .setAlignment (Pos .CENTER_LEFT );
114+ descriptionPane .setSpacing (2 );
115+ HBox .setHgrow (descriptionPane , Priority .ALWAYS );
116+ ControlUtil .registerDoubleClickListener (descriptionPane , this ::doStartEdit );
118117
119118 Button duplicate = new Button ();
120119 duplicate .setGraphic (new FontIcon ("far-copy" ));
121120 duplicate .getStyleClass ().addAll ("duplicate-test" , "icon-button" );
122- Tooltip .install (duplicate , new Tooltip ("Copy test case" ));
121+ Tooltip .install (duplicate , new Tooltip ("Duplicate test case" ));
123122 duplicate .setOnAction (e1 -> collection .duplicate (testCase ));
124123 sub = sub .and (() -> duplicate .setOnAction (null ));
125124
126125
127126 ToggleButton load = new ToggleButton ();
128127 load .setToggleGroup (collection .getLoadedToggleGroup ());
129- load .setGraphic (new FontIcon ("fas-external-link-alt " ));
128+ load .setGraphic (new FontIcon ("far-file-code " ));
130129 load .getStyleClass ().addAll ("load-button" , "icon-button" );
131130 Tooltip .install (load , new Tooltip ("Load test case in editor" ));
132131
@@ -154,10 +153,7 @@ protected Pair<Node, Subscription> getNonEditingGraphic(LiveTestCase testCase) {
154153 Tooltip .install (delete , new Tooltip ("Remove test case" ));
155154 delete .setOnAction (e -> collection .deleteTestCase (testCase ));
156155
157- ControlUtil .registerDoubleClickListener (spacer , load ::fire );
158-
159-
160- hBox .getChildren ().setAll (statusLabel , descriptionLabel , editDescription , spacer , delete , duplicate , load );
156+ hBox .getChildren ().setAll (statusLabel , descriptionPane , delete , duplicate , load );
161157 hBox .setAlignment (Pos .CENTER_LEFT );
162158
163159
0 commit comments