File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
services/static-webserver/client/source/class/osparc/wrapper Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ qx.Class.define("osparc.wrapper.JsonFormatter", {
6969 }
7070 console . log ( jsonFormatterPath + " loaded" ) ;
7171 this . setLibReady ( true ) ;
72+
73+ this . __applyStyles ( ) ;
74+
7275 resolve ( ) ;
7376 } , this ) ;
7477
@@ -82,6 +85,30 @@ qx.Class.define("osparc.wrapper.JsonFormatter", {
8285 } ) ;
8386 } ,
8487
88+ __applyStyles : function ( ) {
89+ const styleId = "json-formatter-osparc-style" ;
90+ if ( ! document . getElementById ( styleId ) ) {
91+ const color = qx . theme . manager . Color . getInstance ( ) . resolve ( "text" ) ;
92+ const style = document . createElement ( "style" ) ;
93+ style . id = styleId ;
94+ style . innerHTML = `
95+ .osparc-json-formatter-root .json-formatter-row,
96+ .osparc-json-formatter-root .json-formatter-key,
97+ .osparc-json-formatter-root .json-formatter-value {
98+ color: ${ color } !important;
99+ font-family: "Manrope", sans-serif !important;
100+ }
101+ .osparc-json-formatter-root .json-formatter-key {
102+ font-size: 13px !important;
103+ }
104+ .osparc-json-formatter-root .json-formatter-constructor-name {
105+ display: none !important;
106+ }
107+ ` ;
108+ document . head . appendChild ( style ) ;
109+ }
110+ } ,
111+
85112 createContainer : function ( divId ) {
86113 const container = new qx . ui . embed . Html ( "<div id='" + divId + "'></div>" ) ;
87114
You can’t perform that action at this time.
0 commit comments