修复:大量的ScreenUtil误用,导致界面可能出现问题

(cherry picked from commit 2829da5267a14a9e0f43ff56060a68f1f8b2ca6a)
This commit is contained in:
2025-11-01 04:32:01 -07:00
committed by speakeloudest
parent 18ec3e36fc
commit b7a78aa76a
13 changed files with 79 additions and 79 deletions
@@ -67,7 +67,7 @@ class KRDeviceManagementView extends GetView<KRDeviceManagementController> {
size: 64.w,
color: Theme.of(context).textTheme.bodySmall?.color,
),
SizedBox(height: 16.w),
SizedBox(height: 16.h),
Text(
'暂无登录设备',
style: KrAppTextStyle(
@@ -172,7 +172,7 @@ class KRDeviceManagementView extends GetView<KRDeviceManagementController> {
Container(
padding: EdgeInsets.symmetric(
horizontal: 8.w,
vertical: 2.w,
vertical: 2.h,
),
decoration: BoxDecoration(
color: Colors.green.withOpacity(0.1),
@@ -189,7 +189,7 @@ class KRDeviceManagementView extends GetView<KRDeviceManagementController> {
],
],
),
SizedBox(height: 4.w),
SizedBox(height: 4.h),
Text(
'ID: ${identifier.substring(0, identifier.length > 12 ? 12 : identifier.length)}...',
style: KrAppTextStyle(
@@ -205,7 +205,7 @@ class KRDeviceManagementView extends GetView<KRDeviceManagementController> {
onPressed: () => controller.deleteDevice(id),
style: TextButton.styleFrom(
foregroundColor: Theme.of(context).colorScheme.error,
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 8.w),
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 8.h),
),
child: Text(
'删除',
@@ -219,9 +219,9 @@ class KRDeviceManagementView extends GetView<KRDeviceManagementController> {
),
// 分隔线
if (ip.isNotEmpty || lastLogin.isNotEmpty) ...[
SizedBox(height: 12.w),
SizedBox(height: 12.h),
Divider(height: 1, color: Theme.of(context).dividerColor),
SizedBox(height: 12.w),
SizedBox(height: 12.h),
],
// 详细信息
if (ip.isNotEmpty)
@@ -230,7 +230,7 @@ class KRDeviceManagementView extends GetView<KRDeviceManagementController> {
'IP地址',
ip,
),
if (ip.isNotEmpty && lastLogin.isNotEmpty) SizedBox(height: 8.w),
if (ip.isNotEmpty && lastLogin.isNotEmpty) SizedBox(height: 8.h),
if (lastLogin.isNotEmpty)
_buildInfoRow(
context,