mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
Specify app bar color (#558)
This commit is contained in:
parent
2e798b1bd1
commit
9c12a83176
@ -1498,6 +1498,7 @@ class _APIFormWidgetState extends State<APIFormWidget> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(widget.title),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(widget.icon),
|
||||
|
@ -27,6 +27,11 @@ Color get COLOR_ACTION {
|
||||
}
|
||||
}
|
||||
|
||||
// Return an "app bar" color based on the current theme
|
||||
Color get COLOR_APP_BAR {
|
||||
return Colors.blueGrey;
|
||||
}
|
||||
|
||||
const Color COLOR_WARNING = Color.fromRGBO(250, 150, 50, 1);
|
||||
const Color COLOR_DANGER = Color.fromRGBO(200, 50, 75, 1);
|
||||
const Color COLOR_SUCCESS = Color.fromRGBO(100, 200, 75, 1);
|
||||
|
@ -135,6 +135,7 @@ class _CameraBarcodeControllerState extends InvenTreeBarcodeControllerState {
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
title: Text(L10().scanBarcode),
|
||||
actions: [
|
||||
IconButton(
|
||||
|
@ -102,6 +102,7 @@ class _WedgeBarcodeControllerState extends InvenTreeBarcodeControllerState {
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
title: Text(L10().scanBarcode),
|
||||
),
|
||||
backgroundColor: Colors.black.withOpacity(0.9),
|
||||
|
@ -225,6 +225,7 @@ class InvenTreeAboutWidget extends StatelessWidget {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(L10().appAbout),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
),
|
||||
body: ListView(
|
||||
children: ListTile.divideTiles(
|
||||
|
@ -157,6 +157,7 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
||||
key: _settingsKey,
|
||||
appBar: AppBar(
|
||||
title: Text(L10().appSettings),
|
||||
backgroundColor: COLOR_APP_BAR
|
||||
),
|
||||
body: Container(
|
||||
child: ListView(
|
||||
|
@ -3,6 +3,8 @@ import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
|
||||
|
||||
import "package:inventree/l10.dart";
|
||||
import "package:inventree/preferences.dart";
|
||||
import "package:inventree/app_colors.dart";
|
||||
|
||||
import "package:inventree/widget/dialogs.dart";
|
||||
|
||||
|
||||
@ -110,7 +112,10 @@ class _InvenTreeBarcodeSettingsState extends State<InvenTreeBarcodeSettingsWidge
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(L10().barcodeSettings)),
|
||||
appBar: AppBar(
|
||||
title: Text(L10().barcodeSettings),
|
||||
backgroundColor: COLOR_APP_BAR
|
||||
),
|
||||
body: Container(
|
||||
child: ListView(
|
||||
children: [
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
import "package:flutter/material.dart";
|
||||
import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
|
||||
import "package:inventree/app_colors.dart";
|
||||
|
||||
import "package:inventree/l10.dart";
|
||||
import "package:inventree/preferences.dart";
|
||||
@ -53,6 +54,7 @@ class _HomeScreenSettingsState extends State<HomeScreenSettingsWidget> {
|
||||
key: _settingsKey,
|
||||
appBar: AppBar(
|
||||
title: Text(L10().homeScreen),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
),
|
||||
body: Container(
|
||||
child: ListView(
|
||||
|
@ -108,6 +108,7 @@ class _InvenTreeLoginState extends State<InvenTreeLoginWidget> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(L10().login),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(TablerIcons.transition_right, color: COLOR_SUCCESS),
|
||||
|
@ -3,6 +3,7 @@ import "package:flutter/material.dart";
|
||||
import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
|
||||
|
||||
import "package:inventree/l10.dart";
|
||||
import "package:inventree/app_colors.dart";
|
||||
import "package:inventree/preferences.dart";
|
||||
|
||||
|
||||
@ -45,7 +46,10 @@ class _InvenTreePartSettingsState extends State<InvenTreePartSettingsWidget> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(L10().partSettings)),
|
||||
appBar: AppBar(
|
||||
title: Text(L10().partSettings),
|
||||
backgroundColor: COLOR_APP_BAR
|
||||
),
|
||||
body: Container(
|
||||
child: ListView(
|
||||
children: [
|
||||
|
@ -1,5 +1,6 @@
|
||||
import "package:flutter/material.dart";
|
||||
import "package:flutter_markdown/flutter_markdown.dart";
|
||||
import "package:inventree/app_colors.dart";
|
||||
import "package:url_launcher/url_launcher.dart";
|
||||
|
||||
import "package:inventree/l10.dart";
|
||||
@ -16,7 +17,8 @@ class ReleaseNotesWidget extends StatelessWidget {
|
||||
Widget build (BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(L10().releaseNotes)
|
||||
title: Text(L10().releaseNotes),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
),
|
||||
body: Markdown(
|
||||
selectable: false,
|
||||
@ -54,6 +56,7 @@ class CreditsWidget extends StatelessWidget {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(L10().credits),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
),
|
||||
body: Markdown(
|
||||
selectable: false,
|
||||
|
@ -43,6 +43,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
||||
key: _scaffoldKey,
|
||||
appBar: AppBar(
|
||||
title: Text(L10().settings),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
),
|
||||
body: Center(
|
||||
child: ListView(
|
||||
|
@ -397,6 +397,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> with BaseWidgetPr
|
||||
key: homeKey,
|
||||
appBar: AppBar(
|
||||
title: Text(L10().appTitle),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
|
@ -60,6 +60,7 @@ mixin BaseWidgetProperties {
|
||||
centerTitle: false,
|
||||
bottom: tabs.isEmpty ? null : TabBar(tabs: tabs),
|
||||
title: Text(getAppBarTitle()),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
actions: appBarActions(context),
|
||||
leading: backButton(context, key),
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user