Center Alignment issue with 125% scaling.

49 views
Skip to first unread message

subham.t...@gmail.com

unread,
Dec 4, 2020, 1:03:26 AM12/4/20
to VA Smalltalk
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.

Wayne Johnston

unread,
Dec 4, 2020, 10:24:39 AM12/4/20
to VA Smalltalk
Try #centerWindow

Mariano Martinez Peck

unread,
Dec 8, 2020, 7:50:58 AM12/8/20
to VA Smalltalk
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?

--
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 va-smalltalk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/92dcd74b-7655-4c78-a24b-74c56778c6a2n%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
Reply all
Reply to author
Forward
0 new messages