RE: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193)
Hi, cristallium, I have uploaded the proposed changes [bae2b99] It works for me, try it yourself and if you have any problem let me know. [bae2b99] https://github.com/apache/royale-asjs/commit/bae2b992fc13cd365b5a0148f5828fe68256a1e0 Hiedra De: cont...@cristallium.com Enviado el: lunes, 9 de mayo de 2022 10:04 Para: dev@royale.apache.org Asunto: Re: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193) Yes, this is perfect ! I tested on PC with Chrome and Firefox Le 2022-05-09 04:20, Maria Jose Esteve a écrit : I have obtained satisfactory results by adding observeElementSize to hostComponent.element (for Windows). This could be an initial version: https://github.com/mjesteve/royale-asjs/commit/ce3fc686073b44b75b25d4ef13ed4332e3a364e0 What do you think? Hiedra -Mensaje original- De: Maria Jose Esteve mailto:mjest...@iest.com>> Enviado el: sábado, 30 de abril de 2022 12:01 Para: dev@royale.apache.org<mailto:dev@royale.apache.org>; cont...@cristallium.com<mailto:cont...@cristallium.com> Asunto: RE: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193) Yes, it will be necessary to put some "Observer". It occurs to me to look at the existing solution in Grid/GridCell. Hiedra -Mensaje original- De: cont...@cristallium.com<mailto:cont...@cristallium.com> mailto:cont...@cristallium.com>> Enviado el: sábado, 30 de abril de 2022 10:42 Para: dev@royale.apache.org<mailto:dev@royale.apache.org> Asunto: RE: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193) Hi, Sorry, I misunderstood your previous message. I belived that hostComponent.element.scrollWidth doesn't work properly on Mac. If that's working properly then this piece of code will solve the issue : var adjustedHostWidth:Number = Math.floor(host.width - borderMetrics.left - borderMetrics.right); if (hostComponent.containsClass("scroll") == true){ //Reserve some room for VScrollbar adjustedHostWidth -= hostComponent.element.scrollWidth ; } But this need another fix to be totaly fonctional : layout() must be called again to update margin-right value if browser is redimensioned What's your opinion ? Fred On 2022/04/29 08:39:23 Maria Jose Esteve wrote: Hi, I would like to get your opinion about the Cristallium PR: For THL to correctly calculate the internal width of the container you need to know if the vertical scroll bar is visible and if so deduct its width. It seems that obtaining this value, the scroll width, depends on the environment: - Satisfactory tests have been obtained on Windows, with hostComponent.element.scrollWidth. - On Mac, the scroll has a different behavior but it seems that the tests are also satisfactory. Several questions: With your experience, would using hostComponent.element.scrollWidth be reliable enough? And for those of you who work with Mac, any particularities to consider? As a temporary solution, Cristallium proposes to create a property "vscrollBarWidthReserve" where we would indicate, in each case, the width we know the scroll will have, but I think we should focus on getting the correct scroll width... What is your opinion? Thx. Hiedra De: Cristallium Enviado el: jueves, 28 de abril de 2022 20:39 Para: apache/royale-asjs CC: Maria Jose Esteve ; Mention Asunto: Re: [apache/royale-asjs] TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193) Hi Maria, I share the same thought from you : if there was a way to get, truthfully or acceptably, the width of the scroll it would be better. When you said "mac" are you talking of "safari" web browser ? If yes I search a little on Internet, but found nothing interessing to get safari scrollbar width. Do you think other Apache Royale team would have an advice on it ? Actually I didn't see any solution except adding a new property ( or bead but my level isn't hight enought to know what's better). Can we for now add property (or bead) and when all browsers will propose to have a real way to get scroll width we could remove this property ? - Reply to this email directly, view it on GitHub<https://github.com/apache/royale-asjs/issues/1193#issuecomment- 1112538265>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANJL3U3L6S2CLOZXSI4BFEDVHANCNFSM5TQLH3BA>. You are receiving this because you were mentioned.Message ID: -- Frédéric Gilli mob.0668542622 http://www.cristallium.com [cid:image001.png@01D86ABA.71C72ED0]<http://www.cristallium.com/>
Re: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193)
Yes, this is perfect ! I tested on PC with Chrome and Firefox Le 2022-05-09 04:20, Maria Jose Esteve a écrit : I have obtained satisfactory results by adding observeElementSize to hostComponent.element (for Windows). This could be an initial version: https://github.com/mjesteve/royale-asjs/commit/ce3fc686073b44b75b25d4ef13ed4332e3a364e0 What do you think? Hiedra -Mensaje original- De: Maria Jose Esteve Enviado el: sábado, 30 de abril de 2022 12:01 Para: dev@royale.apache.org; cont...@cristallium.com Asunto: RE: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193) Yes, it will be necessary to put some "Observer". It occurs to me to look at the existing solution in Grid/GridCell. Hiedra -Mensaje original- De: cont...@cristallium.com Enviado el: sábado, 30 de abril de 2022 10:42 Para: dev@royale.apache.org Asunto: RE: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193) Hi, Sorry, I misunderstood your previous message. I belived that hostComponent.element.scrollWidth doesn't work properly on Mac. If that's working properly then this piece of code will solve the issue : var adjustedHostWidth:Number = Math.floor(host.width - borderMetrics.left - borderMetrics.right); if (hostComponent.containsClass("scroll") == true){ //Reserve some room for VScrollbar adjustedHostWidth -= hostComponent.element.scrollWidth ; } But this need another fix to be totaly fonctional : layout() must be called again to update margin-right value if browser is redimensioned What's your opinion ? Fred On 2022/04/29 08:39:23 Maria Jose Esteve wrote: Hi, I would like to get your opinion about the Cristallium PR: For THL to correctly calculate the internal width of the container you need to know if the vertical scroll bar is visible and if so deduct its width. It seems that obtaining this value, the scroll width, depends on the environment: - Satisfactory tests have been obtained on Windows, with hostComponent.element.scrollWidth. - On Mac, the scroll has a different behavior but it seems that the tests are also satisfactory. Several questions: With your experience, would using hostComponent.element.scrollWidth be reliable enough? And for those of you who work with Mac, any particularities to consider? As a temporary solution, Cristallium proposes to create a property "vscrollBarWidthReserve" where we would indicate, in each case, the width we know the scroll will have, but I think we should focus on getting the correct scroll width... What is your opinion? Thx. Hiedra De: Cristallium Enviado el: jueves, 28 de abril de 2022 20:39 Para: apache/royale-asjs CC: Maria Jose Esteve ; Mention Asunto: Re: [apache/royale-asjs] TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193) Hi Maria, I share the same thought from you : if there was a way to get, truthfully or acceptably, the width of the scroll it would be better. When you said "mac" are you talking of "safari" web browser ? If yes I search a little on Internet, but found nothing interessing to get safari scrollbar width. Do you think other Apache Royale team would have an advice on it ? Actually I didn't see any solution except adding a new property ( or bead but my level isn't hight enought to know what's better). Can we for now add property (or bead) and when all browsers will propose to have a real way to get scroll width we could remove this property ? - Reply to this email directly, view it on GitHub<https://github.com/apache/royale-asjs/issues/1193#issuecomment- 1112538265>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANJL3U3L6S2CLOZXSI4BFEDVHANCNFSM5TQLH3BA>. You are receiving this because you were mentioned.Message ID: -- Frédéric Gilli mob.0668542622 http://www.cristallium.com [1] Links: -- [1] http://www.cristallium.com
RE: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193)
I have obtained satisfactory results by adding observeElementSize to hostComponent.element (for Windows). This could be an initial version: https://github.com/mjesteve/royale-asjs/commit/ce3fc686073b44b75b25d4ef13ed4332e3a364e0 What do you think? Hiedra -Mensaje original- De: Maria Jose Esteve Enviado el: sábado, 30 de abril de 2022 12:01 Para: dev@royale.apache.org; cont...@cristallium.com Asunto: RE: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193) Yes, it will be necessary to put some "Observer". It occurs to me to look at the existing solution in Grid/GridCell. Hiedra -Mensaje original- De: cont...@cristallium.com Enviado el: sábado, 30 de abril de 2022 10:42 Para: dev@royale.apache.org Asunto: RE: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193) Hi, Sorry, I misunderstood your previous message. I belived that hostComponent.element.scrollWidth doesn't work properly on Mac. If that's working properly then this piece of code will solve the issue : var adjustedHostWidth:Number = Math.floor(host.width - borderMetrics.left - borderMetrics.right); if (hostComponent.containsClass("scroll") == true){ //Reserve some room for VScrollbar adjustedHostWidth -= hostComponent.element.scrollWidth ; } But this need another fix to be totaly fonctional : layout() must be called again to update margin-right value if browser is redimensioned What's your opinion ? Fred On 2022/04/29 08:39:23 Maria Jose Esteve wrote: > Hi, I would like to get your opinion about the Cristallium PR: > For THL to correctly calculate the internal width of the container you > need to know if the vertical scroll bar is visible and if so deduct > its width. > > It seems that obtaining this value, the scroll width, depends on the > environment: > - Satisfactory tests have been obtained on Windows, with > hostComponent.element.scrollWidth. > - On Mac, the scroll has a different behavior but it seems that the > tests are also satisfactory. > > Several questions: > With your experience, would using hostComponent.element.scrollWidth be > reliable enough? > And for those of you who work with Mac, any particularities to > consider? > > As a temporary solution, Cristallium proposes to create a property > "vscrollBarWidthReserve" where we would indicate, in each case, the > width we know the scroll will have, but I think we should focus on > getting the correct scroll width... What is your opinion? > > Thx. > > Hiedra > > De: Cristallium > Enviado el: jueves, 28 de abril de 2022 20:39 > Para: apache/royale-asjs > CC: Maria Jose Esteve ; Mention > > Asunto: Re: [apache/royale-asjs] TileHorizontalLayout compute wrong > margin-right in case of scroller (ignoring scrollbar width) (Issue > #1193) > > > Hi Maria, > > I share the same thought from you : if there was a way to get, > truthfully or acceptably, the width of the scroll it would be better. > When you said "mac" are you talking of "safari" web browser ? If yes I > search a little on Internet, but found nothing interessing to get > safari scrollbar width. > Do you think other Apache Royale team would have an advice on it ? > Actually I didn't see any solution except adding a new property ( or > bead but my level isn't hight enought to know what's better). > Can we for now add property (or bead) and when all browsers will > propose to have a real way to get scroll width we could remove this > property ? > > - > Reply to this email directly, view it on > GitHub<https://github.com/apache/royale-asjs/issues/1193#issuecomment- > 1112538265>, > or > unsubscribe<https://github.com/notifications/unsubscribe-auth/ANJL3U3L6S2CLOZXSI4BFEDVHANCNFSM5TQLH3BA>. > You are receiving this because you were mentioned.Message ID: > >
RE: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193)
Yes, it will be necessary to put some "Observer". It occurs to me to look at the existing solution in Grid/GridCell. Hiedra -Mensaje original- De: cont...@cristallium.com Enviado el: sábado, 30 de abril de 2022 10:42 Para: dev@royale.apache.org Asunto: RE: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193) Hi, Sorry, I misunderstood your previous message. I belived that hostComponent.element.scrollWidth doesn't work properly on Mac. If that's working properly then this piece of code will solve the issue : var adjustedHostWidth:Number = Math.floor(host.width - borderMetrics.left - borderMetrics.right); if (hostComponent.containsClass("scroll") == true){ //Reserve some room for VScrollbar adjustedHostWidth -= hostComponent.element.scrollWidth ; } But this need another fix to be totaly fonctional : layout() must be called again to update margin-right value if browser is redimensioned What's your opinion ? Fred On 2022/04/29 08:39:23 Maria Jose Esteve wrote: > Hi, I would like to get your opinion about the Cristallium PR: > For THL to correctly calculate the internal width of the container you > need to know if the vertical scroll bar is visible and if so deduct > its width. > > It seems that obtaining this value, the scroll width, depends on the > environment: > - Satisfactory tests have been obtained on Windows, with > hostComponent.element.scrollWidth. > - On Mac, the scroll has a different behavior but it seems that the > tests are also satisfactory. > > Several questions: > With your experience, would using hostComponent.element.scrollWidth be > reliable enough? > And for those of you who work with Mac, any particularities to > consider? > > As a temporary solution, Cristallium proposes to create a property > "vscrollBarWidthReserve" where we would indicate, in each case, the > width we know the scroll will have, but I think we should focus on > getting the correct scroll width... What is your opinion? > > Thx. > > Hiedra > > De: Cristallium > Enviado el: jueves, 28 de abril de 2022 20:39 > Para: apache/royale-asjs > CC: Maria Jose Esteve ; Mention > > Asunto: Re: [apache/royale-asjs] TileHorizontalLayout compute wrong > margin-right in case of scroller (ignoring scrollbar width) (Issue > #1193) > > > Hi Maria, > > I share the same thought from you : if there was a way to get, > truthfully or acceptably, the width of the scroll it would be better. > When you said "mac" are you talking of "safari" web browser ? If yes I > search a little on Internet, but found nothing interessing to get > safari scrollbar width. > Do you think other Apache Royale team would have an advice on it ? > Actually I didn't see any solution except adding a new property ( or > bead but my level isn't hight enought to know what's better). > Can we for now add property (or bead) and when all browsers will > propose to have a real way to get scroll width we could remove this > property ? > > - > Reply to this email directly, view it on > GitHub<https://github.com/apache/royale-asjs/issues/1193#issuecomment- > 1112538265>, > or > unsubscribe<https://github.com/notifications/unsubscribe-auth/ANJL3U3L6S2CLOZXSI4BFEDVHANCNFSM5TQLH3BA>. > You are receiving this because you were mentioned.Message ID: > >
RE: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193)
Hi, Sorry, I misunderstood your previous message. I belived that hostComponent.element.scrollWidth doesn't work properly on Mac. If that's working properly then this piece of code will solve the issue : var adjustedHostWidth:Number = Math.floor(host.width - borderMetrics.left - borderMetrics.right); if (hostComponent.containsClass("scroll") == true){ //Reserve some room for VScrollbar adjustedHostWidth -= hostComponent.element.scrollWidth ; } But this need another fix to be totaly fonctional : layout() must be called again to update margin-right value if browser is redimensioned What's your opinion ? Fred On 2022/04/29 08:39:23 Maria Jose Esteve wrote: Hi, I would like to get your opinion about the Cristallium PR: For THL to correctly calculate the internal width of the container you need to know if the vertical scroll bar is visible and if so deduct its width. It seems that obtaining this value, the scroll width, depends on the environment: - Satisfactory tests have been obtained on Windows, with hostComponent.element.scrollWidth. - On Mac, the scroll has a different behavior but it seems that the tests are also satisfactory. Several questions: With your experience, would using hostComponent.element.scrollWidth be reliable enough? And for those of you who work with Mac, any particularities to consider? As a temporary solution, Cristallium proposes to create a property "vscrollBarWidthReserve" where we would indicate, in each case, the width we know the scroll will have, but I think we should focus on getting the correct scroll width... What is your opinion? Thx. Hiedra De: Cristallium Enviado el: jueves, 28 de abril de 2022 20:39 Para: apache/royale-asjs CC: Maria Jose Esteve ; Mention Asunto: Re: [apache/royale-asjs] TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193) Hi Maria, I share the same thought from you : if there was a way to get, truthfully or acceptably, the width of the scroll it would be better. When you said "mac" are you talking of "safari" web browser ? If yes I search a little on Internet, but found nothing interessing to get safari scrollbar width. Do you think other Apache Royale team would have an advice on it ? Actually I didn't see any solution except adding a new property ( or bead but my level isn't hight enought to know what's better). Can we for now add property (or bead) and when all browsers will propose to have a real way to get scroll width we could remove this property ? - Reply to this email directly, view it on GitHub<https://github.com/apache/royale-asjs/issues/1193#issuecomment-1112538265>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANJL3U3L6S2CLOZXSI4BFEDVHANCNFSM5TQLH3BA>. You are receiving this because you were mentioned.Message ID:
TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193)
Hi, I would like to get your opinion about the Cristallium PR: For THL to correctly calculate the internal width of the container you need to know if the vertical scroll bar is visible and if so deduct its width. It seems that obtaining this value, the scroll width, depends on the environment: - Satisfactory tests have been obtained on Windows, with hostComponent.element.scrollWidth. - On Mac, the scroll has a different behavior but it seems that the tests are also satisfactory. Several questions: With your experience, would using hostComponent.element.scrollWidth be reliable enough? And for those of you who work with Mac, any particularities to consider? As a temporary solution, Cristallium proposes to create a property "vscrollBarWidthReserve" where we would indicate, in each case, the width we know the scroll will have, but I think we should focus on getting the correct scroll width... What is your opinion? Thx. Hiedra De: Cristallium Enviado el: jueves, 28 de abril de 2022 20:39 Para: apache/royale-asjs CC: Maria Jose Esteve ; Mention Asunto: Re: [apache/royale-asjs] TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193) Hi Maria, I share the same thought from you : if there was a way to get, truthfully or acceptably, the width of the scroll it would be better. When you said "mac" are you talking of "safari" web browser ? If yes I search a little on Internet, but found nothing interessing to get safari scrollbar width. Do you think other Apache Royale team would have an advice on it ? Actually I didn't see any solution except adding a new property ( or bead but my level isn't hight enought to know what's better). Can we for now add property (or bead) and when all browsers will propose to have a real way to get scroll width we could remove this property ? - Reply to this email directly, view it on GitHub<https://github.com/apache/royale-asjs/issues/1193#issuecomment-1112538265>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANJL3U3L6S2CLOZXSI4BFEDVHANCNFSM5TQLH3BA>. You are receiving this because you were mentioned.Message ID: