From a48422cf5fbb11488054d9f45c13b79e16d2aaa0 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Tue, 9 Jan 2024 21:57:12 -0800 Subject: [PATCH] add theme chatImageColor --- LIBCWTCH-GO.version | 2 +- assets/themes/cwtch/theme.yml | 2 ++ lib/themes/cwtch.dart | 2 ++ lib/themes/opaque.dart | 1 + lib/themes/yamltheme.dart | 1 + lib/widgets/messagelist.dart | 2 +- 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/LIBCWTCH-GO.version b/LIBCWTCH-GO.version index e6cb9215..7e597873 100644 --- a/LIBCWTCH-GO.version +++ b/LIBCWTCH-GO.version @@ -1 +1 @@ -2024-01-03-20-52-v0.0.10-4-g6c0b2e2 \ No newline at end of file +2024-01-15-10-14-v0.0.10-9-g425c3e6 \ No newline at end of file diff --git a/assets/themes/cwtch/theme.yml b/assets/themes/cwtch/theme.yml index 668b127b..8e8fa9e8 100644 --- a/assets/themes/cwtch/theme.yml +++ b/assets/themes/cwtch/theme.yml @@ -61,6 +61,7 @@ themes: textfieldHintColor: mainTextColor toolbarIconColor: settings # whiteishPurple topbarColor: header # darkGreyPurple + chatImageColor: purple light: colors: background: whitePurple @@ -102,3 +103,4 @@ themes: textfieldHintColor: font toolbarIconColor: settings # darkPurple topbarColor: header # softPurple + chatImageColor: purple diff --git a/lib/themes/cwtch.dart b/lib/themes/cwtch.dart index cc450853..175a48a6 100644 --- a/lib/themes/cwtch.dart +++ b/lib/themes/cwtch.dart @@ -81,6 +81,7 @@ class CwtchDark extends OpaqueThemeType { get textfieldHintColor => mainTextColor; get toolbarIconColor => settings; //whiteishPurple; get topbarColor => header; //darkGreyPurple; + get chatImageColor => purple; } class CwtchLight extends OpaqueThemeType { @@ -126,4 +127,5 @@ class CwtchLight extends OpaqueThemeType { get textfieldHintColor => font; get toolbarIconColor => settings; //darkPurple; get topbarColor => header; //softPurple; + get chatImageColor => purple; } diff --git a/lib/themes/opaque.dart b/lib/themes/opaque.dart index 1fb8a2a1..e01dc68f 100644 --- a/lib/themes/opaque.dart +++ b/lib/themes/opaque.dart @@ -121,6 +121,7 @@ abstract class OpaqueThemeType { // Images + get chatImageColor => red; get chatImage => null; ImageProvider loadImage(String key, {BuildContext? context}) { return AssetImage(""); } diff --git a/lib/themes/yamltheme.dart b/lib/themes/yamltheme.dart index e5be331a..0d2aaa25 100644 --- a/lib/themes/yamltheme.dart +++ b/lib/themes/yamltheme.dart @@ -140,6 +140,7 @@ class YmlTheme extends OpaqueThemeType { // Images + get chatImageColor => getColor("chatImageColor") ?? fallbackTheme.chatImageColor; get chatImage => getImage("chatImage") ?? fallbackTheme.chatImage; ImageProvider loadImage(String key, {BuildContext? context}) { diff --git a/lib/widgets/messagelist.dart b/lib/widgets/messagelist.dart index 273bdbf5..2774bf0d 100644 --- a/lib/widgets/messagelist.dart +++ b/lib/widgets/messagelist.dart @@ -121,7 +121,7 @@ class _MessageListState extends State { ? DecorationImage( repeat: ImageRepeat.repeat, image: Provider.of(context, listen: false).theme.loadImage(Provider.of(context, listen: false).theme.chatImage, context: context), - colorFilter: ColorFilter.mode(Provider.of(context).theme.hilightElementColor.withOpacity(0.15), BlendMode.srcIn)) + colorFilter: ColorFilter.mode(Provider.of(context).theme.chatImageColor, BlendMode.srcIn)) : null : DecorationImage( fit: BoxFit.scaleDown,