fix mobile UI overflowed

This commit is contained in:
csf 2022-08-01 12:44:13 +08:00
parent 2b07c97c08
commit 2d90946a4d
2 changed files with 27 additions and 21 deletions

View File

@ -659,7 +659,7 @@ class _RemotePageState extends State<RemotePage> {
more.add(PopupMenuItem<String>( more.add(PopupMenuItem<String>(
child: Row( child: Row(
children: ([ children: ([
Container(width: 100.0, child: Text(translate('OS Password'))), Text(translate('OS Password')),
TextButton( TextButton(
style: flatButtonStyle, style: flatButtonStyle,
onPressed: () { onPressed: () {

View File

@ -200,7 +200,8 @@ class ServerInfo extends StatelessWidget {
Icon(Icons.warning_amber_sharp, Icon(Icons.warning_amber_sharp,
color: Colors.redAccent, size: 24), color: Colors.redAccent, size: 24),
SizedBox(width: 10), SizedBox(width: 10),
Text( Expanded(
child: Text(
translate("Service is not running"), translate("Service is not running"),
style: TextStyle( style: TextStyle(
fontFamily: 'WorkSans', fontFamily: 'WorkSans',
@ -208,7 +209,7 @@ class ServerInfo extends StatelessWidget {
fontSize: 18, fontSize: 18,
color: MyTheme.accent80, color: MyTheme.accent80,
), ),
) ))
], ],
)), )),
SizedBox(height: 5), SizedBox(height: 5),
@ -316,30 +317,35 @@ class PermissionRow extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Row( return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Expanded(
children: [ flex: 5,
SizedBox( child: FittedBox(
width: 140, fit: BoxFit.scaleDown,
alignment: Alignment.centerLeft,
child: Text(name, child: Text(name,
style: TextStyle(fontSize: 16.0, color: MyTheme.accent50))), style:
SizedBox( TextStyle(fontSize: 16.0, color: MyTheme.accent50)))),
width: 50, Expanded(
flex: 2,
child: FittedBox(
fit: BoxFit.scaleDown,
child: Text(isOk ? translate("ON") : translate("OFF"), child: Text(isOk ? translate("ON") : translate("OFF"),
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
color: isOk ? Colors.green : Colors.grey)), color: isOk ? Colors.green : Colors.grey))),
)
],
), ),
TextButton( Expanded(
flex: 3,
child: FittedBox(
fit: BoxFit.scaleDown,
alignment: Alignment.centerRight,
child: TextButton(
onPressed: onPressed, onPressed: onPressed,
child: Text( child: Text(
translate(isOk ? "CLOSE" : "OPEN"), translate(isOk ? "CLOSE" : "OPEN"),
style: TextStyle(fontWeight: FontWeight.bold), style: TextStyle(fontWeight: FontWeight.bold),
)), )))),
const Divider(height: 0)
], ],
); );
} }