@@ -29,7 +29,7 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
2929 } ,
3030
3131 statics : {
32- getIcon : function ( maximize ) {
32+ getZoomIcon : function ( maximize ) {
3333 const iconURL = maximize ? "window-restore" : "window-maximize" ;
3434 return osparc . theme . common . Image . URLS [ iconURL ] + "/20" ;
3535 } ,
@@ -52,10 +52,10 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
5252 /**
5353 * Show Restore/Maximize
5454 */
55- showActionButton : {
55+ showZoomButton : {
5656 check : "Boolean" ,
5757 init : true ,
58- apply : "__applyShowActionButton "
58+ apply : "__applyShowZoomButton "
5959 } ,
6060
6161 /**
@@ -81,7 +81,7 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
8181 __iframe : null ,
8282 __syncScheduled : null ,
8383 __restartButton : null ,
84- __actionButton : null ,
84+ __zoomButton : null ,
8585
8686 // override
8787 _createContentElement : function ( ) {
@@ -101,7 +101,7 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
101101 const restartButton = this . __restartButton = new qx . ui . form . Button ( null , "@FontAwesome5Solid/redo-alt/14" ) . set ( {
102102 zIndex : 20 ,
103103 paddingLeft : 8 ,
104- paddingRight : 8 ,
104+ paddingRight : 4 ,
105105 paddingTop : 6 ,
106106 paddingBottom : 6 ,
107107 backgroundColor : "transparent" ,
@@ -114,20 +114,20 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
114114 appRoot . add ( restartButton , {
115115 top :- 10000
116116 } ) ;
117- let actionButton = this . __actionButton = new qx . ui . form . Button ( null ) . set ( {
118- icon : this . self ( ) . getIcon ( false ) ,
117+ let zoomButton = this . __zoomButton = new qx . ui . form . Button ( null ) . set ( {
118+ icon : this . self ( ) . getZoomIcon ( false ) ,
119119 zIndex : 20 ,
120120 backgroundColor : "transparent" ,
121121 decorator : null
122122 } ) ;
123- osparc . utils . Utils . setIdToWidget ( actionButton , this . self ( ) . getMaximizeWidgetId ( false ) ) ;
124- appRoot . add ( actionButton , {
123+ osparc . utils . Utils . setIdToWidget ( zoomButton , this . self ( ) . getMaximizeWidgetId ( false ) ) ;
124+ appRoot . add ( zoomButton , {
125125 top :- 10000
126126 } ) ;
127- actionButton . addListener ( "execute" , e => {
127+ zoomButton . addListener ( "execute" , e => {
128128 this . maximizeIFrame ( ! this . hasState ( "maximized" ) ) ;
129129 } , this ) ;
130- appRoot . add ( actionButton ) ;
130+ appRoot . add ( zoomButton ) ;
131131 standin . addListener ( "appear" , e => {
132132 this . __syncIframePos ( ) ;
133133 } ) ;
@@ -138,7 +138,7 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
138138 restartButton . setLayoutProperties ( {
139139 top : - 10000
140140 } ) ;
141- actionButton . setLayoutProperties ( {
141+ zoomButton . setLayoutProperties ( {
142142 top : - 10000
143143 } ) ;
144144 } ) ;
@@ -171,14 +171,14 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
171171 this . fireEvent ( "restore" ) ;
172172 this . removeState ( "maximized" ) ;
173173 }
174- const actionButton = this . __actionButton ;
175- actionButton . setIcon ( this . self ( ) . getIcon ( maximize ) ) ;
174+ const actionButton = this . __zoomButton ;
175+ actionButton . setIcon ( this . self ( ) . getZoomIcon ( maximize ) ) ;
176176 osparc . utils . Utils . setIdToWidget ( actionButton , this . self ( ) . getMaximizeWidgetId ( maximize ) ) ;
177177 qx . event . message . Bus . getInstance ( ) . dispatchByName ( "maximizeIframe" , this . hasState ( "maximized" ) ) ;
178178 } ,
179179
180- __applyShowActionButton : function ( show ) {
181- show ? this . __actionButton . show ( ) : this . __actionButton . exclude ( ) ;
180+ __applyShowZoomButton : function ( show ) {
181+ show ? this . __zoomButton . show ( ) : this . __zoomButton . exclude ( ) ;
182182 } ,
183183
184184 __applyShowRestartButton : function ( show ) {
@@ -200,7 +200,7 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
200200 let divPos = qx . bom . element . Location . get ( domElement , "scroll" ) ;
201201 let divSize = qx . bom . element . Dimension . getSize ( domElement ) ;
202202 this . __iframe . setLayoutProperties ( {
203- top : divPos . top - iframeParentPos . top ,
203+ top : divPos . top - iframeParentPos . top + 25 ,
204204 left : ( divPos . left - iframeParentPos . left )
205205 } ) ;
206206 this . __iframe . set ( {
@@ -211,7 +211,7 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
211211 top : ( divPos . top - iframeParentPos . top ) ,
212212 right : ( iframeParentPos . right - iframeParentPos . left - divPos . right ) + 35
213213 } ) ;
214- this . __actionButton . setLayoutProperties ( {
214+ this . __zoomButton . setLayoutProperties ( {
215215 top : ( divPos . top - iframeParentPos . top ) ,
216216 right : ( iframeParentPos . right - iframeParentPos . left - divPos . right )
217217 } ) ;
0 commit comments