@@ -35,15 +35,7 @@ qx.Class.define("osparc.ui.message.Loading", {
3535 construct : function ( ) {
3636 this . base ( arguments ) ;
3737
38- const layout = new qx . ui . layout . Grid ( 20 , 20 ) ;
39- layout . setRowFlex ( this . self ( ) . GRID_POS . SPACER_TOP , 1 ) ;
40- layout . setRowFlex ( this . self ( ) . GRID_POS . SPACER_BOTTOM , 1 ) ;
41- layout . setColumnFlex ( 0 , 1 ) ;
42- layout . setColumnMaxWidth ( 1 , 400 ) ;
43- layout . setColumnAlign ( 1 , "center" , "middle" ) ;
44- layout . setColumnFlex ( 2 , 1 ) ;
45- layout . setColumnAlign ( 2 , "right" , "middle" ) ;
46- this . _setLayout ( layout ) ;
38+ this . _setLayout ( new qx . ui . layout . VBox ( 10 ) ) ;
4739
4840 this . __buildLayout ( ) ;
4941 } ,
@@ -88,16 +80,6 @@ qx.Class.define("osparc.ui.message.Loading", {
8880 LOGO_HEIGHT : 100 ,
8981 ICON_HEIGHT : 220 ,
9082 STATUS_ICON_SIZE : 20 ,
91-
92- GRID_POS : {
93- TOOLBAR : 0 ,
94- SPACER_TOP : 1 ,
95- LOGO : 2 ,
96- WAITING : 3 ,
97- MESSAGES : 4 ,
98- EXTRA_WIDGETS : 5 ,
99- SPACER_BOTTOM : 6 ,
100- }
10183 } ,
10284
10385 members : {
@@ -108,20 +90,12 @@ qx.Class.define("osparc.ui.message.Loading", {
10890 __maxButton : null ,
10991
11092 __buildLayout : function ( ) {
111- this . _add ( new qx . ui . core . Widget ( ) , {
112- column : 0 ,
113- row : 0
114- } ) ;
115-
11693 const maxLayout = this . __createMaximizeToolbar ( ) ;
117- this . _add ( maxLayout , {
118- column : 2 ,
119- row : this . self ( ) . GRID_POS . TOOLBAR
120- } ) ;
94+ this . _add ( maxLayout ) ;
12195
122- this . _add ( new qx . ui . core . Spacer ( ) , {
123- column : 1 ,
124- row : this . self ( ) . GRID_POS . SPACER_TOP
96+ const topSpacer = new qx . ui . core . Spacer ( ) ;
97+ this . _add ( topSpacer , {
98+ flex : 1 ,
12599 } ) ;
126100
127101 const productLogoPath = osparc . product . Utils . getLogoPath ( ) ;
@@ -141,18 +115,15 @@ qx.Class.define("osparc.ui.message.Loading", {
141115 height : logoHeight
142116 } ) ;
143117 }
144- this . _add ( thumbnail , {
145- column : 1 ,
146- row : this . self ( ) . GRID_POS . LOGO
147- } ) ;
118+ this . _add ( thumbnail ) ;
148119
149120 const waitingHeader = this . __header = new qx . ui . basic . Atom ( ) . set ( {
150121 icon : "@FontAwesome5Solid/circle-notch/" + this . self ( ) . STATUS_ICON_SIZE ,
151122 font : "title-18" ,
152123 alignX : "center" ,
153124 rich : true ,
154125 gap : 15 ,
155- allowGrowX : false
126+ allowGrowX : false ,
156127 } ) ;
157128 const icon = waitingHeader . getChildControl ( "icon" ) ;
158129 osparc . service . StatusUI . updateCircleAnimation ( icon ) ;
@@ -162,30 +133,21 @@ qx.Class.define("osparc.ui.message.Loading", {
162133 wrap : true ,
163134 alignX : "center" ,
164135 } ) ;
165- this . _add ( waitingHeader , {
166- column : 1 ,
167- row : this . self ( ) . GRID_POS . WAITING
168- } ) ;
136+ this . _add ( waitingHeader ) ;
169137
170138 const messages = this . __messagesContainer = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 10 ) . set ( {
171139 alignX : "center"
172140 } ) ) ;
173- this . _add ( messages , {
174- column : 1 ,
175- row : this . self ( ) . GRID_POS . MESSAGES
176- } ) ;
141+ this . _add ( messages ) ;
177142
178143 const extraWidgets = this . __extraWidgets = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 10 ) . set ( {
179144 alignX : "center"
180145 } ) ) ;
181- this . _add ( extraWidgets , {
182- column : 1 ,
183- row : this . self ( ) . GRID_POS . EXTRA_WIDGETS
184- } ) ;
146+ this . _add ( extraWidgets ) ;
185147
186- this . _add ( new qx . ui . core . Spacer ( ) , {
187- column : 1 ,
188- row : this . self ( ) . GRID_POS . SPACER_BOTTOM
148+ const bottomSpacer = new qx . ui . core . Spacer ( ) ;
149+ this . _add ( bottomSpacer , {
150+ flex : 1 ,
189151 } ) ;
190152 } ,
191153
@@ -220,7 +182,7 @@ qx.Class.define("osparc.ui.message.Loading", {
220182 alignX : "right" ,
221183 } ) ) ;
222184 this . bind ( "showToolbar" , toolbarLayout , "visibility" , {
223- converter : showToolbar => showToolbar ? "visible" : "hidden "
185+ converter : showToolbar => showToolbar ? "visible" : "excluded "
224186 } ) ;
225187 toolbarLayout . add ( maxButton ) ;
226188 return toolbarLayout ;
0 commit comments