Skip to content
Snippets Groups Projects
Commit cb2bb7f8 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

Fixed #208 - description in paymentcell/searchcell remove tab and new line

parent 3b8eb2de
No related branches found
No related tags found
1 merge request!213merge v1_6_0 into master
......@@ -143,4 +143,16 @@ public class Helpers
return null;
}
}
/**
* Replaces line breaks and tabs with spaces
* @param text
* @return String
*/
public static String getFlatText(String text)
{
text = text.replace("\n", " ");
text = text.replace("\t", " ");
return text;
}
}
\ No newline at end of file
......@@ -124,7 +124,7 @@ public class PaymentCell extends ListCell<Payment>
if(item.getDescription() != null && !item.getDescription().equals(""))
{
Label labelDescription = new Label(item.getDescription());
Label labelDescription = new Label(Helpers.getFlatText(item.getDescription()));
labelDescription.setStyle("-fx-font-size: 14; -fx-text-fill: " + ConvertTo.toRGBHexWithoutOpacity(Colors.TEXT) + "; -fx-font-style: italic");
labelDescription.setAlignment(Pos.CENTER_LEFT);
labelDescription.getStyleClass().add("greylabel");
......
......@@ -112,7 +112,7 @@ public class SearchCell extends ListCell<Payment>
if(item.getDescription() != null && !item.getDescription().equals(""))
{
Label labelDescription = new Label(item.getDescription());
Label labelDescription = new Label(Helpers.getFlatText(item.getDescription()));
labelDescription.setStyle("-fx-font-size: 14; -fx-text-fill: " + ConvertTo.toRGBHexWithoutOpacity(Colors.TEXT) + "; -fx-font-style: italic");
labelDescription.setAlignment(Pos.CENTER_LEFT);
labelDescription.getStyleClass().add("greylabel");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment