diff --git a/lib/components/Home/Sidebar.dart b/lib/components/Home/Sidebar.dart index 483ba397d..4ee0de2c6 100644 --- a/lib/components/Home/Sidebar.dart +++ b/lib/components/Home/Sidebar.dart @@ -139,10 +139,7 @@ class Sidebar extends HookConsumerWidget { const SizedBox( width: 10, ), - Text( - "Spotube", - style: PlatformTheme.of(context).textTheme?.headline, - ), + PlatformText.headline("Spotube"), PlatformIconButton( icon: const Icon(Icons.menu_rounded), onPressed: toggleExtended, diff --git a/lib/components/Player/Player.dart b/lib/components/Player/Player.dart index c76909ec8..616f787f3 100644 --- a/lib/components/Player/Player.dart +++ b/lib/components/Player/Player.dart @@ -78,7 +78,12 @@ class Player extends HookConsumerWidget { width: 1, ), ), - linux: null, + linux: Border( + top: BorderSide( + color: PlatformTheme.of(context).borderColor ?? Colors.transparent, + width: 1, + ), + ), windows: null, ), ); diff --git a/lib/components/Search/Search.dart b/lib/components/Search/Search.dart index 681a27e39..aad3dfc01 100644 --- a/lib/components/Search/Search.dart +++ b/lib/components/Search/Search.dart @@ -90,10 +90,7 @@ class Search extends HookConsumerWidget { onChanged: (value) { ref.read(searchTermStateProvider.notifier).state = value; }, - suffix: PlatformFilledButton( - onPressed: onSearch, - child: const Icon(Icons.search_rounded), - ), + prefixIcon: Icons.search_rounded, placeholder: "Search...", onSubmitted: (value) { onSearch(); diff --git a/lib/components/Shared/PlaybuttonCard.dart b/lib/components/Shared/PlaybuttonCard.dart index 3ecb8eb2f..33d3558d7 100644 --- a/lib/components/Shared/PlaybuttonCard.dart +++ b/lib/components/Shared/PlaybuttonCard.dart @@ -42,10 +42,8 @@ class PlaybuttonCard extends HookWidget { ios: null, macos: null, linux: BoxShadow( - blurRadius: 10, - offset: const Offset(0, 3), - spreadRadius: 5, - color: Theme.of(context).shadowColor, + blurRadius: 6, + color: Theme.of(context).shadowColor.withOpacity(0.3), ), windows: null, ), @@ -78,7 +76,10 @@ class PlaybuttonCard extends HookWidget { decoration: BoxDecoration( color: backgroundColor, borderRadius: BorderRadius.circular( - platform == TargetPlatform.windows ? 5 : 8, + [TargetPlatform.windows, TargetPlatform.linux] + .contains(platform) + ? 5 + : 8, ), boxShadow: [ if (boxShadow != null) boxShadow, @@ -104,7 +105,10 @@ class PlaybuttonCard extends HookWidget { ), child: ClipRRect( borderRadius: BorderRadius.circular( - platform == TargetPlatform.windows ? 5 : 8, + [TargetPlatform.windows, TargetPlatform.linux] + .contains(platform) + ? 5 + : 8, ), child: UniversalImage( path: imageUrl, @@ -126,6 +130,11 @@ class PlaybuttonCard extends HookWidget { ), child: PlatformIconButton( onPressed: onPlaybuttonPressed, + backgroundColor: + PlatformTheme.of(context).primaryColor, + hoverColor: PlatformTheme.of(context) + .primaryColor + ?.withOpacity(0.5), icon: isLoading ? const SizedBox( height: 23, @@ -137,7 +146,7 @@ class PlaybuttonCard extends HookWidget { isPlaying ? Icons.pause_rounded : Icons.play_arrow_rounded, - color: backgroundColor, + color: Colors.white, ), ), ); diff --git a/lib/components/Shared/TrackTile.dart b/lib/components/Shared/TrackTile.dart index dc29f82bd..d7984c678 100644 --- a/lib/components/Shared/TrackTile.dart +++ b/lib/components/Shared/TrackTile.dart @@ -214,16 +214,22 @@ class TrackTile extends HookConsumerWidget { ), ), ), - PlatformIconButton( - icon: Icon( - playback.track?.id != null && - playback.track?.id == track.value.id - ? Icons.pause_circle_rounded - : Icons.play_circle_rounded, - color: PlatformTheme.of(context).primaryColor, - ), - onPressed: () => onTrackPlayButtonPressed?.call( - track.value, + Padding( + padding: const EdgeInsets.all(8.0).copyWith(left: 0), + child: PlatformIconButton( + icon: Icon( + playback.track?.id != null && + playback.track?.id == track.value.id + ? Icons.pause_rounded + : Icons.play_arrow_rounded, + color: Colors.white, + ), + backgroundColor: PlatformTheme.of(context).primaryColor, + hoverColor: + PlatformTheme.of(context).primaryColor?.withOpacity(0.5), + onPressed: () => onTrackPlayButtonPressed?.call( + track.value, + ), ), ), Expanded( diff --git a/lib/main.dart b/lib/main.dart index e3ef5f70e..08fb65e58 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -227,6 +227,8 @@ class SpotubeState extends ConsumerState with WidgetsBindingObserver { accentMaterialColor: accentMaterialColor, backgroundMaterialColor: backgroundMaterialColor, ), + linuxTheme: linuxTheme, + linuxDarkTheme: linuxDarkTheme, iosTheme: themeMode == ThemeMode.dark ? iosDarkTheme : iosTheme, windowsTheme: windowsTheme, windowsDarkTheme: windowsDarkTheme, diff --git a/lib/themes/light-theme.dart b/lib/themes/light-theme.dart index 0b4ab77e0..8d19881e8 100644 --- a/lib/themes/light-theme.dart +++ b/lib/themes/light-theme.dart @@ -1,3 +1,4 @@ +import 'package:adwaita/adwaita.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:macos_ui/macos_ui.dart'; @@ -149,3 +150,16 @@ final macosDarkTheme = MacosThemeData.dark().copyWith( ); const iosTheme = CupertinoThemeData(brightness: Brightness.light); const iosDarkTheme = CupertinoThemeData(brightness: Brightness.dark); + +final linuxTheme = AdwaitaThemeData.light().copyWith( + listTileTheme: ListTileThemeData( + iconColor: Colors.grey[900], + horizontalTitleGap: 0, + ), +); +final linuxDarkTheme = AdwaitaThemeData.dark().copyWith( + listTileTheme: ListTileThemeData( + iconColor: Colors.grey[50], + horizontalTitleGap: 0, + ), +); diff --git a/pubspec.lock b/pubspec.lock index b9dfa5e2b..35514ea46 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -8,6 +8,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "47.0.0" + adwaita: + dependency: "direct main" + description: + name: adwaita + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.2" analyzer: dependency: transitive description: @@ -594,6 +601,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.42.0" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" flutter_test: dependency: "direct dev" description: flutter @@ -639,6 +653,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + gsettings: + dependency: transitive + description: + name: gsettings + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.5" hive: dependency: "direct main" description: @@ -737,6 +758,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.5.0" + libadwaita: + dependency: "direct main" + description: + name: libadwaita + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.5" + libadwaita_core: + dependency: transitive + description: + name: libadwaita_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.4" lints: dependency: transitive description: @@ -893,6 +928,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.2" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" path_provider: dependency: "direct main" description: @@ -1004,7 +1053,7 @@ packages: path: "../platform_ui" relative: true source: path - version: "0.0.1" + version: "0.1.0" plugin_platform_interface: dependency: transitive description: @@ -1026,6 +1075,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.2.6+3" + popover_gtk: + dependency: transitive + description: + name: popover_gtk + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6+3" process: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 98cb2795b..a5e549c1c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -66,6 +66,8 @@ dependencies: path: ../platform_ui fluent_ui: ^4.0.3 macos_ui: ^1.7.5 + libadwaita: ^1.2.5 + adwaita: ^0.5.2 dev_dependencies: flutter_test: