-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paragraph's Line-Spacing CSS doesn't work #382
Comments
Use TextFLow's CSS: /* when lines are wrapped, the number (double) of pixels between lines */
-fx-line-spacing: <number>; |
Also, have you seen the RichTextFX CSS Reference Guide? |
Hi, |
@IntelligyScience Can you give me an update on this? |
I can reproduce this bug using this code: import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
import javafx.stage.Stage;
import org.fxmisc.flowless.VirtualizedScrollPane;
import org.fxmisc.richtext.InlineCssTextArea;
public class BugDemo extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
InlineCssTextArea area = new InlineCssTextArea("AREA TEXT:\n text here\nadnd\nadfsdf\nadf\ndfasdf\n");
TextFlow flow = new TextFlow(new Text("TEXTFLOW TEXT:\n"), new Text("some more stuff\n"), new Text("some additional stuff"));
String css = "-fx-line-spacing: 10px;";
area.setStyle(css);
flow.setStyle(css);
VBox root = new VBox(area, new Text("--------------------"), flow);
Scene scene = new Scene(root, 500, 500);
primaryStage.setScene(scene);
primaryStage.show();
}
} |
The Line Spacing CSS doesn't work, but now that I've documented Flowless, I think I understand why. When the VIrtualFlow's navigator lays out the However, when I ran the above demo with a longer line of text on a single line and wrapped the text, the line spacing CSS for TextFlow did not work. I'm not sure if this is supposed to work, but it's something to know. |
Thinking about this more, As stated before and in the wiki, to add line spacing between lines, one needs to modify the padding values of ParagraphBox. I've updated the CSS guide to forewarn users about this quirk. |
Hi,
I am working with the new Version of the Editor 7.2 and try to modify it for using it in scala.
For the axuliary problem I will open a complete new issue. But for this here is my question, how I can change the line-spacing of paragraphs?
Thank you
André
The text was updated successfully, but these errors were encountered: