unifiy left labeled text input

This commit is contained in:
grummbeer 2023-02-15 13:43:38 +01:00
parent c2fa74dbbc
commit b4d4b4249e
2 changed files with 32 additions and 57 deletions

View File

@ -996,14 +996,11 @@ void _rdpDialog(String id) async {
Row( Row(
children: [ children: [
ConstrainedBox( ConstrainedBox(
constraints: const BoxConstraints(minWidth: 100), constraints: const BoxConstraints(minWidth: 140),
child: Text( child: Text(
"${translate('Port')}:", "${translate('Port')}:",
textAlign: TextAlign.start, textAlign: TextAlign.right,
).marginOnly(bottom: 16.0)), ).marginOnly(right: 10)),
const SizedBox(
width: 24.0,
),
Expanded( Expanded(
child: TextField( child: TextField(
inputFormatters: [ inputFormatters: [
@ -1017,21 +1014,15 @@ void _rdpDialog(String id) async {
), ),
), ),
], ],
), ).marginOnly(bottom: 8),
const SizedBox(
height: 8.0,
),
Row( Row(
children: [ children: [
ConstrainedBox( ConstrainedBox(
constraints: const BoxConstraints(minWidth: 100), constraints: const BoxConstraints(minWidth: 140),
child: Text( child: Text(
"${translate('Username')}:", "${translate('Username')}:",
textAlign: TextAlign.start, textAlign: TextAlign.right,
).marginOnly(bottom: 16.0)), ).marginOnly(right: 10)),
const SizedBox(
width: 24.0,
),
Expanded( Expanded(
child: TextField( child: TextField(
decoration: decoration:
@ -1040,19 +1031,15 @@ void _rdpDialog(String id) async {
), ),
), ),
], ],
), ).marginOnly(bottom: 8),
const SizedBox(
height: 8.0,
),
Row( Row(
children: [ children: [
ConstrainedBox( ConstrainedBox(
constraints: const BoxConstraints(minWidth: 100), constraints: const BoxConstraints(minWidth: 140),
child: Text("${translate('Password')}:") child: Text(
.marginOnly(bottom: 16.0)), "${translate('Password')}:",
const SizedBox( textAlign: TextAlign.right,
width: 24.0, ).marginOnly(right: 10)),
),
Expanded( Expanded(
child: Obx(() => TextField( child: Obx(() => TextField(
obscureText: secure.value, obscureText: secure.value,
@ -1067,7 +1054,7 @@ void _rdpDialog(String id) async {
)), )),
), ),
], ],
), ).marginOnly(bottom: 8),
], ],
), ),
), ),

View File

@ -1856,12 +1856,11 @@ void changeSocks5Proxy() async {
Row( Row(
children: [ children: [
ConstrainedBox( ConstrainedBox(
constraints: const BoxConstraints(minWidth: 100), constraints: const BoxConstraints(minWidth: 140),
child: Text('${translate("Hostname")}:') child: Text(
.marginOnly(bottom: 16.0)), '${translate("Hostname")}:',
const SizedBox( textAlign: TextAlign.right,
width: 24.0, ).marginOnly(right: 10)),
),
Expanded( Expanded(
child: TextField( child: TextField(
decoration: InputDecoration( decoration: InputDecoration(
@ -1872,19 +1871,15 @@ void changeSocks5Proxy() async {
), ),
), ),
], ],
), ).marginOnly(bottom: 8),
const SizedBox(
height: 8.0,
),
Row( Row(
children: [ children: [
ConstrainedBox( ConstrainedBox(
constraints: const BoxConstraints(minWidth: 100), constraints: const BoxConstraints(minWidth: 140),
child: Text('${translate("Username")}:') child: Text(
.marginOnly(bottom: 16.0)), '${translate("Username")}:',
const SizedBox( textAlign: TextAlign.right,
width: 24.0, ).marginOnly(right: 10)),
),
Expanded( Expanded(
child: TextField( child: TextField(
decoration: const InputDecoration( decoration: const InputDecoration(
@ -1894,19 +1889,15 @@ void changeSocks5Proxy() async {
), ),
), ),
], ],
), ).marginOnly(bottom: 8),
const SizedBox(
height: 8.0,
),
Row( Row(
children: [ children: [
ConstrainedBox( ConstrainedBox(
constraints: const BoxConstraints(minWidth: 100), constraints: const BoxConstraints(minWidth: 140),
child: Text('${translate("Password")}:') child: Text(
.marginOnly(bottom: 16.0)), '${translate("Password")}:',
const SizedBox( textAlign: TextAlign.right,
width: 24.0, ).marginOnly(right: 10)),
),
Expanded( Expanded(
child: Obx(() => TextField( child: Obx(() => TextField(
obscureText: obscure.value, obscureText: obscure.value,
@ -1921,10 +1912,7 @@ void changeSocks5Proxy() async {
)), )),
), ),
], ],
), ).marginOnly(bottom: 8),
const SizedBox(
height: 8.0,
),
Offstage( Offstage(
offstage: !isInProgress, child: const LinearProgressIndicator()) offstage: !isInProgress, child: const LinearProgressIndicator())
], ],