학생 목록 타일 글자 확대 + 계정 추가/엑셀 칸을 학생 타일 크기로 통일
학생 타일의 이름/상태/학년칩 폰트와 아이콘 크기를 키워 가독성을 높이고, 계정 추가/엑셀 등록 정사각형 칸의 크기를 학생 목록 타일과 동일한 크기(tileSize)로 통일했다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -558,47 +558,46 @@ class _TeacherStudentManagementPageState
|
|||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
CircleAvatar(
|
CircleAvatar(
|
||||||
radius: 14,
|
radius: 20,
|
||||||
backgroundColor: needsReset ? Colors.red[50] : Colors.blue[50],
|
backgroundColor: needsReset ? Colors.red[50] : Colors.blue[50],
|
||||||
child: Icon(
|
child: Icon(
|
||||||
needsReset ? Icons.lock_reset : Icons.person,
|
needsReset ? Icons.lock_reset : Icons.person,
|
||||||
size: 14,
|
size: 20,
|
||||||
color: needsReset ? Colors.red : Colors.blue,
|
color: needsReset ? Colors.red : Colors.blue,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 6),
|
||||||
Text(
|
Text(
|
||||||
'$studentName ($studentId)',
|
'$studentName ($studentId)',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 10),
|
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 1),
|
const SizedBox(height: 2),
|
||||||
Text(
|
Text(
|
||||||
needsReset ? '초기화 대기중' : '정상 등록',
|
needsReset ? '초기화 대기중' : '정상 등록',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 8,
|
fontSize: 12,
|
||||||
color: needsReset ? Colors.red : Colors.grey,
|
color: needsReset ? Colors.red : Colors.grey,
|
||||||
fontWeight: needsReset ? FontWeight.bold : FontWeight.normal,
|
fontWeight: needsReset ? FontWeight.bold : FontWeight.normal,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 6),
|
||||||
Wrap(
|
Wrap(
|
||||||
alignment: WrapAlignment.center,
|
alignment: WrapAlignment.center,
|
||||||
spacing: 0,
|
spacing: 2,
|
||||||
runSpacing: 0,
|
runSpacing: 2,
|
||||||
children: [
|
children: [
|
||||||
Builder(
|
Builder(
|
||||||
builder: (chipContext) => ActionChip(
|
builder: (chipContext) => ActionChip(
|
||||||
visualDensity: VisualDensity.compact,
|
visualDensity: VisualDensity.compact,
|
||||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
padding: EdgeInsets.zero,
|
labelPadding: const EdgeInsets.symmetric(horizontal: 6),
|
||||||
labelPadding: const EdgeInsets.symmetric(horizontal: 4),
|
|
||||||
label: Text(
|
label: Text(
|
||||||
grade != null ? '$grade학년' : '미배정',
|
grade != null ? '$grade학년' : '미배정',
|
||||||
style: const TextStyle(fontSize: 8),
|
style: const TextStyle(fontSize: 12),
|
||||||
),
|
),
|
||||||
onPressed: () => _showGradeMenu(
|
onPressed: () => _showGradeMenu(
|
||||||
chipContext,
|
chipContext,
|
||||||
@@ -612,22 +611,22 @@ class _TeacherStudentManagementPageState
|
|||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
Icons.lock_reset,
|
Icons.lock_reset,
|
||||||
color: Colors.purple,
|
color: Colors.purple,
|
||||||
size: 14,
|
size: 20,
|
||||||
),
|
),
|
||||||
tooltip: '기기 리셋',
|
tooltip: '기기 리셋',
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
constraints: const BoxConstraints(minWidth: 22, minHeight: 22),
|
constraints: const BoxConstraints(minWidth: 30, minHeight: 30),
|
||||||
onPressed: () => _confirmResetDevice(studentId, studentName),
|
onPressed: () => _confirmResetDevice(studentId, studentName),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
Icons.delete_forever_rounded,
|
Icons.delete_forever_rounded,
|
||||||
color: Colors.redAccent,
|
color: Colors.redAccent,
|
||||||
size: 14,
|
size: 20,
|
||||||
),
|
),
|
||||||
tooltip: '계정 영구 삭제',
|
tooltip: '계정 영구 삭제',
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
constraints: const BoxConstraints(minWidth: 22, minHeight: 22),
|
constraints: const BoxConstraints(minWidth: 30, minHeight: 30),
|
||||||
onPressed: () => _confirmDeleteStudent(studentId, studentName),
|
onPressed: () => _confirmDeleteStudent(studentId, studentName),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -657,12 +656,14 @@ class _TeacherStudentManagementPageState
|
|||||||
padding: const EdgeInsets.all(24.0),
|
padding: const EdgeInsets.all(24.0),
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
// 🖥️ 웹(넓은 화면)은 계정 추가/엑셀 등록을 작은 정사각형 2칸으로 나란히, 폰은 기존처럼 세로로 쌓는다.
|
// 🖥️ 웹(넓은 화면)은 계정 추가/엑셀 등록을 정사각형 2칸으로 나란히, 폰은 기존처럼 세로로 쌓는다.
|
||||||
final bool isWide = constraints.maxWidth >= 800;
|
final bool isWide = constraints.maxWidth >= 800;
|
||||||
// 📉 계정 추가 / 엑셀 등록 칸: 기존 정사각형 크기의 25%로 축소.
|
|
||||||
final double formSquareSize =
|
|
||||||
((constraints.maxWidth - 20) / 2) * 0.25;
|
|
||||||
final double listWidth = constraints.maxWidth;
|
final double listWidth = constraints.maxWidth;
|
||||||
|
// 📐 학생 목록 타일과 동일한 크기를 계정 추가/엑셀 등록 칸에도 사용한다.
|
||||||
|
final double tileSize =
|
||||||
|
((listWidth - (isWide ? 7 : 3) * 10) / (isWide ? 8 : 4)) *
|
||||||
|
1.5;
|
||||||
|
final double formSquareSize = tileSize;
|
||||||
|
|
||||||
final Widget addBoxColumn = Column(
|
final Widget addBoxColumn = Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -760,14 +761,9 @@ class _TeacherStudentManagementPageState
|
|||||||
: GridView.builder(
|
: GridView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
// 📈 학생 타일: 기존(8/4열 기준) 한 칸 폭보다 50% 더 큰 정사각형으로.
|
|
||||||
gridDelegate:
|
gridDelegate:
|
||||||
SliverGridDelegateWithMaxCrossAxisExtent(
|
SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
maxCrossAxisExtent:
|
maxCrossAxisExtent: tileSize,
|
||||||
((listWidth -
|
|
||||||
(isWide ? 7 : 3) * 10) /
|
|
||||||
(isWide ? 8 : 4)) *
|
|
||||||
1.5,
|
|
||||||
crossAxisSpacing: 10,
|
crossAxisSpacing: 10,
|
||||||
mainAxisSpacing: 10,
|
mainAxisSpacing: 10,
|
||||||
childAspectRatio: 1,
|
childAspectRatio: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user