forked from cwtch.im/cwtch-ui
theme fixes; scroollbar for addContact; messageRow space optimization for android
This commit is contained in:
parent
5f21ebc2b2
commit
da9d093a13
|
@ -47,6 +47,7 @@ class CwtchDark extends OpaqueThemeType {
|
|||
|
||||
get backgroundMainColor => background; // darkGreyPurple;
|
||||
get backgroundPaneColor => header; //darkGreyPurple;
|
||||
get topbarColor => header; //darkGreyPurple;
|
||||
get backgroundHilightElementColor => deepPurple;
|
||||
get mainTextColor => font; //whiteishPurple;
|
||||
get sendHintTextColor => mauvePurple;
|
||||
|
@ -90,7 +91,8 @@ class CwtchLight extends OpaqueThemeType {
|
|||
get mode => mode_light;
|
||||
|
||||
get backgroundMainColor => background; //whitePurple;
|
||||
get backgroundPaneColor => header; //softPurple;
|
||||
get backgroundPaneColor => background; //whitePurple;
|
||||
get topbarColor => header; //softPurple;
|
||||
get backgroundHilightElementColor => softPurple;
|
||||
get mainTextColor => settings;
|
||||
get sendHintTextColor => purple;
|
||||
|
|
|
@ -30,6 +30,7 @@ class GhostDark extends CwtchDark {
|
|||
|
||||
get backgroundMainColor => background; // darkGreyPurple;
|
||||
get backgroundPaneColor => header; //darkGreyPurple;
|
||||
get topbarColor => header; //darkGreyPurple;
|
||||
get mainTextColor => font; //whiteishPurple;
|
||||
get defaultButtonColor => accent; //hotPink;
|
||||
get textfieldHintColor => mainTextColor; //TODO pick
|
||||
|
@ -53,7 +54,8 @@ class GhostLight extends CwtchLight {
|
|||
get mode => mode_light;
|
||||
|
||||
get backgroundMainColor => background; //whitePurple;
|
||||
get backgroundPaneColor => header; //softPurple;
|
||||
get backgroundPaneColor => background; //whitePurple;
|
||||
get topbarColor => header; //softPurple;
|
||||
get mainTextColor => settings;
|
||||
get defaultButtonColor => accent; // hotPink;
|
||||
get textfieldHintColor => font; //TODO pick
|
||||
|
|
|
@ -30,6 +30,7 @@ class MermaidDark extends CwtchDark {
|
|||
|
||||
get backgroundMainColor => background; // darkGreyPurple;
|
||||
get backgroundPaneColor => header; //darkGreyPurple;
|
||||
get topbarColor => header; //darkGreyPurple;
|
||||
get mainTextColor => font; //whiteishPurple;
|
||||
get defaultButtonColor => accent; //hotPink;
|
||||
get textfieldHintColor => mainTextColor; //TODO pick
|
||||
|
@ -53,7 +54,8 @@ class MermaidLight extends CwtchLight {
|
|||
get mode => mode_light;
|
||||
|
||||
get backgroundMainColor => background; //whitePurple;
|
||||
get backgroundPaneColor => header; //softPurple;
|
||||
get backgroundPaneColor => background; //whitePurple;
|
||||
get topbarColor => header; //softPurple;
|
||||
get mainTextColor => settings;
|
||||
get defaultButtonColor => accent; // hotPink;
|
||||
get textfieldHintColor => font; //TODO pick
|
||||
|
|
|
@ -20,7 +20,7 @@ class MidnightDark extends CwtchDark {
|
|||
static final Color background = Color(0xFF1B1B1B);
|
||||
static final Color header = Color(0xFF1B1B1B);
|
||||
static final Color userBubble = Color(0xFF373737);
|
||||
static final Color peerBubble = Color(0xFF212121);
|
||||
static final Color peerBubble = Color(0xFF494949);
|
||||
static final Color font = Color(0xFFFFFFFF);
|
||||
static final Color settings = Color(0xFFFFFDFF);
|
||||
static final Color accent = Color(0xFFD20070);
|
||||
|
@ -30,6 +30,7 @@ class MidnightDark extends CwtchDark {
|
|||
|
||||
get backgroundMainColor => background; // darkGreyPurple;
|
||||
get backgroundPaneColor => header; //darkGreyPurple;
|
||||
get topbarColor => header; //darkGreyPurple;
|
||||
get mainTextColor => font; //whiteishPurple;
|
||||
get defaultButtonColor => accent; //hotPink;
|
||||
get textfieldHintColor => mainTextColor; //TODO pick
|
||||
|
@ -44,7 +45,7 @@ class MidnightLight extends CwtchLight {
|
|||
static final Color background = Color(0xFFFFFDFF);
|
||||
static final Color header = Color(0xFFE0E0E0);
|
||||
static final Color userBubble = Color(0xFFE0E0E0);
|
||||
static final Color peerBubble = Color(0xFFF3F3F3);
|
||||
static final Color peerBubble = Color(0xFFBABDBE);
|
||||
static final Color font = Color(0xFF1B1B1B);
|
||||
static final Color settings = Color(0xFF1B1B1B);
|
||||
static final Color accent = Color(0xFFD20070);
|
||||
|
@ -53,7 +54,8 @@ class MidnightLight extends CwtchLight {
|
|||
get mode => mode_light;
|
||||
|
||||
get backgroundMainColor => background; //whitePurple;
|
||||
get backgroundPaneColor => header; //softPurple;
|
||||
get backgroundPaneColor => background; //whitePurple;
|
||||
get topbarColor => header; //softPurple;
|
||||
get mainTextColor => settings;
|
||||
get defaultButtonColor => accent; // hotPink;
|
||||
get textfieldHintColor => font; //TODO pick
|
||||
|
|
|
@ -30,6 +30,7 @@ class Neon1Dark extends CwtchDark {
|
|||
|
||||
get backgroundMainColor => background; // darkGreyPurple;
|
||||
get backgroundPaneColor => header; //darkGreyPurple;
|
||||
get topbarColor => header; //darkGreyPurple;
|
||||
get mainTextColor => font; //whiteishPurple;
|
||||
get defaultButtonColor => accent; //hotPink;
|
||||
get textfieldHintColor => mainTextColor; //TODO pick
|
||||
|
@ -53,7 +54,8 @@ class Neon1Light extends CwtchLight {
|
|||
get mode => mode_light;
|
||||
|
||||
get backgroundMainColor => background; //whitePurple;
|
||||
get backgroundPaneColor => header; //softPurple;
|
||||
get backgroundPaneColor => background; //whitePurple;
|
||||
get topbarColor => header; //softPurple
|
||||
get mainTextColor => settings;
|
||||
get defaultButtonColor => accent; // hotPink;
|
||||
get textfieldHintColor => font; //TODO pick
|
||||
|
|
|
@ -30,6 +30,7 @@ class Neon2Dark extends CwtchDark {
|
|||
|
||||
get backgroundMainColor => background; // darkGreyPurple;
|
||||
get backgroundPaneColor => header; //darkGreyPurple;
|
||||
get topbarColor => header; //darkGreyPurple;
|
||||
get mainTextColor => font; //whiteishPurple;
|
||||
get defaultButtonColor => accent; //hotPink;
|
||||
get textfieldHintColor => mainTextColor; //TODO pick
|
||||
|
@ -53,7 +54,8 @@ class Neon2Light extends CwtchLight {
|
|||
get mode => mode_light;
|
||||
|
||||
get backgroundMainColor => background; //whitePurple;
|
||||
get backgroundPaneColor => header; //softPurple;
|
||||
get backgroundPaneColor => background; //whitePurple;
|
||||
get topbarColor => header; //softPurple;
|
||||
get mainTextColor => settings;
|
||||
get defaultButtonColor => accent; // hotPink;
|
||||
get textfieldHintColor => font; //TODO pick
|
||||
|
|
|
@ -69,9 +69,11 @@ abstract class OpaqueThemeType {
|
|||
// Main screen background color (message pane, item rows)
|
||||
get backgroundMainColor => red;
|
||||
|
||||
// Top pane ane pane colors (settings)
|
||||
// pane colors (settings)
|
||||
get backgroundPaneColor => red;
|
||||
|
||||
get topbarColor => red;
|
||||
|
||||
get mainTextColor => red;
|
||||
|
||||
// pressed row, offline heart
|
||||
|
@ -134,7 +136,7 @@ ThemeData mkThemeData(Settings opaque) {
|
|||
),
|
||||
cardColor: opaque.current().backgroundMainColor,
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: opaque.current().backgroundPaneColor,
|
||||
backgroundColor: opaque.current().topbarColor,
|
||||
iconTheme: IconThemeData(
|
||||
color: opaque.current().mainTextColor,
|
||||
),
|
||||
|
|
|
@ -30,6 +30,7 @@ class PumpkinDark extends CwtchDark {
|
|||
|
||||
get backgroundMainColor => background; // darkGreyPurple;
|
||||
get backgroundPaneColor => header; //darkGreyPurple;
|
||||
get topbarColor => header; //darkGreyPurple;
|
||||
get mainTextColor => font; //whiteishPurple;
|
||||
get defaultButtonColor => accent; //hotPink;
|
||||
get textfieldHintColor => mainTextColor; //TODO pick
|
||||
|
@ -53,7 +54,8 @@ class PumpkinLight extends CwtchLight {
|
|||
get mode => mode_light;
|
||||
|
||||
get backgroundMainColor => background; //whitePurple;
|
||||
get backgroundPaneColor => header; //softPurple;
|
||||
get backgroundPaneColor => background; //whitePurple;
|
||||
get topbarColor => header; //softPurple;
|
||||
get mainTextColor => settings;
|
||||
get defaultButtonColor => accent; // hotPink;
|
||||
get textfieldHintColor => font; //TODO pick
|
||||
|
|
|
@ -30,6 +30,7 @@ class VampireDark extends CwtchDark {
|
|||
|
||||
get backgroundMainColor => background; // darkGreyPurple;
|
||||
get backgroundPaneColor => header; //darkGreyPurple;
|
||||
get topbarColor => header; //darkGreyPurple;
|
||||
get mainTextColor => font; //whiteishPurple;
|
||||
get defaultButtonColor => accent; //hotPink;
|
||||
get textfieldHintColor => mainTextColor; //TODO pick
|
||||
|
@ -53,7 +54,8 @@ class VampireLight extends CwtchLight {
|
|||
get mode => mode_light;
|
||||
|
||||
get backgroundMainColor => background; //whitePurple;
|
||||
get backgroundPaneColor => header; //softPurple;
|
||||
get backgroundPaneColor => background; //whitePurple;
|
||||
get topbarColor => header; //softPurple;
|
||||
get mainTextColor => settings;
|
||||
get defaultButtonColor => accent; // hotPink;
|
||||
get textfieldHintColor => font; //TODO pick
|
||||
|
|
|
@ -30,6 +30,7 @@ class WitchDark extends CwtchDark {
|
|||
|
||||
get backgroundMainColor => background; // darkGreyPurple;
|
||||
get backgroundPaneColor => header; //darkGreyPurple;
|
||||
get topbarColor => header; //darkGreyPurple;
|
||||
get mainTextColor => font; //whiteishPurple;
|
||||
get defaultButtonColor => accent; //hotPink;
|
||||
get textfieldHintColor => mainTextColor; //TODO pick
|
||||
|
@ -53,7 +54,8 @@ class WitchLight extends CwtchLight {
|
|||
get mode => mode_light;
|
||||
|
||||
get backgroundMainColor => background; //whitePurple;
|
||||
get backgroundPaneColor => header; //softPurple;
|
||||
get backgroundPaneColor => background; //whitePurple;
|
||||
get topbarColor => header; //softPurple;
|
||||
get mainTextColor => settings;
|
||||
get defaultButtonColor => accent; // hotPink;
|
||||
get textfieldHintColor => font; //TODO pick
|
||||
|
|
|
@ -52,22 +52,26 @@ class _AddContactViewState extends State<AddContactView> {
|
|||
|
||||
/// We display a different number of tabs depending on the experiment setup
|
||||
bool groupsEnabled = Provider.of<Settings>(context).isExperimentEnabled(TapirGroupsExperiment);
|
||||
return Consumer<ErrorHandler>(builder: (context, globalErrorHandler, child) {
|
||||
return DefaultTabController(
|
||||
length: groupsEnabled ? 2 : 1,
|
||||
child: Column(children: [
|
||||
(groupsEnabled ? getTabBarWithGroups() : getTabBarWithAddPeerOnly()),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
children: (groupsEnabled
|
||||
? [
|
||||
addPeerTab(),
|
||||
addGroupTab(),
|
||||
]
|
||||
: [addPeerTab()]),
|
||||
)),
|
||||
]));
|
||||
});
|
||||
return Scrollbar(
|
||||
isAlwaysShown: true,
|
||||
child: SingleChildScrollView(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: Consumer<ErrorHandler>(builder: (context, globalErrorHandler, child) {
|
||||
return DefaultTabController(
|
||||
length: groupsEnabled ? 2 : 1,
|
||||
child: Column(children: [
|
||||
(groupsEnabled ? getTabBarWithGroups() : getTabBarWithAddPeerOnly()),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
children: (groupsEnabled
|
||||
? [
|
||||
addPeerTab(),
|
||||
addGroupTab(),
|
||||
]
|
||||
: [addPeerTab()]),
|
||||
)),
|
||||
]));
|
||||
})));
|
||||
}
|
||||
|
||||
void _copyOnion() {
|
||||
|
|
|
@ -56,7 +56,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
|||
var fromMe = Provider.of<MessageMetadata>(context).senderHandle == Provider.of<ProfileInfoState>(context).onion;
|
||||
var isContact = Provider.of<ProfileInfoState>(context).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle) != null;
|
||||
var isBlocked = isContact ? Provider.of<ProfileInfoState>(context).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle)!.isBlocked : false;
|
||||
var actualMessage = Flexible(flex: 3, fit: FlexFit.loose, child: widget.child);
|
||||
var actualMessage = Flexible(flex: Platform.isAndroid ? 10 : 3, fit: FlexFit.loose, child: widget.child);
|
||||
|
||||
_dragAffinity = fromMe ? Alignment.centerRight : Alignment.centerLeft;
|
||||
|
||||
|
@ -74,19 +74,22 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
|||
}
|
||||
}
|
||||
|
||||
Widget wdgIcons = Visibility(
|
||||
visible: Provider.of<AppState>(context).hoveredIndex == Provider.of<MessageMetadata>(context).messageID,
|
||||
maintainSize: true,
|
||||
maintainAnimation: true,
|
||||
maintainState: true,
|
||||
maintainInteractivity: false,
|
||||
child: IconButton(
|
||||
tooltip: AppLocalizations.of(context)!.tooltipReplyToThisMessage,
|
||||
onPressed: () {
|
||||
Provider.of<AppState>(context, listen: false).selectedIndex = Provider.of<MessageMetadata>(context, listen: false).messageID;
|
||||
},
|
||||
icon: Icon(Icons.reply, color: Provider.of<Settings>(context).theme.dropShadowColor)));
|
||||
Widget wdgSpacer = Flexible(child: SizedBox(width: 60, height: 10));
|
||||
Widget wdgIcons = Platform.isAndroid
|
||||
? SizedBox.shrink()
|
||||
: Visibility(
|
||||
visible: Provider.of<AppState>(context).hoveredIndex == Provider.of<MessageMetadata>(context).messageID,
|
||||
maintainSize: true,
|
||||
maintainAnimation: true,
|
||||
maintainState: true,
|
||||
maintainInteractivity: false,
|
||||
child: IconButton(
|
||||
tooltip: AppLocalizations.of(context)!.tooltipReplyToThisMessage,
|
||||
onPressed: () {
|
||||
Provider.of<AppState>(context, listen: false).selectedIndex = Provider.of<MessageMetadata>(context, listen: false).messageID;
|
||||
},
|
||||
icon: Icon(Icons.reply, color: Provider.of<Settings>(context).theme.dropShadowColor)));
|
||||
|
||||
Widget wdgSpacer = Flexible(flex: 1, child: SizedBox(width: Platform.isAndroid ? 20 : 60, height: 10));
|
||||
var widgetRow = <Widget>[];
|
||||
|
||||
if (fromMe) {
|
||||
|
|
Loading…
Reference in New Issue