fix(devices details page): style fixes

This commit is contained in:
2026-03-03 16:41:43 +01:00
parent 76c0fbe237
commit 08405c879b
2 changed files with 23 additions and 27 deletions

View File

@ -52,8 +52,6 @@ class _GearRatioEditorCardState extends State<GearRatioEditorCard> {
double get _inlineAddEdgeOffset => _inlineAddRadius + 2;
double get _editorTilesTopInset => _inlineAddEdgeOffset + _inlineAddRadius;
bool _isExpanded = false;
bool _isEditing = false;
bool _sortAscending = true;
@ -196,7 +194,7 @@ class _GearRatioEditorCardState extends State<GearRatioEditorCard> {
child: AnimatedContainer(
duration: _animDuration,
curve: _animCurve,
height: _isExpanded ? 210 : 130,
height: _isExpanded ? 240 : 130,
child: _GearRatioGraph(
ratios: _isEditing ? _draft : _committed,
compact: !_isExpanded,
@ -265,8 +263,8 @@ class _GearRatioEditorCardState extends State<GearRatioEditorCard> {
if (_draft.isEmpty)
const Padding(
padding: EdgeInsets.fromLTRB(14, 0, 14, 10),
child:
Text('No ratios yet. Load a preset to start editing.'),
child: Text(
'No ratios yet. Add a gear or load a preset to start editing.'),
),
Padding(
padding: const EdgeInsets.fromLTRB(14, 0, 14, 8),
@ -307,21 +305,16 @@ class _GearRatioEditorCardState extends State<GearRatioEditorCard> {
),
),
Padding(
padding: const EdgeInsets.fromLTRB(10, 0, 10, 12),
padding: const EdgeInsets.fromLTRB(10, 0, 10, 0),
child: AnimatedSwitcher(
duration: _animDuration,
switchInCurve: _animCurve,
switchOutCurve: Curves.easeInCubic,
transitionBuilder: _snappyTransition,
child: Padding(
padding: EdgeInsets.only(
top: _editorTilesTopInset,
),
child: Column(
key: ValueKey('editors-$_gearLayoutVersion'),
crossAxisAlignment: CrossAxisAlignment.stretch,
children: _buildEditableGearTiles(context),
),
child: Column(
key: ValueKey('editors-$_gearLayoutVersion'),
crossAxisAlignment: CrossAxisAlignment.stretch,
children: _buildEditableGearTiles(context),
),
),
),
@ -1071,9 +1064,12 @@ class _GearRatioGraph extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
if (!compact)
Text(
'Input RPM -> Output RPM',
style: textTheme.bodySmall,
Container(
padding: const EdgeInsets.only(bottom: 6),
child: Text(
'Input RPM -> Output RPM',
style: textTheme.bodySmall,
),
),
Expanded(
child: CustomPaint(