make theming prettier and darker
This commit is contained in:
parent
02e73eed1b
commit
a7756da713
@ -29,6 +29,8 @@ class App extends StatelessWidget {
|
|||||||
return const MaterialApp(home: LoginScreen());
|
return const MaterialApp(home: LoginScreen());
|
||||||
} else {
|
} else {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
|
theme: ThemeData(
|
||||||
|
appBarTheme: AppBarTheme(backgroundColor: Color(0xff0d0d0d))),
|
||||||
scrollBehavior: AppScrollBehavior(),
|
scrollBehavior: AppScrollBehavior(),
|
||||||
home: DrawerPage(
|
home: DrawerPage(
|
||||||
title: 'OpenMediaCenter',
|
title: 'OpenMediaCenter',
|
||||||
|
@ -7,52 +7,32 @@ class MyDrawer extends StatelessWidget {
|
|||||||
const MyDrawer({Key? key}) : super(key: key);
|
const MyDrawer({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) => Drawer(
|
||||||
|
backgroundColor: Color(0xff3f3f3f),
|
||||||
|
child: ListView(children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 75,
|
||||||
|
),
|
||||||
|
_listelement('Home', Icons.home, Section.HOME, context),
|
||||||
|
_listelement('Shuffle', Icons.update, Section.SHUFFLE, context),
|
||||||
|
_listelement(
|
||||||
|
'Categories', Icons.category, Section.CATEGORIE, context),
|
||||||
|
_listelement('Actors', Icons.people, Section.ACTOR, context),
|
||||||
|
_listelement('Settings', Icons.settings, Section.SETTING, context),
|
||||||
|
]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _listelement(
|
||||||
|
String text, IconData icon, Section section, BuildContext context) {
|
||||||
final ctx = DrawerContext.of(context);
|
final ctx = DrawerContext.of(context);
|
||||||
|
|
||||||
return Drawer(
|
return ListTile(
|
||||||
child: ListView(children: [
|
title: Text(text, style: TextStyle(color: Color(0xffe9e9e9))),
|
||||||
ListTile(
|
leading: Icon(icon, color: Color(0xffe9e9e9)),
|
||||||
title: const Text('Home'),
|
onTap: () {
|
||||||
leading: const Icon(Icons.home),
|
ctx.onChangePage(section);
|
||||||
onTap: () {
|
Navigator.pop(context);
|
||||||
ctx.onChangePage(Section.HOME);
|
},
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
title: const Text('Shuffle'),
|
|
||||||
leading: const Icon(Icons.update),
|
|
||||||
onTap: () {
|
|
||||||
ctx.onChangePage(Section.SHUFFLE);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
title: const Text('Categories'),
|
|
||||||
leading: const Icon(Icons.category),
|
|
||||||
onTap: () {
|
|
||||||
ctx.onChangePage(Section.CATEGORIE);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
title: const Text('Actors'),
|
|
||||||
leading: const Icon(Icons.people),
|
|
||||||
onTap: () {
|
|
||||||
ctx.onChangePage(Section.ACTOR);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
title: const Text('Settings'),
|
|
||||||
leading: const Icon(Icons.settings),
|
|
||||||
onTap: () {
|
|
||||||
ctx.onChangePage(Section.SETTING);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
]),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ class _PreviewGridState extends State<PreviewGrid> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text("Error"),
|
Text("Error" + snapshot.error.toString()),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => loadData(), child: Text("Reload page"))
|
onPressed: () => loadData(), child: Text("Reload page"))
|
||||||
],
|
],
|
||||||
@ -83,29 +83,32 @@ class _PreviewGridState extends State<PreviewGrid> {
|
|||||||
if (widget.headerBuilder != null) widget.headerBuilder!(this),
|
if (widget.headerBuilder != null) widget.headerBuilder!(this),
|
||||||
data.length > 0
|
data.length > 0
|
||||||
? Expanded(
|
? Expanded(
|
||||||
child: MasonryGridView.count(
|
child: Container(
|
||||||
// every tile should be at max 330 pixels long...
|
color: Color(0xff999999),
|
||||||
crossAxisCount: isTV() ? width ~/ 200 : width ~/ 275,
|
child: MasonryGridView.count(
|
||||||
// crossAxisCount: isTV() ? width ~/ 200 : width ~/ 330,
|
// every tile should be at max 330 pixels long...
|
||||||
itemCount: data.length,
|
crossAxisCount: isTV() ? width ~/ 200 : width ~/ 275,
|
||||||
mainAxisSpacing: 4,
|
// crossAxisCount: isTV() ? width ~/ 200 : width ~/ 330,
|
||||||
crossAxisSpacing: 4,
|
itemCount: data.length,
|
||||||
padding: EdgeInsets.all(5),
|
mainAxisSpacing: 4,
|
||||||
itemBuilder: (context, index) {
|
crossAxisSpacing: 4,
|
||||||
return PreviewTile(
|
padding: EdgeInsets.all(5),
|
||||||
dta: data[index],
|
itemBuilder: (context, index) {
|
||||||
onLongPress: (img) {
|
return PreviewTile(
|
||||||
setState(() {
|
dta: data[index],
|
||||||
_previewImage = img;
|
onLongPress: (img) {
|
||||||
});
|
setState(() {
|
||||||
},
|
_previewImage = img;
|
||||||
onLongPressEnd: () {
|
});
|
||||||
setState(() {
|
},
|
||||||
_previewImage = null;
|
onLongPressEnd: () {
|
||||||
});
|
setState(() {
|
||||||
},
|
_previewImage = null;
|
||||||
);
|
});
|
||||||
},
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Center(
|
: Center(
|
||||||
|
@ -105,16 +105,26 @@ class _PreviewTileState extends State<PreviewTile> {
|
|||||||
Container(
|
Container(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
ClipRRect(
|
||||||
|
child: image,
|
||||||
|
borderRadius: BorderRadius.circular(20.0),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 3,
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
widget.dta.title,
|
widget.dta.title,
|
||||||
style: TextStyle(fontSize: isTV() ? 8 : 10.5),
|
style: TextStyle(
|
||||||
|
fontSize: isTV() ? 8 : 10.5, color: Color(0xffe9e9e9)),
|
||||||
overflow: TextOverflow.clip,
|
overflow: TextOverflow.clip,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
image
|
SizedBox(
|
||||||
|
height: 3,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
color: Color(0x6a94a6ff),
|
color: Color(0xff3f3f3f),
|
||||||
),
|
),
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: Material(
|
child: Material(
|
||||||
|
Loading…
Reference in New Issue
Block a user