Skip to content

Commit

Permalink
feat: new logo and compact search in playlist/album in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Jan 7, 2023
1 parent c343ccc commit dc96cb3
Show file tree
Hide file tree
Showing 35 changed files with 469 additions and 160 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#ffffff</color>
<color name="ic_launcher_background">#242832</color>
</resources>
Binary file modified assets/spotube-logo-foreground.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/spotube-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
420 changes: 349 additions & 71 deletions assets/spotube-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/spotube_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 9 additions & 4 deletions lib/components/root/sidebar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@ class Sidebar extends HookConsumerWidget {
}) : super(key: key);

static Widget brandLogo() {
return Image.asset(
"assets/spotube-logo.png",
height: 50,
width: 50,
return Container(
decoration: BoxDecoration(
color: Colors.black,
borderRadius: BorderRadius.circular(50),
),
child: Image.asset(
"assets/spotube-logo.png",
height: 50,
),
);
}

Expand Down
11 changes: 9 additions & 2 deletions lib/components/shared/compact_search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ class CompactSearch extends HookWidget {
final ValueChanged<String>? onChanged;
final String placeholder;
final IconData icon;
final Color? iconColor;

const CompactSearch({
Key? key,
this.onChanged,
this.placeholder = "Search...",
this.icon = Icons.search,
this.iconColor,
}) : super(key: key);

@override
Expand All @@ -24,22 +26,27 @@ class CompactSearch extends HookWidget {
backgroundColor: PlatformTheme.of(context).secondaryBackgroundColor!,
transitionDuration: const Duration(milliseconds: 100),
barrierColor: Colors.transparent,
arrowDxOffset: -6,
bodyBuilder: (context) {
return Padding(
return Container(
padding: const EdgeInsets.all(8.0),
width: 300,
child: PlatformTextField(
autofocus: true,
onChanged: onChanged,
placeholder: placeholder,
prefixIcon: icon,
padding: platform == TargetPlatform.android
? const EdgeInsets.all(0)
: null,
),
);
},
height: 60,
);
},
tooltip: placeholder,
icon: Icon(icon),
icon: Icon(icon, color: iconColor),
);
}
}
2 changes: 1 addition & 1 deletion lib/components/shared/page_window_title_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class _PageWindowTitleBarState extends State<PageWindowTitleBar> {
),
],
onDrag: () {
appWindow.startDragging();
if (kIsDesktop) appWindow.startDragging();
},
title: widget.center,
toolbarOpacity: widget.toolbarOpacity,
Expand Down
15 changes: 10 additions & 5 deletions lib/components/shared/track_table/track_collection_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:fuzzywuzzy/fuzzywuzzy.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:platform_ui/platform_ui.dart';
import 'package:spotube/components/shared/compact_search.dart';
import 'package:spotube/components/shared/shimmers/shimmer_track_tile.dart';
import 'package:spotube/components/shared/page_window_title_bar.dart';
import 'package:spotube/components/shared/image/universal_image.dart';
Expand Down Expand Up @@ -205,7 +206,15 @@ class TrackCollectionView<T> extends HookConsumerWidget {
controller: controller,
slivers: [
SliverAppBar(
actions: collapsed.value ? buttons : null,
actions: [
if (kIsMobile)
CompactSearch(
onChanged: (value) => searchText.value = value,
placeholder: "Search tracks...",
iconColor: color?.titleTextColor,
),
if (collapsed.value) ...buttons,
],
floating: false,
pinned: true,
expandedHeight: 400,
Expand Down Expand Up @@ -291,10 +300,6 @@ class TrackCollectionView<T> extends HookConsumerWidget {
mainAxisSize: MainAxisSize.min,
children: buttons,
),
if (kIsMobile) ...[
const SizedBox(height: 10),
searchbar,
]
],
)
],
Expand Down
12 changes: 7 additions & 5 deletions lib/pages/genre/genres.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ class GenrePage extends HookConsumerWidget {
),
);
return PlatformScaffold(
appBar: PageWindowTitleBar(
actions: [searchbar, const SizedBox(width: 10)],
),
appBar: kIsDesktop
? PageWindowTitleBar(
actions: [searchbar, const SizedBox(width: 10)],
)
: null,
backgroundColor: PlatformProperty.all(
PlatformTheme.of(context).scaffoldBackgroundColor!,
),
Expand All @@ -123,8 +125,8 @@ class GenrePage extends HookConsumerWidget {
children: [
Positioned.fill(child: list),
Positioned(
top: 10,
right: 20,
top: kIsMobile ? 30 : 10,
right: kIsMobile ? 5 : 20,
child: searchbar,
),
],
Expand Down
4 changes: 3 additions & 1 deletion lib/pages/player/player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ class PlayerView extends HookConsumerWidget {
hideWhenWindows: false,
backgroundColor: Colors.transparent,
foregroundColor: paletteColor.titleTextColor,
toolbarOpacity: 0,
toolbarOpacity:
PlatformProperty.only(android: 1.0, windows: 1.0, other: 0.0)
.resolve(platform ?? Theme.of(context).platform),
leading: PlatformBackButton(
color: PlatformProperty.only(
macos: Colors.black,
Expand Down
5 changes: 4 additions & 1 deletion lib/pages/settings/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ class AboutSpotube extends HookConsumerWidget {
Row(
mainAxisSize: MainAxisSize.min,
children: [
PlatformText.subheading(
const PlatformText(
"Founder: Kingkor Roy Tirtho",
style: TextStyle(
fontWeight: FontWeight.bold,
),
),
const SizedBox(width: 5),
CircleAvatar(
Expand Down
132 changes: 66 additions & 66 deletions macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
{
"images" : [
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "app_icon_16.png",
"scale" : "1x"
"info": {
"version": 1,
"author": "xcode"
},
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "app_icon_32.png",
"scale" : "2x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "app_icon_32.png",
"scale" : "1x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "app_icon_64.png",
"scale" : "2x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "app_icon_128.png",
"scale" : "1x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "app_icon_256.png",
"scale" : "2x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "app_icon_256.png",
"scale" : "1x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "app_icon_512.png",
"scale" : "2x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "app_icon_512.png",
"scale" : "1x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "app_icon_1024.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
"images": [
{
"size": "16x16",
"idiom": "mac",
"filename": "app_icon_16.png",
"scale": "1x"
},
{
"size": "16x16",
"idiom": "mac",
"filename": "app_icon_32.png",
"scale": "2x"
},
{
"size": "32x32",
"idiom": "mac",
"filename": "app_icon_32.png",
"scale": "1x"
},
{
"size": "32x32",
"idiom": "mac",
"filename": "app_icon_64.png",
"scale": "2x"
},
{
"size": "128x128",
"idiom": "mac",
"filename": "app_icon_128.png",
"scale": "1x"
},
{
"size": "128x128",
"idiom": "mac",
"filename": "app_icon_256.png",
"scale": "2x"
},
{
"size": "256x256",
"idiom": "mac",
"filename": "app_icon_256.png",
"scale": "1x"
},
{
"size": "256x256",
"idiom": "mac",
"filename": "app_icon_512.png",
"scale": "2x"
},
{
"size": "512x512",
"idiom": "mac",
"filename": "app_icon_512.png",
"scale": "1x"
},
{
"size": "512x512",
"idiom": "mac",
"filename": "app_icon_1024.png",
"scale": "2x"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,11 @@ flutter_icons:
android: true
image_path: "assets/spotube-logo.png"
adaptive_icon_foreground: "assets/spotube-logo-foreground.jpg"
adaptive_icon_background: "#ffffff"
adaptive_icon_background: "#242832"
windows:
generate: true
image_path: "assets/spotube-logo.png"
icon_size: 48 # min:48, max:256, default: 48
macos:
generate: true
image_path: "assets/spotube-logo.png"
2 changes: 1 addition & 1 deletion scripts/windows-setup-creator.iss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=..\build\installer
OutputBaseFilename=Spotube-windows-x86_64-setup
SetupIconFile=..\windows\runner\resources\icon.ico
SetupIconFile=..\windows\runner\resources\app_icon.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
Expand Down
2 changes: 1 addition & 1 deletion windows/runner/Runner.rc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ END

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_APP_ICON ICON "resources\\icon.ico"
IDI_APP_ICON ICON "resources\\app_icon.ico"


/////////////////////////////////////////////////////////////////////////////
Expand Down
Binary file added windows/runner/resources/app_icon.ico
Binary file not shown.
Binary file removed windows/runner/resources/icon.ico
Binary file not shown.

0 comments on commit dc96cb3

Please sign in to comment.