Skip to content

Commit 059b255

Browse files
Fix a few font issues
Fix a few issues where fonts were not displayed properly and made improvements to rust with help of cargo clippy
1 parent c2b9d68 commit 059b255

File tree

13 files changed

+923
-974
lines changed

13 files changed

+923
-974
lines changed

lib/screens/playlist_reorder_screen.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import 'package:adiman/main.dart';
44
import 'package:flutter_glow/flutter_glow.dart';
55
import 'package:adiman/widgets/snackbar.dart';
66
import 'package:flutter/services.dart';
7+
import 'package:google_fonts/google_fonts.dart';
78
import 'package:adiman/widgets/icon_buttons.dart';
89
import 'package:adiman/services/playlist_order_service.dart';
910
import 'package:adiman/icons/broken_icons.dart';
@@ -144,7 +145,7 @@ class _PlaylistReorderScreenState extends State<PlaylistReorderScreen> {
144145
title: GlowText(
145146
song.title,
146147
glowColor: _dominantColor.withAlpha(40),
147-
style: TextStyle(
148+
style: GoogleFonts.inter(
148149
color: Colors.white,
149150
fontSize: 16,
150151
fontWeight: FontWeight.w600,
@@ -154,7 +155,7 @@ class _PlaylistReorderScreenState extends State<PlaylistReorderScreen> {
154155
),
155156
subtitle: Text(
156157
song.artist,
157-
style: TextStyle(
158+
style: GoogleFonts.inter(
158159
color: Colors.white70,
159160
fontSize: 14,
160161
),
@@ -205,7 +206,7 @@ class _PlaylistReorderScreenState extends State<PlaylistReorderScreen> {
205206
title: GlowText(
206207
'Reorder ${widget.playlistName}',
207208
glowColor: _dominantColor.withAlpha(60),
208-
style: TextStyle(
209+
style: GoogleFonts.inter(
209210
fontSize: 24,
210211
color: Colors.white,
211212
fontWeight: FontWeight.w700,
@@ -249,7 +250,7 @@ class _PlaylistReorderScreenState extends State<PlaylistReorderScreen> {
249250
GlowText(
250251
'No songs in playlist',
251252
glowColor: _dominantColor.withAlpha(60),
252-
style: TextStyle(
253+
style: GoogleFonts.inter(
253254
color: Colors.white70,
254255
fontSize: 18,
255256
),

lib/screens/song_selection_screen.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import 'download_screen.dart';
2121
import 'package:flutter_glow/flutter_glow.dart';
2222
import 'package:path_provider/path_provider.dart';
2323
import 'package:flutter/services.dart';
24+
import 'package:google_fonts/google_fonts.dart';
2425
import 'package:adiman/icons/broken_icons.dart';
2526
import 'package:adiman/services/plugin_service.dart';
2627
import 'plugins_screen.dart';
@@ -2432,19 +2433,19 @@ class _SongSelectionScreenState extends State<SongSelectionScreen>
24322433
backgroundColor: dominantColor.withAlpha(30),
24332434
title: Text(
24342435
multipleItems ? 'Delete Songs?' : 'Delete Song?',
2435-
style: TextStyle(color: Colors.white),
2436+
style: GoogleFonts.inter(color: Colors.white),
24362437
),
24372438
content: Text(
24382439
multipleItems
24392440
? 'This will permanently delete ${_selectedSongs.length} songs from your device.'
24402441
: 'This will permanently delete "${song.title}" from your device.',
2441-
style: TextStyle(color: Colors.white70),
2442+
style: GoogleFonts.inter(color: Colors.white70),
24422443
),
24432444
actions: [
24442445
TextButton(
24452446
child: Text(
24462447
'Cancel',
2447-
style: TextStyle(color: Colors.white70),
2448+
style: GoogleFonts.inter(color: Colors.white70),
24482449
),
24492450
onPressed: () {
24502451
ScaffoldMessenger.of(context).hideCurrentSnackBar();
@@ -2454,7 +2455,7 @@ class _SongSelectionScreenState extends State<SongSelectionScreen>
24542455
TextButton(
24552456
child: Text(
24562457
'Delete',
2457-
style: TextStyle(color: Colors.redAccent),
2458+
style: GoogleFonts.inter(color: Colors.redAccent),
24582459
),
24592460
onPressed: () {
24602461
ScaffoldMessenger.of(context).hideCurrentSnackBar();
@@ -3491,6 +3492,7 @@ class _SongSelectionScreenState extends State<SongSelectionScreen>
34913492
],
34923493
),
34933494
PopupMenuButton<SortOption>(
3495+
tooltip: '',
34943496
icon: Icon(Broken.sort, color: textColor),
34953497
color: Colors.black.withValues(alpha: 0.9),
34963498
shape: RoundedRectangleBorder(

lib/src/rust/api/plugin_man.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ part 'plugin_man.freezed.dart';
1212
// These functions are ignored because they are not marked as `pub`: `plugin_file_validity`, `read_plugin_metadata`, `rpc2plugin`, `valid_extension`, `valid_magic`, `valid_stem`, `validate_and_filter_fad_config`, `validate_rpc`
1313
// These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `PluginManErr`
1414
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`
15-
// These functions are ignored (category: IgnoreBecauseOwnerTyShouldIgnore): `call_func_plugins`, `call_plugin_func`, `find_buttons_by_name`, `find_items_by_callback`, `get_all_buttons`, `get_all_popups`, `get_all_screens`, `get_plugin_config`, `get_plugin_fad_config`, `get_plugin_meta`, `load_plugin`, `new`, `reload_plugin`, `remove_plugin`, `scan_dir`, `set_plugin_config`
15+
// These functions are ignored (category: IgnoreBecauseOwnerTyShouldIgnore): `call_func_plugins`, `call_plugin_func`, `default`, `find_buttons_by_name`, `find_items_by_callback`, `get_all_buttons`, `get_all_popups`, `get_all_screens`, `get_plugin_config`, `get_plugin_fad_config`, `get_plugin_meta`, `load_plugin`, `new`, `reload_plugin`, `remove_plugin`, `scan_dir`, `set_plugin_config`
1616

1717
Future<void> initPluginMan() =>
1818
RustLib.instance.api.crateApiPluginManInitPluginMan();

lib/src/rust/api/value_store.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ abstract class ValueStoreUpdater implements RustOpaqueInterface {
4949

5050
Future<void> clearCurrentSong();
5151

52+
static Future<ValueStoreUpdater> default_() =>
53+
RustLib.instance.api.crateApiValueStoreValueStoreUpdaterDefault();
54+
5255
// HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class.
5356
static Future<ValueStoreUpdater> newInstance() =>
5457
RustLib.instance.api.crateApiValueStoreValueStoreUpdaterNew();

0 commit comments

Comments
 (0)