Our Legacy application which got recently migrated to VA Smalltalk 9.2.1 is having issue center aligning the screen when the scaling is 125%. Below is the code that center aligns the screen but this is not working well for 125% scaling. Can anybody suggest what can be done?
centerAlign | rect loc | rect := self initWidgetSize. loc := Point x: (CgDisplay default defaultScreen width - rect width) // 2 y: (CgDisplay default defaultScreen height - rect height) // 2. rect moveTo: loc. You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/6993fc43-5dbb-4786-80a0-8c6e5184a5f4n%40googlegroups.com. |
Try #centerWindow
On Friday, December 4, 2020 at 1:03:26 AM UTC-5 [hidden email] wrote: Our Legacy application which got recently migrated to VA Smalltalk 9.2.1 is having issue center aligning the screen when the scaling is 125%. Below is the code that center aligns the screen but this is not working well for 125% scaling. Can anybody suggest what can be done? You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/92dcd74b-7655-4c78-a24b-74c56778c6a2n%40googlegroups.com. |
Hi, As Wayne said, in 9.2.1 under development case "65660: Add support for centering a view on the screen", we added this capability. For example, you can do: <AbtAppBldrView subclass> new openWidget; centerWindow. or <AbtAppBldrView subclass> new openWidget centerWindow. Does that help? On Fri, Dec 4, 2020 at 12:24 PM Wayne Johnston <[hidden email]> wrote: Try #centerWindow Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: https://marianopeck.wordpress.com/You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibFX87zZ7f0vPfVx9cA_kD6nHgzcG4N4Mqn3meQTmjyK8w%40mail.gmail.com. |
Free forum by Nabble | Edit this page |