make theming prettier and darker

This commit is contained in:
lukas-heiligenbrunner 2022-11-02 00:36:21 +01:00
parent 02e73eed1b
commit a7756da713
4 changed files with 66 additions and 71 deletions

View File

@ -29,6 +29,8 @@ class App extends StatelessWidget {
return const MaterialApp(home: LoginScreen());
} else {
return MaterialApp(
theme: ThemeData(
appBarTheme: AppBarTheme(backgroundColor: Color(0xff0d0d0d))),
scrollBehavior: AppScrollBehavior(),
home: DrawerPage(
title: 'OpenMediaCenter',

View File

@ -7,52 +7,32 @@ class MyDrawer extends StatelessWidget {
const MyDrawer({Key? key}) : super(key: key);
@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);
return Drawer(
child: ListView(children: [
ListTile(
title: const Text('Home'),
leading: const Icon(Icons.home),
return ListTile(
title: Text(text, style: TextStyle(color: Color(0xffe9e9e9))),
leading: Icon(icon, color: Color(0xffe9e9e9)),
onTap: () {
ctx.onChangePage(Section.HOME);
ctx.onChangePage(section);
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);
},
),
]),
);
}
}

View File

@ -60,7 +60,7 @@ class _PreviewGridState extends State<PreviewGrid> {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("Error"),
Text("Error" + snapshot.error.toString()),
TextButton(
onPressed: () => loadData(), child: Text("Reload page"))
],
@ -83,6 +83,8 @@ class _PreviewGridState extends State<PreviewGrid> {
if (widget.headerBuilder != null) widget.headerBuilder!(this),
data.length > 0
? Expanded(
child: Container(
color: Color(0xff999999),
child: MasonryGridView.count(
// every tile should be at max 330 pixels long...
crossAxisCount: isTV() ? width ~/ 200 : width ~/ 275,
@ -107,6 +109,7 @@ class _PreviewGridState extends State<PreviewGrid> {
);
},
),
),
)
: Center(
child: Column(

View File

@ -105,16 +105,26 @@ class _PreviewTileState extends State<PreviewTile> {
Container(
child: Column(
children: [
ClipRRect(
child: image,
borderRadius: BorderRadius.circular(20.0),
),
SizedBox(
height: 3,
),
Text(
widget.dta.title,
style: TextStyle(fontSize: isTV() ? 8 : 10.5),
style: TextStyle(
fontSize: isTV() ? 8 : 10.5, color: Color(0xffe9e9e9)),
overflow: TextOverflow.clip,
maxLines: 1,
),
image
SizedBox(
height: 3,
),
],
),
color: Color(0x6a94a6ff),
color: Color(0xff3f3f3f),
),
Positioned.fill(
child: Material(