Skip to content

Commit

Permalink
Default FontFamily and Size applied using ThemeManager
Browse files Browse the repository at this point in the history
  • Loading branch information
mulla028 committed Dec 10, 2024
1 parent b74af64 commit 9ee5fb8
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

Expand Down

0 comments on commit 9ee5fb8

Please sign in to comment.