theme fixups for loading bg image and new chat reaction icon color
continuous-integration/drone/pr Build is pending
Details
continuous-integration/drone/pr Build is pending
Details
This commit is contained in:
parent
e32ec30a1e
commit
68db0867d4
|
@ -54,6 +54,7 @@ themes:
|
||||||
portraitProfileBadgeTextColor: whiteishPurple
|
portraitProfileBadgeTextColor: whiteishPurple
|
||||||
scrollbarDefaultColor: purple
|
scrollbarDefaultColor: purple
|
||||||
sendHintTextColor: mauvePurple
|
sendHintTextColor: mauvePurple
|
||||||
|
chatReactionIconColor: mauvePurple
|
||||||
textfieldBackgroundColor: deepPurple
|
textfieldBackgroundColor: deepPurple
|
||||||
textfieldBorderColor: deepPurple
|
textfieldBorderColor: deepPurple
|
||||||
textfieldErrorColor: hotPink
|
textfieldErrorColor: hotPink
|
||||||
|
@ -94,6 +95,7 @@ themes:
|
||||||
portraitProfileBadgeTextColor: whitePurple
|
portraitProfileBadgeTextColor: whitePurple
|
||||||
scrollbarDefaultColor: accent
|
scrollbarDefaultColor: accent
|
||||||
sendHintTextColor: purple
|
sendHintTextColor: purple
|
||||||
|
chatReactionIconColor: purple
|
||||||
textfieldBackgroundColor: purple
|
textfieldBackgroundColor: purple
|
||||||
textfieldBorderColor: purple
|
textfieldBorderColor: purple
|
||||||
textfieldErrorColor: hotPink
|
textfieldErrorColor: hotPink
|
||||||
|
|
|
@ -74,6 +74,7 @@ class CwtchDark extends OpaqueThemeType {
|
||||||
get portraitProfileBadgeTextColor => whiteishPurple;
|
get portraitProfileBadgeTextColor => whiteishPurple;
|
||||||
get scrollbarDefaultColor => purple;
|
get scrollbarDefaultColor => purple;
|
||||||
get sendHintTextColor => mauvePurple;
|
get sendHintTextColor => mauvePurple;
|
||||||
|
get chatReactionIconColor => mauvePurple;
|
||||||
get textfieldBackgroundColor => deepPurple;
|
get textfieldBackgroundColor => deepPurple;
|
||||||
get textfieldBorderColor => deepPurple;
|
get textfieldBorderColor => deepPurple;
|
||||||
get textfieldErrorColor => hotPink;
|
get textfieldErrorColor => hotPink;
|
||||||
|
@ -118,6 +119,7 @@ class CwtchLight extends OpaqueThemeType {
|
||||||
get portraitProfileBadgeTextColor => whitePurple;
|
get portraitProfileBadgeTextColor => whitePurple;
|
||||||
get scrollbarDefaultColor => accent;
|
get scrollbarDefaultColor => accent;
|
||||||
get sendHintTextColor => purple;
|
get sendHintTextColor => purple;
|
||||||
|
get chatReactionIconColor => purple;
|
||||||
get textfieldBackgroundColor => purple;
|
get textfieldBackgroundColor => purple;
|
||||||
get textfieldBorderColor => purple;
|
get textfieldBorderColor => purple;
|
||||||
get textfieldErrorColor => hotPink;
|
get textfieldErrorColor => hotPink;
|
||||||
|
|
|
@ -113,6 +113,7 @@ abstract class OpaqueThemeType {
|
||||||
get dropShadowColor => red;
|
get dropShadowColor => red;
|
||||||
|
|
||||||
get toolbarIconColor => red;
|
get toolbarIconColor => red;
|
||||||
|
get chatReactionIconColor => red;
|
||||||
get messageFromMeBackgroundColor => red;
|
get messageFromMeBackgroundColor => red;
|
||||||
get messageFromMeTextColor => red;
|
get messageFromMeTextColor => red;
|
||||||
get messageFromOtherBackgroundColor => red;
|
get messageFromOtherBackgroundColor => red;
|
||||||
|
@ -122,6 +123,8 @@ abstract class OpaqueThemeType {
|
||||||
|
|
||||||
get chatImage => null;
|
get chatImage => null;
|
||||||
|
|
||||||
|
ImageProvider loadImage(String key) { return AssetImage(""); }
|
||||||
|
|
||||||
// Sizes
|
// Sizes
|
||||||
double contactOnionTextSize() {
|
double contactOnionTextSize() {
|
||||||
return 18;
|
return 18;
|
||||||
|
|
|
@ -2,8 +2,10 @@ import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
|
import 'package:cwtch/config.dart';
|
||||||
import 'package:cwtch/themes/cwtch.dart';
|
import 'package:cwtch/themes/cwtch.dart';
|
||||||
import 'package:cwtch/themes/opaque.dart';
|
import 'package:cwtch/themes/opaque.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:yaml/yaml.dart';
|
import 'package:yaml/yaml.dart';
|
||||||
import 'package:path/path.dart' as path;
|
import 'package:path/path.dart' as path;
|
||||||
|
@ -127,6 +129,7 @@ class YmlTheme extends OpaqueThemeType {
|
||||||
get portraitOnlineBusyColor => Color(0xFFEF9A9A) ?? fallbackTheme.portraitOnlineBusyColor;
|
get portraitOnlineBusyColor => Color(0xFFEF9A9A) ?? fallbackTheme.portraitOnlineBusyColor;
|
||||||
get dropShadowColor => getColor("dropShadowColor") ?? fallbackTheme.dropShadowColor;
|
get dropShadowColor => getColor("dropShadowColor") ?? fallbackTheme.dropShadowColor;
|
||||||
get toolbarIconColor => getColor("toolbarIconColor") ?? fallbackTheme.toolbarIconColor;
|
get toolbarIconColor => getColor("toolbarIconColor") ?? fallbackTheme.toolbarIconColor;
|
||||||
|
get chatReactionIconColor => getColor("chatReactionIconColor") ?? fallbackTheme.chatReactionIconColor;
|
||||||
get messageFromMeBackgroundColor => getColor("messageFromMeBackgroundColor") ?? fallbackTheme.messageFromMeBackgroundColor;
|
get messageFromMeBackgroundColor => getColor("messageFromMeBackgroundColor") ?? fallbackTheme.messageFromMeBackgroundColor;
|
||||||
get messageFromMeTextColor => getColor("messageFromMeTextColor") ?? fallbackTheme.messageFromMeTextColor;
|
get messageFromMeTextColor => getColor("messageFromMeTextColor") ?? fallbackTheme.messageFromMeTextColor;
|
||||||
get messageFromOtherBackgroundColor => getColor("messageFromOtherBackgroundColor") ?? fallbackTheme.messageFromOtherBackgroundColor;
|
get messageFromOtherBackgroundColor => getColor("messageFromOtherBackgroundColor") ?? fallbackTheme.messageFromOtherBackgroundColor;
|
||||||
|
@ -135,4 +138,14 @@ class YmlTheme extends OpaqueThemeType {
|
||||||
// Images
|
// Images
|
||||||
|
|
||||||
get chatImage => getImage("chatImage") ?? fallbackTheme.chatImage;
|
get chatImage => getImage("chatImage") ?? fallbackTheme.chatImage;
|
||||||
|
|
||||||
|
ImageProvider loadImage(String key) {
|
||||||
|
File f = File(key);
|
||||||
|
if (f.existsSync()) {
|
||||||
|
return FileImage(f);
|
||||||
|
} else {
|
||||||
|
return AssetImage(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ class _MessageListState extends State<MessageList> {
|
||||||
? (Provider.of<Settings>(context).theme.chatImage != null)
|
? (Provider.of<Settings>(context).theme.chatImage != null)
|
||||||
? DecorationImage(
|
? DecorationImage(
|
||||||
repeat: ImageRepeat.repeat,
|
repeat: ImageRepeat.repeat,
|
||||||
image: AssetImage(Provider.of<Settings>(context).theme.chatImage),
|
image: Provider.of<Settings>(context).theme.loadImage(Provider.of<Settings>(context).theme.chatImage),
|
||||||
colorFilter: ColorFilter.mode(Provider.of<Settings>(context).theme.hilightElementColor.withOpacity(0.15), BlendMode.srcIn))
|
colorFilter: ColorFilter.mode(Provider.of<Settings>(context).theme.hilightElementColor.withOpacity(0.15), BlendMode.srcIn))
|
||||||
: null
|
: null
|
||||||
: DecorationImage(
|
: DecorationImage(
|
||||||
|
|
|
@ -96,7 +96,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
||||||
Provider.of<ContactInfoState>(context, listen: false).notifyMessageDraftUpdate();
|
Provider.of<ContactInfoState>(context, listen: false).notifyMessageDraftUpdate();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
icon: Icon(Icons.reply, color: Provider.of<Settings>(context).theme.dropShadowColor)));
|
icon: Icon(Icons.reply, color: Provider.of<Settings>(context).theme.chatReactionIconColor)));
|
||||||
|
|
||||||
var settings = Provider.of<Settings>(context);
|
var settings = Provider.of<Settings>(context);
|
||||||
var pis = Provider.of<ProfileInfoState>(context);
|
var pis = Provider.of<ProfileInfoState>(context);
|
||||||
|
@ -119,7 +119,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
modalShowReplies(context, AppLocalizations.of(context)!.headingReplies, AppLocalizations.of(context)!.messageNoReplies, settings, pis, cis, borderColor, cache, messageID);
|
modalShowReplies(context, AppLocalizations.of(context)!.headingReplies, AppLocalizations.of(context)!.messageNoReplies, settings, pis, cis, borderColor, cache, messageID);
|
||||||
},
|
},
|
||||||
icon: Icon(CwtchIcons.view_replies, color: Provider.of<Settings>(context).theme.dropShadowColor)));
|
icon: Icon(CwtchIcons.view_replies, color: Provider.of<Settings>(context).theme.chatReactionIconColor)));
|
||||||
|
|
||||||
var profile = Provider.of<ProfileInfoState>(context, listen: false);
|
var profile = Provider.of<ProfileInfoState>(context, listen: false);
|
||||||
var conversation = Provider.of<ContactInfoState>(context, listen: false);
|
var conversation = Provider.of<ContactInfoState>(context, listen: false);
|
||||||
|
@ -143,7 +143,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
||||||
Provider.of<FlwtchState>(context, listen: false).cwtch.TranslateMessage(profile.onion, conversation.identifier, message.messageID, "French");
|
Provider.of<FlwtchState>(context, listen: false).cwtch.TranslateMessage(profile.onion, conversation.identifier, message.messageID, "French");
|
||||||
modalShowTranslation(context, profile, settings);
|
modalShowTranslation(context, profile, settings);
|
||||||
},
|
},
|
||||||
icon: Icon(Icons.translate, color: Provider.of<Settings>(context).theme.dropShadowColor)));
|
icon: Icon(Icons.translate, color: Provider.of<Settings>(context).theme.chatReactionIconColor)));
|
||||||
|
|
||||||
Widget wdgSpacer = Flexible(flex: 1, child: SizedBox(width: Platform.isAndroid ? 20 : 60, height: 10));
|
Widget wdgSpacer = Flexible(flex: 1, child: SizedBox(width: Platform.isAndroid ? 20 : 60, height: 10));
|
||||||
var widgetRow = <Widget>[];
|
var widgetRow = <Widget>[];
|
||||||
|
|
|
@ -2,4 +2,9 @@
|
||||||
|
|
||||||
# Script to run cwtch directly from package tarball directory
|
# Script to run cwtch directly from package tarball directory
|
||||||
|
|
||||||
|
SCRIPT=$(realpath "$0")
|
||||||
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
||||||
|
|
||||||
|
cd $SCRIPTPATH
|
||||||
|
|
||||||
exec env LD_LIBRARY_PATH=./lib/:./lib/Tor ./lib/cwtch
|
exec env LD_LIBRARY_PATH=./lib/:./lib/Tor ./lib/cwtch
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT=$(realpath "$0")
|
||||||
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
||||||
|
|
||||||
|
cd $SCRIPTPATH
|
||||||
|
|
||||||
exec env LD_LIBRARY_PATH=PREFIX/lib/cwtch/:PREFIX/lib/cwtch/Tor PREFIX/lib/cwtch/cwtch
|
exec env LD_LIBRARY_PATH=PREFIX/lib/cwtch/:PREFIX/lib/cwtch/Tor PREFIX/lib/cwtch/cwtch
|
||||||
|
|
Loading…
Reference in New Issue