feat: Adjust scaling logic for web frame dimensions to improve layout responsiveness
This commit is contained in:
@@ -109,8 +109,8 @@ class _WebFrameContentState extends State<_WebFrameContent> {
|
|||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (BuildContext context, BoxConstraints constraints) {
|
builder: (BuildContext context, BoxConstraints constraints) {
|
||||||
// Scale down if screen is too small
|
// Scale down if screen is too small
|
||||||
final double scaleX = constraints.maxWidth / (frameWidth + 80);
|
final double scaleX = constraints.maxWidth / (frameWidth - 150);
|
||||||
final double scaleY = constraints.maxHeight / (frameHeight + 80);
|
final double scaleY = constraints.maxHeight / (frameHeight - 220);
|
||||||
final double scale = (scaleX < 1 || scaleY < 1)
|
final double scale = (scaleX < 1 || scaleY < 1)
|
||||||
? (scaleX < scaleY ? scaleX : scaleY)
|
? (scaleX < scaleY ? scaleX : scaleY)
|
||||||
: 1.0;
|
: 1.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user