leanflutter / window_manager

This plugin allows Flutter desktop apps to resizing and repositioning the window.
https://pub.dev/packages/window_manager
MIT License
701 stars 193 forks source link

Transform.scale #419

Closed JuanLuisNL closed 4 months ago

JuanLuisNL commented 10 months ago

I have a windows application, I want to apply a "Transform.scale" to the whole application for accessibility (zoom) and to adapt to small monitors (reduce). It works fine in the whole app except for the first screen. Is it possible to do something?

runApp(Transform.scale(scale: 0.8, child: const MyApp()));

Captura

TomKrauss commented 4 months ago

How about the following solution? (Of course you need to apply the scale factor to the window size also):

FractionallySizedBox(
      heightFactor: 1 / scaleFactor
      widthFactor: 1 / scaleFactor,
      child: Transform.scale(
        scale: scaleFactor,
        child:  MyApp()
JuanLuisNL commented 4 months ago

Thank you very much. Now it is working fine! image