feat: Adjust scaling logic for web frame dimensions to improve layout responsiveness

This commit is contained in:
Achintha Isuru
2026-02-01 15:54:23 -05:00
parent 40c43b06cc
commit f339b70f30

View File

@@ -109,8 +109,8 @@ class _WebFrameContentState extends State<_WebFrameContent> {
child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
// Scale down if screen is too small
final double scaleX = constraints.maxWidth / (frameWidth + 80);
final double scaleY = constraints.maxHeight / (frameHeight + 80);
final double scaleX = constraints.maxWidth / (frameWidth - 150);
final double scaleY = constraints.maxHeight / (frameHeight - 220);
final double scale = (scaleX < 1 || scaleY < 1)
? (scaleX < scaleY ? scaleX : scaleY)
: 1.0;