Change icons

This commit is contained in:
problematicconsumer
2024-02-15 15:23:02 +03:30
parent 97a308a351
commit 7e3442a310
25 changed files with 146 additions and 111 deletions

View File

@@ -1,3 +1,4 @@
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
@@ -12,7 +13,7 @@ Future<bool> showConfirmationDialog(
builder: (context) {
final localizations = MaterialLocalizations.of(context);
return AlertDialog(
icon: const Icon(Icons.delete_forever),
icon: const Icon(FluentIcons.delete_24_regular),
title: Text(title),
content: Text(message),
actions: [

View File

@@ -1,3 +1,4 @@
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
import 'package:flutter/material.dart';
import 'package:hiddify/core/analytics/analytics_controller.dart';
import 'package:hiddify/core/localization/locale_extensions.dart';
@@ -19,7 +20,7 @@ class LocalePrefTile extends HookConsumerWidget {
return ListTile(
title: Text(t.settings.general.locale),
subtitle: Text(locale.localeName),
leading: const Icon(Icons.language),
leading: const Icon(FluentIcons.local_language_24_regular),
onTap: () async {
final selectedLocale = await showDialog<AppLocale>(
context: context,
@@ -61,7 +62,7 @@ class RegionPrefTile extends HookConsumerWidget {
return ListTile(
title: Text(t.settings.general.region),
subtitle: Text(region.present(t)),
leading: const Icon(Icons.my_location),
leading: const Icon(FluentIcons.globe_location_24_regular),
onTap: () async {
final selectedRegion = await showDialog<Region>(
context: context,
@@ -111,7 +112,7 @@ class EnableAnalyticsPrefTile extends HookConsumerWidget {
t.settings.general.enableAnalyticsMsg,
style: Theme.of(context).textTheme.bodySmall,
),
secondary: const Icon(Icons.bug_report),
secondary: const Icon(FluentIcons.bug_24_regular),
value: enabled,
onChanged: (value) async {
if (onChanged != null) {

View File

@@ -1,4 +1,5 @@
import 'package:dartx/dartx.dart';
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hiddify/core/localization/translations.dart';
@@ -46,9 +47,15 @@ class QRCodeScannerScreen extends HookConsumerWidget with PresLogger {
builder: (context, state, child) {
switch (state) {
case TorchState.off:
return const Icon(Icons.flash_off, color: Colors.grey);
return const Icon(
FluentIcons.flash_off_24_regular,
color: Colors.grey,
);
case TorchState.on:
return const Icon(Icons.flash_on, color: Colors.yellow);
return const Icon(
FluentIcons.flash_24_regular,
color: Colors.yellow,
);
}
},
),
@@ -56,17 +63,7 @@ class QRCodeScannerScreen extends HookConsumerWidget with PresLogger {
onPressed: () => controller.toggleTorch(),
),
IconButton(
icon: ValueListenableBuilder(
valueListenable: controller.cameraFacingState,
builder: (context, state, child) {
switch (state) {
case CameraFacing.front:
return const Icon(Icons.camera_front);
case CameraFacing.back:
return const Icon(Icons.camera_rear);
}
},
),
icon: const Icon(FluentIcons.camera_switch_24_regular),
tooltip: t.profile.add.qrScanner.facingSemanticLabel,
onPressed: () => controller.switchCamera(),
),
@@ -103,7 +100,10 @@ class QRCodeScannerScreen extends HookConsumerWidget with PresLogger {
children: [
const Padding(
padding: EdgeInsets.only(bottom: 8),
child: Icon(Icons.error, color: Colors.white),
child: Icon(
FluentIcons.error_circle_24_regular,
color: Colors.white,
),
),
Text(message),
Text(error.errorDetails?.message ?? ''),