mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix #EDU-526 Set task description font size depends on editor font size Change fonts for edu study task description panel
This commit is contained in:
@@ -16,9 +16,11 @@
|
||||
|
||||
body {
|
||||
margin-left: 20px;
|
||||
/*font-family: Serif, serif;*/
|
||||
font-family: monospace;
|
||||
font-weight: lighter;
|
||||
font-family: Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Courier, monospace;
|
||||
}
|
||||
|
||||
/* BASICS */
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
body {
|
||||
margin-left: 20px;
|
||||
/*font-family: Serif, serif;*/
|
||||
font-family: monospace;
|
||||
font-weight: lighter;
|
||||
font-family: Helvetica, sans-serif;
|
||||
color: #4f5254;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: "Source Code Pro", fantasy;
|
||||
}
|
||||
/* BASICS */
|
||||
.task-help pre code {
|
||||
|
||||
@@ -1,14 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--all elements like "${}" is replaced by real values while loading page in StudyBrowser-->
|
||||
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<link rel="stylesheet" href="${css_oldcodemirror}">
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<link rel="stylesheet" href="${css_codemirror}">
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<script src="${codemirror}"></script>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<script src="${colorize}"></script>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<script src="${runmode}"></script>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<script src="${highlight_mode}"></script>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<script src="${javascript}"></script>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<script src="${python}"></script>
|
||||
<!--suppress CssInvalidPropertyValue -->
|
||||
<style media="screen" type="text/css">
|
||||
body {
|
||||
font-size: ${font_size}pt !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
${code}
|
||||
|
||||
+7
-1
@@ -7,6 +7,8 @@ import com.intellij.ide.ui.LafManagerListener;
|
||||
import com.intellij.ide.ui.laf.darcula.DarculaLookAndFeelInfo;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsManager;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsScheme;
|
||||
import com.intellij.openapi.util.io.StreamUtil;
|
||||
import com.jetbrains.edu.learning.StudyToolWindowConfigurator;
|
||||
import javafx.application.Platform;
|
||||
@@ -152,8 +154,12 @@ class StudyBrowserWindow extends JFrame {
|
||||
if (template == null) {
|
||||
LOG.warn("Code mirror template is null");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
final EditorColorsScheme editorColorsScheme = EditorColorsManager.getInstance().getGlobalScheme();
|
||||
int fontSize = editorColorsScheme.getEditorFontSize();
|
||||
|
||||
template = template.replace("${font_size}", String.valueOf(fontSize- 2));
|
||||
template = template.replace("${highlight_mode}", getClass().getResource("/code-mirror/clike.js").toExternalForm());
|
||||
template = template.replace("${codemirror}", getClass().getResource("/code-mirror/codemirror.js").toExternalForm());
|
||||
template = template.replace("${python}", getClass().getResource("/code-mirror/python.js").toExternalForm());
|
||||
|
||||
Reference in New Issue
Block a user