Skip to content

Commit

Permalink
Fix button height jump while displaying progress indicator, Set stand…
Browse files Browse the repository at this point in the history
…ard height for circular progress indicator everywhere.
  • Loading branch information
codinesh committed Dec 30, 2023
1 parent 4a14e5a commit 2fbc254
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions packages/app_center/lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ const kShimmerBaseLight = Color.fromARGB(120, 228, 228, 228);
const kShimmerBaseDark = Color.fromARGB(255, 51, 51, 51);
const kShimmerHighLightLight = Color.fromARGB(200, 247, 247, 247);
const kShimmerHighLightDark = Color.fromARGB(255, 57, 57, 57);

const kCircularProgressIndicatorHeight = 16.0;
3 changes: 2 additions & 1 deletion packages/app_center/lib/src/deb/deb_page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:async';

import 'package:app_center/appstream.dart';
import 'package:app_center/constants.dart';
import 'package:app_center/l10n.dart';
import 'package:app_center/layout.dart';
import 'package:app_center/src/deb/deb_model.dart';
Expand Down Expand Up @@ -173,7 +174,7 @@ class _DebActionButtons extends ConsumerWidget {
.whenOrNull(data: (data) => data);
return Center(
child: SizedBox.square(
dimension: 16,
dimension: kCircularProgressIndicatorHeight,
child: YaruCircularProgressIndicator(
value: (transaction?.percentage ?? 0) / 100.0,
strokeWidth: 2,
Expand Down
7 changes: 4 additions & 3 deletions packages/app_center/lib/src/manage/manage_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';

import 'package:app_center/constants.dart';
import 'package:app_center/l10n.dart';
import 'package:app_center/layout.dart';
import 'package:app_center/snapd.dart';
Expand Down Expand Up @@ -225,7 +226,7 @@ class _ActionButtons extends ConsumerWidget {
loading: () => (
l10n.managePageCheckingForUpdates,
const SizedBox(
height: 24,
height: kCircularProgressIndicatorHeight,
child: YaruCircularProgressIndicator(
strokeWidth: 4,
),
Expand Down Expand Up @@ -274,7 +275,7 @@ class _ActionButtons extends ConsumerWidget {
return Row(
children: [
SizedBox.square(
dimension: 16,
dimension: kCircularProgressIndicatorHeight,
child: YaruCircularProgressIndicator(
value: change?.progress,
strokeWidth: 2,
Expand Down Expand Up @@ -488,7 +489,7 @@ class _ManageSnapTile extends ConsumerWidget {
return Row(
children: [
SizedBox.square(
dimension: 16,
dimension: kCircularProgressIndicatorHeight,
child: YaruCircularProgressIndicator(
value: change?.progress,
strokeWidth: 2,
Expand Down
3 changes: 2 additions & 1 deletion packages/app_center/lib/src/snapd/snap_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';

import 'package:app_center/constants.dart';
import 'package:app_center/l10n.dart';
import 'package:app_center/layout.dart';
import 'package:app_center/ratings.dart';
Expand Down Expand Up @@ -328,7 +329,7 @@ class _SnapActionButtons extends ConsumerWidget {
return Row(
children: [
SizedBox.square(
dimension: 16,
dimension: kCircularProgressIndicatorHeight,
child: YaruCircularProgressIndicator(
value: change?.progress,
strokeWidth: 2,
Expand Down

0 comments on commit 2fbc254

Please sign in to comment.