mirror of
https://github.com/go-vikunja/app
synced 2024-06-03 19:19:46 +00:00
Add dark mode (#46)
Merge branch 'master' into feature/dark-mode Add white logo in dark mode Make button shadow dark Format Add dark mode Co-authored-by: kolaente <k@knt.li> Co-authored-by: Jonas Franz <info@jonasfranz.software> Reviewed-on: vikunja/app#46 Reviewed-by: konrad <konrad@kola-entertainments.de>
This commit is contained in:
parent
8993999a68
commit
3ecf6cd9dd
Binary file not shown.
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 56 KiB |
BIN
assets/vikunja_logo_full_white.png
Normal file
BIN
assets/vikunja_logo_full_white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
|
@ -61,6 +61,7 @@ class VikunjaApp extends StatelessWidget {
|
||||||
return new MaterialApp(
|
return new MaterialApp(
|
||||||
title: 'Vikunja',
|
title: 'Vikunja',
|
||||||
theme: buildVikunjaTheme(),
|
theme: buildVikunjaTheme(),
|
||||||
|
darkTheme: buildVikunjaDarkTheme(),
|
||||||
home: this.home,
|
home: this.home,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,9 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 30),
|
padding: EdgeInsets.symmetric(vertical: 30),
|
||||||
child: Image(
|
child: Image(
|
||||||
image: AssetImage('assets/vikunja_logo_full.png'),
|
image: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? AssetImage('assets/vikunja_logo_full_white.png')
|
||||||
|
: AssetImage('assets/vikunja_logo_full.png'),
|
||||||
height: 85.0,
|
height: 85.0,
|
||||||
semanticLabel: 'Vikunja Logo',
|
semanticLabel: 'Vikunja Logo',
|
||||||
),
|
),
|
||||||
|
|
|
@ -24,7 +24,9 @@ class FancyButton extends StatelessWidget {
|
||||||
height: height,
|
height: height,
|
||||||
decoration: BoxDecoration(boxShadow: [
|
decoration: BoxDecoration(boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: vButtonShadow,
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? vButtonShadowDark
|
||||||
|
: vButtonShadow,
|
||||||
offset: Offset(-5, 5),
|
offset: Offset(-5, 5),
|
||||||
blurRadius: 10,
|
blurRadius: 10,
|
||||||
),
|
),
|
||||||
|
|
|
@ -15,6 +15,7 @@ const vGreen = Color(0xFF00CE6E);
|
||||||
|
|
||||||
const vButtonColor = vPrimary;
|
const vButtonColor = vPrimary;
|
||||||
const vButtonTextColor = vWhite;
|
const vButtonTextColor = vWhite;
|
||||||
|
const vButtonShadowDark = Color(0xFF0b2a4a);
|
||||||
const vButtonShadow = Color(0xFFb2d9ff);
|
const vButtonShadow = Color(0xFFb2d9ff);
|
||||||
|
|
||||||
///////////
|
///////////
|
||||||
|
|
|
@ -1,8 +1,16 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:vikunja_app/theme/constants.dart';
|
import 'package:vikunja_app/theme/constants.dart';
|
||||||
|
|
||||||
ThemeData buildVikunjaTheme() {
|
ThemeData buildVikunjaTheme() => _buildVikunjaTheme(ThemeData.light());
|
||||||
var base = ThemeData.light();
|
|
||||||
|
ThemeData buildVikunjaDarkTheme() {
|
||||||
|
ThemeData base = _buildVikunjaTheme(ThemeData.dark());
|
||||||
|
return base.copyWith(
|
||||||
|
accentColor: vWhite,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
ThemeData _buildVikunjaTheme(ThemeData base) {
|
||||||
return base.copyWith(
|
return base.copyWith(
|
||||||
errorColor: vRed,
|
errorColor: vRed,
|
||||||
primaryColor: vPrimaryDark,
|
primaryColor: vPrimaryDark,
|
||||||
|
|
|
@ -34,6 +34,7 @@ flutter:
|
||||||
- assets/graphics/hypnotize.png
|
- assets/graphics/hypnotize.png
|
||||||
- assets/vikunja_logo.png
|
- assets/vikunja_logo.png
|
||||||
- assets/vikunja_logo_full.png
|
- assets/vikunja_logo_full.png
|
||||||
|
- assets/vikunja_logo_full_white.png
|
||||||
fonts:
|
fonts:
|
||||||
- family: Quicksand
|
- family: Quicksand
|
||||||
fonts:
|
fonts:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user