Align DatePickerPopup and TimePickerPopup placement logic (#9410)

Updated the `width` and `height` properties of `DatePickerPopup` and `TimePickerPopup` components to use dynamic sizing based on `dialog` dimensions instead of fixed pixel values.

Previously, the lack of `width` and `height` in `TimePickerPopup` caused inconsistent placement when displayed at a specific location:
- `DatePickerPopup` was centered on the given (x, y)
- `TimePickerPopup` used its top-left corner as the anchor point

Now both components consistently render centered at the specified (x, y).

Fixes #9262
This commit is contained in:
Arkadiusz Żmudzin 2025-09-15 09:46:39 +02:00 committed by GitHub
parent 30e52ffa9a
commit d89f8cfe17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 30 additions and 10 deletions

View file

@ -17,8 +17,9 @@ export component DatePickerPopup inherits PopupWindow {
callback canceled();
callback accepted(date: Date);
width: 368px;
height: 524px;
width: dialog.width;
height: dialog.height;
close-policy: PopupClosePolicy.no-auto-close;
background-layer := MenuBorder {

View file

@ -18,6 +18,9 @@ export component TimePickerPopup inherits PopupWindow {
callback canceled();
callback accepted(/* current-time */ Time);
width: dialog.width;
height: dialog.height;
close-policy: PopupClosePolicy.no-auto-close;
background-layer := MenuBorder {