diff --git a/src/main/java/org/jabref/gui/ai/components/summary/SummaryShowingComponent.java b/src/main/java/org/jabref/gui/ai/components/summary/SummaryShowingComponent.java index d5bc64355a7..a8f6f2cd14f 100644 --- a/src/main/java/org/jabref/gui/ai/components/summary/SummaryShowingComponent.java +++ b/src/main/java/org/jabref/gui/ai/components/summary/SummaryShowingComponent.java @@ -12,16 +12,20 @@ import javafx.scene.text.Text; import javafx.scene.web.WebView; +import org.jabref.gui.theme.ThemeManager; import org.jabref.logic.ai.summarization.Summary; import org.jabref.logic.layout.format.MarkdownFormatter; import org.jabref.logic.util.WebViewStore; import com.airhacks.afterburner.views.ViewLoader; +import jakarta.inject.Inject; public class SummaryShowingComponent extends VBox { @FXML private Text summaryInfoText; @FXML private CheckBox markdownCheckbox; + @Inject private ThemeManager themeManager; + private WebView contentWebView; private final Summary summary; private final Runnable regenerateCallback; @@ -45,12 +49,10 @@ private void initialize() { private void initializeWebView() { contentWebView = WebViewStore.get(); - contentWebView.setMinHeight(100); - contentWebView.setPrefHeight(300); + VBox.setVgrow(contentWebView, Priority.ALWAYS); - // Apply styles directly to the WebView + themeManager.installCss(contentWebView.getEngine()); - VBox.setVgrow(contentWebView, Priority.ALWAYS); getChildren().addFirst(contentWebView); }