Jelajahi Sumber

makes_editorhelp_uses_editor_settings_bg_color

This fixes issue #332 by using the "text_editor/background_color" editor
setting as background color for the EditorHelp.
yg2f 10 tahun lalu
induk
melakukan
303ce0ea32
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      tools/editor/editor_help.cpp

+ 3 - 1
tools/editor/editor_help.cpp

@@ -1390,7 +1390,9 @@ EditorHelp::EditorHelp(EditorNode *p_editor) {
 
 
 	{
 	{
 		PanelContainer *pc = memnew( PanelContainer );
 		PanelContainer *pc = memnew( PanelContainer );
-		pc->add_style_override("panel",get_stylebox("normal","TextEdit"));
+		Ref<StyleBoxFlat> style( memnew( StyleBoxFlat ) );
+		style->set_bg_color( EditorSettings::get_singleton()->get("text_editor/background_color") );	
+		pc->add_style_override("panel", style); //get_stylebox("normal","TextEdit"));
 		h_split->add_child(pc);
 		h_split->add_child(pc);
 		class_desc = memnew( RichTextLabel );
 		class_desc = memnew( RichTextLabel );
 		pc->add_child(class_desc);
 		pc->add_child(class_desc);