File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/main/java/com/devoxx/genie/ui Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1818import static com .devoxx .genie .chatmodel .ChatModelFactory .TEST_MODEL ;
1919import static com .devoxx .genie .ui .component .button .ButtonFactory .createActionButton ;
2020import static com .devoxx .genie .ui .util .DevoxxGenieIconsUtil .CopyIcon ;
21- import static com .intellij .notification .impl .ui .NotificationsUtil .getFontSize ;
2221
2322public class ResponseHeaderPanel extends JBPanel <ResponseHeaderPanel > {
2423
Original file line number Diff line number Diff line change @@ -9,7 +9,13 @@ public class FontUtil {
99 private FontUtil () {}
1010
1111 public static float getFontSize () {
12- EditorColorsScheme scheme = EditorColorsManager .getInstance ().getGlobalScheme ();
12+ EditorColorsManager editorColorsManager = EditorColorsManager .getInstance ();
13+ if (editorColorsManager == null ) {
14+ // Default font size when running in test environment
15+ return JBUIScale .scale (12.0f );
16+ }
17+
18+ EditorColorsScheme scheme = editorColorsManager .getGlobalScheme ();
1319 float fontSize = scheme .getEditorFontSize (); // returns int (size in points)
1420 float scaleFactor = JBUIScale .scale (1.0f ); // returns scale-adjusted value
1521 return fontSize * scaleFactor ;
You can’t perform that action at this time.
0 commit comments