1717 */
1818package org .jackhuang .hmcl .ui ;
1919
20- import com .jfoenix .controls .JFXButton ;
21- import com .jfoenix .controls .JFXCheckBox ;
22- import com .jfoenix .controls .JFXComboBox ;
23- import com .jfoenix .controls .JFXListView ;
20+ import com .jfoenix .controls .*;
2421import javafx .application .Platform ;
2522import javafx .beans .InvalidationListener ;
2623import javafx .beans .binding .Bindings ;
4340import org .jackhuang .hmcl .ui .construct .MessageDialogPane ;
4441import org .jackhuang .hmcl .ui .construct .NoneMultipleSelectionModel ;
4542import org .jackhuang .hmcl .ui .construct .SpinnerPane ;
46- import org .jackhuang .hmcl .util .*;
47- import org .jackhuang .hmcl .util .platform .*;
43+ import org .jackhuang .hmcl .util .CircularArrayList ;
44+ import org .jackhuang .hmcl .util .Lang ;
45+ import org .jackhuang .hmcl .util .Log4jLevel ;
46+ import org .jackhuang .hmcl .util .StringUtils ;
47+ import org .jackhuang .hmcl .util .platform .ManagedProcess ;
48+ import org .jackhuang .hmcl .util .platform .SystemUtils ;
4849
4950import java .io .IOException ;
5051import java .nio .file .Files ;
@@ -257,6 +258,7 @@ private static final class LogWindowSkin extends SkinBase<LogWindowImpl> {
257258 private static final PseudoClass SELECTED = PseudoClass .getPseudoClass ("selected" );
258259
259260 private final Set <ListCell <Log >> selected = new HashSet <>();
261+ private final JFXSnackbar snackbar = new JFXSnackbar ();
260262
261263 LogWindowSkin (LogWindowImpl control ) {
262264 super (control );
@@ -265,7 +267,7 @@ private static final class LogWindowSkin extends SkinBase<LogWindowImpl> {
265267 vbox .setPadding (new Insets (3 , 0 , 3 , 0 ));
266268 getSkinnable ().stackPane .getChildren ().setAll (vbox );
267269 getChildren ().setAll (getSkinnable ().stackPane );
268-
270+ snackbar . registerSnackbarContainer ( getSkinnable (). stackPane );
269271
270272 {
271273 BorderPane borderPane = new BorderPane ();
@@ -381,7 +383,8 @@ protected void updateItem(Log item, boolean empty) {
381383 }
382384 }
383385
384- FXUtils .copyText (stringBuilder .toString ());
386+ FXUtils .copyText (stringBuilder .toString (), null );
387+ snackbar .fireEvent (new JFXSnackbar .SnackbarEvent (new JFXSnackbarLayout (i18n ("message.copied" ))));
385388 }
386389 });
387390
0 commit comments