[fixed] solved issue Overlapping UI Elements on Windows #1424 (#1444)

This commit is contained in:
CHUNG-HAO
2024-06-28 01:05:20 +08:00
committed by GitHub
parent 3b531fc143
commit d585297327
2 changed files with 69 additions and 63 deletions
+57 -59
View File
@@ -28,71 +28,69 @@ class ReceiveTab extends StatelessWidget {
constraints: const BoxConstraints(maxWidth: ResponsiveListView.defaultMaxWidth),
child: Padding(
padding: const EdgeInsets.all(30),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(
child: Column(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Column(
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
InitialFadeTransition(
duration: const Duration(milliseconds: 300),
delay: const Duration(milliseconds: 200),
child: Consumer(builder: (context, ref) {
final animations = ref.watch(animationProvider);
final activeTab = ref.watch(homeTabProvider);
return RotatingWidget(
duration: const Duration(seconds: 15),
spinning: vm.serverState != null && animations && activeTab == HomeTab.receive,
child: const LocalSendLogo(withText: false),
);
}),
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
InitialFadeTransition(
duration: const Duration(milliseconds: 300),
delay: const Duration(milliseconds: 200),
child: Consumer(builder: (context, ref) {
final animations = ref.watch(animationProvider);
final activeTab = ref.watch(homeTabProvider);
return RotatingWidget(
duration: const Duration(seconds: 15),
spinning: vm.serverState != null && animations && activeTab == HomeTab.receive,
child: const LocalSendLogo(withText: false),
);
}),
),
FittedBox(
fit: BoxFit.scaleDown,
child: Text(vm.serverState?.alias ?? vm.aliasSettings, style: const TextStyle(fontSize: 48)),
),
InitialFadeTransition(
duration: const Duration(milliseconds: 300),
delay: const Duration(milliseconds: 500),
child: Text(
vm.serverState == null ? t.general.offline : vm.localIps.map((ip) => '#${ip.visualId}').toSet().join(' '),
style: const TextStyle(fontSize: 24),
textAlign: TextAlign.center,
),
FittedBox(
fit: BoxFit.scaleDown,
child: Text(vm.serverState?.alias ?? vm.aliasSettings, style: const TextStyle(fontSize: 48)),
),
InitialFadeTransition(
duration: const Duration(milliseconds: 300),
delay: const Duration(milliseconds: 500),
child: Text(
vm.serverState == null ? t.general.offline : vm.localIps.map((ip) => '#${ip.visualId}').toSet().join(' '),
style: const TextStyle(fontSize: 24),
textAlign: TextAlign.center,
),
),
],
),
),
],
),
],
),
),
Padding(
padding: const EdgeInsets.only(top: 10),
child: Center(
child: vm.quickSaveSettings
? ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.primary,
foregroundColor: Theme.of(context).colorScheme.onPrimary,
Padding(
padding: const EdgeInsets.only(top: 10),
child: Center(
child: vm.quickSaveSettings
? ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.primary,
foregroundColor: Theme.of(context).colorScheme.onPrimary,
),
onPressed: () async => vm.onSetQuickSave(context, false),
child: Text('${t.general.quickSave}: ${t.general.on}'),
)
: TextButton(
style: TextButton.styleFrom(
foregroundColor: Colors.grey,
),
onPressed: () async => vm.onSetQuickSave(context, true),
child: Text('${t.general.quickSave}: ${t.general.off}'),
),
onPressed: () async => vm.onSetQuickSave(context, false),
child: Text('${t.general.quickSave}: ${t.general.on}'),
)
: TextButton(
style: TextButton.styleFrom(
foregroundColor: Colors.grey,
),
onPressed: () async => vm.onSetQuickSave(context, true),
child: Text('${t.general.quickSave}: ${t.general.off}'),
),
),
),
),
const SizedBox(height: 15),
],
const SizedBox(height: 15),
],
),
),
),
),
@@ -182,4 +180,4 @@ class ReceiveTab extends StatelessWidget {
],
);
}
}
}
+12 -4
View File
@@ -84,10 +84,10 @@ packages:
dependency: transitive
description:
name: dart_mappable
sha256: c2d4775336d7166590766a1c4451edde2a302efe2a2a35ac09eef9025102e10f
sha256: "47269caf2060533c29b823ff7fa9706502355ffcb61e7f2a374e3a0fb2f2c3f0"
url: "https://pub.dev"
source: hosted
version: "4.0.1"
version: "4.2.2"
file:
dependency: transitive
description:
@@ -224,6 +224,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
refena:
dependency: transitive
description:
name: refena
sha256: "04ef88e22bee3f6735a9e11d81f41c8cf00bd264c396214945156b9858b07619"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
shelf:
dependency: transitive
description:
@@ -340,10 +348,10 @@ packages:
dependency: transitive
description:
name: type_plus
sha256: "2e33cfac2e129297d5874567bdf7587502ec359881e9318551e014d91b02f84a"
sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.1"
typed_data:
dependency: transitive
description: