Skip to content

Commit

Permalink
UI changes for changing GPS coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
cleme authored and cleme committed Jan 4, 2022
1 parent 12bb30e commit d0f690e
Showing 1 changed file with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1291,9 +1291,13 @@ private void changeGPSPosAction(ActionEvent event) {
VBox vb = new VBox();
vb.setPadding(new Insets(10));
vb.setSpacing(5);
popOver.setContentNode(vb);
popOver.show(gpsPosButton);
HBox hb = new HBox();
hb.setAlignment(Pos.CENTER_LEFT);
hb.setSpacing(5);
CustomTextField searchField = new CustomTextField();
HBox.setHgrow(searchField, Priority.ALWAYS);
Button searchButton = new Button();
searchButton.setGraphic(new FontIcon("ti-search:16"));
searchButton.setId("toolbutton");
Expand All @@ -1304,7 +1308,7 @@ private void changeGPSPosAction(ActionEvent event) {
event.consume();
});
Button saveButton=new Button();
saveButton.setGraphic(new FontIcon("ti-save:16"));
saveButton.setGraphic(new FontIcon("ti-save:20"));
saveButton.setId("toolbutton");
saveButton.setOnAction((q) -> {
try {
Expand All @@ -1316,13 +1320,16 @@ private void changeGPSPosAction(ActionEvent event) {
hb.getChildren().add(new Label("Place:"));
hb.getChildren().add(searchField);
hb.getChildren().add(searchButton);
hb.getChildren().add(saveButton);
HBox hbHeight = new HBox();
hbHeight.setSpacing(5);
hbHeight.getChildren().add(new Label("Heigth:"));
hb.getChildren().add(new Label("Heigth:"));
CustomTextField heightField=new CustomTextField();
hbHeight.getChildren().add(heightField);
vb.getChildren().add(hbHeight);
heightField.setPrefWidth(80);
heightField.setMinWidth(80);
hb.getChildren().add(heightField);
HBox hbSaveBox=new HBox();
hbSaveBox.setAlignment(Pos.CENTER_LEFT);
HBox.setHgrow(hbSaveBox, Priority.ALWAYS);
hbSaveBox.getChildren().add(saveButton);
vb.getChildren().add(hbSaveBox);
vb.getChildren().add(hb);
map.setZoom(19);
double lat = actualMediaFile.getGpsLatPosAsDouble();
Expand All @@ -1340,8 +1347,6 @@ private void changeGPSPosAction(ActionEvent event) {
map.setEffect(new ColorAdjust(0, -0.5, 0, 0));
vb.getChildren().add(map);
vb.getChildren().add(message);
popOver.setContentNode(vb);
popOver.show(gpsPosButton);
((Parent) popOver.getSkin().getNode()).getStylesheets()
.add(getClass().getResource("/org/photoslide/css/PopOver.css").toExternalForm());
}
Expand Down

0 comments on commit d0f690e

Please sign in to comment.