First pass at re-theming to match Chinwag

This commit is contained in:
Mike Barnes 2020-12-15 12:53:03 +11:00
parent 3d1251b9eb
commit b2723b7707
36 changed files with 68 additions and 61 deletions

View file

@ -357,7 +357,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidI
viewModel.isRefreshing.observe(this, { isRefreshing ->
swipeToRefreshLayout.isRefreshing = isRefreshing == true
})
swipeToRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeToRefreshLayout.setColorSchemeResources(R.color.chinwag_green)
}
private fun onAccountChanged(account: Account?) {

View file

@ -482,7 +482,7 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
icon = ContextCompat.getDrawable(context, R.drawable.ic_repeat_24dp);
if (icon != null) {
icon.setColorFilter(ContextCompat.getColor(context,
R.color.tusky_blue), PorterDuff.Mode.SRC_ATOP);
R.color.chinwag_green), PorterDuff.Mode.SRC_ATOP);
}
format = context.getString(R.string.notification_reblog_format);

View file

@ -69,7 +69,7 @@ class AnnouncementsActivity : BottomSheetActivity(), AnnouncementActionListener,
}
swipeRefreshLayout.setOnRefreshListener(this::refreshAnnouncements)
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeRefreshLayout.setColorSchemeResources(R.color.chinwag_green)
announcementsList.setHasFixedSize(true)
announcementsList.layoutManager = LinearLayoutManager(this)

View file

@ -489,13 +489,13 @@ class ComposeActivity : BaseActivity(),
@ColorInt val color = if (contentWarningShown) {
composeHideMediaButton.setImageResource(R.drawable.ic_hide_media_24dp)
composeHideMediaButton.isClickable = false
ContextCompat.getColor(this, R.color.transparent_tusky_blue)
ContextCompat.getColor(this, R.color.transparent_chinwag_green)
} else {
composeHideMediaButton.isClickable = true
if (markMediaSensitive) {
composeHideMediaButton.setImageResource(R.drawable.ic_hide_media_24dp)
ContextCompat.getColor(this, R.color.tusky_blue)
ContextCompat.getColor(this, R.color.chinwag_green)
} else {
composeHideMediaButton.setImageResource(R.drawable.ic_eye_24dp)
ThemeUtils.getColor(this, android.R.attr.textColorTertiary)
@ -509,7 +509,7 @@ class ComposeActivity : BaseActivity(),
@ColorInt val color = if (composeScheduleView.time == null) {
ThemeUtils.getColor(this, android.R.attr.textColorTertiary)
} else {
ContextCompat.getColor(this, R.color.tusky_blue)
ContextCompat.getColor(this, R.color.chinwag_green)
}
composeScheduleButton.drawable.colorFilter = PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN)
}
@ -873,7 +873,7 @@ class ComposeActivity : BaseActivity(),
composeContentWarningBar.show()
composeContentWarningField.setSelection(composeContentWarningField.text.length)
composeContentWarningField.requestFocus()
ContextCompat.getColor(this, R.color.tusky_blue)
ContextCompat.getColor(this, R.color.chinwag_green)
} else {
composeContentWarningBar.hide()
composeEditField.requestFocus()

View file

@ -58,7 +58,7 @@ public final class ProgressImageView extends AppCompatImageView {
}
private void init() {
circlePaint.setColor(ContextCompat.getColor(getContext(), R.color.tusky_blue));
circlePaint.setColor(ContextCompat.getColor(getContext(), R.color.chinwag_green));
circlePaint.setStrokeWidth(Utils.dpToPx(getContext(), 4));
circlePaint.setStyle(Paint.Style.STROKE);
@ -82,7 +82,7 @@ public final class ProgressImageView extends AppCompatImageView {
public void setChecked(boolean checked) {
this.markBgPaint.setColor(ContextCompat.getColor(getContext(),
checked ? R.color.tusky_blue : R.color.tusky_grey_10));
checked ? R.color.chinwag_green : R.color.tusky_grey_10));
invalidate();
}

View file

@ -102,7 +102,7 @@ class ConversationsFragment : SFragment(), StatusActionListener, Injectable, Res
swipeRefreshLayout.setOnRefreshListener {
viewModel.refresh()
}
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeRefreshLayout.setColorSchemeResources(R.color.chinwag_green)
}
private fun onTopLoaded() {

View file

@ -295,7 +295,7 @@ public class NotificationHelper {
.setSmallIcon(R.drawable.ic_notify)
.setContentIntent(summary ? summaryResultPendingIntent : eventResultPendingIntent)
.setDeleteIntent(deletePendingIntent)
.setColor(BuildConfig.FLAVOR == "green" ? Color.parseColor("#19A341") : ContextCompat.getColor(context, R.color.tusky_blue))
.setColor(BuildConfig.FLAVOR == "green" ? Color.parseColor("#19A341") : ContextCompat.getColor(context, R.color.chinwag_green))
.setGroup(account.getAccountId())
.setAutoCancel(true)
.setShortcutId(Long.toString(account.getId()))

View file

@ -101,7 +101,7 @@ class ReportStatusesFragment : Fragment(), Injectable, AdapterHandler {
}
private fun setupSwipeRefreshLayout() {
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeRefreshLayout.setColorSchemeResources(R.color.chinwag_green)
swipeRefreshLayout.setOnRefreshListener {
snackbarErrorRetry?.dismiss()

View file

@ -56,7 +56,7 @@ class ScheduledTootActivity : BaseActivity(), ScheduledTootActionListener, Injec
}
swipeRefreshLayout.setOnRefreshListener(this::refreshStatuses)
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeRefreshLayout.setColorSchemeResources(R.color.chinwag_green)
scheduledTootList.setHasFixedSize(true)
scheduledTootList.layoutManager = LinearLayoutManager(this)

View file

@ -56,7 +56,7 @@ abstract class SearchFragment<T> : Fragment(),
private fun setupSwipeRefreshLayout() {
swipeRefreshLayout.setOnRefreshListener(this)
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeRefreshLayout.setColorSchemeResources(R.color.chinwag_green)
}
private fun subscribeObservables() {

View file

@ -187,7 +187,7 @@ class AccountMediaFragment : BaseFragment(), RefreshableFragment, Injectable {
swipeRefreshLayout.setOnRefreshListener {
refresh()
}
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeRefreshLayout.setColorSchemeResources(R.color.chinwag_green)
}
statusView.visibility = View.GONE

View file

@ -221,7 +221,7 @@ public class NotificationsFragment extends SFragment implements
appBarOptions = rootView.findViewById(R.id.appBarOptions);
swipeRefreshLayout.setOnRefreshListener(this);
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue);
swipeRefreshLayout.setColorSchemeResources(R.color.chinwag_green);
loadNotificationsFilter();

View file

@ -423,7 +423,7 @@ public class TimelineFragment extends SFragment implements
swipeRefreshLayout.setEnabled(isSwipeToRefreshEnabled);
if (isSwipeToRefreshEnabled) {
swipeRefreshLayout.setOnRefreshListener(this);
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue);
swipeRefreshLayout.setColorSchemeResources(R.color.chinwag_green);
}
}

View file

@ -149,7 +149,7 @@ public final class ViewThreadFragment extends SFragment implements
Context context = getContext();
swipeRefreshLayout = rootView.findViewById(R.id.swipeRefreshLayout);
swipeRefreshLayout.setOnRefreshListener(this);
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue);
swipeRefreshLayout.setColorSchemeResources(R.color.chinwag_green);
recyclerView = rootView.findViewById(R.id.recyclerView);
recyclerView.setHasFixedSize(true);

View file

@ -70,7 +70,7 @@ class SendStatusBroadcastReceiver : BroadcastReceiver() {
val builder = NotificationCompat.Builder(context, NotificationHelper.CHANNEL_MENTION + senderIdentifier)
.setSmallIcon(R.drawable.ic_notify)
.setColor(ContextCompat.getColor(context, (R.color.tusky_blue)))
.setColor(ContextCompat.getColor(context, (R.color.chinwag_green)))
.setGroup(senderFullName)
.setDefaults(0) // So it doesn't ring twice, notify only in Target callback
@ -112,7 +112,7 @@ class SendStatusBroadcastReceiver : BroadcastReceiver() {
val builder = NotificationCompat.Builder(context, NotificationHelper.CHANNEL_MENTION + senderIdentifier)
.setSmallIcon(R.drawable.ic_notify)
.setColor(ContextCompat.getColor(context, (R.color.tusky_blue)))
.setColor(ContextCompat.getColor(context, (R.color.chinwag_green)))
.setGroup(senderFullName)
.setDefaults(0) // So it doesn't ring twice, notify only in Target callback

View file

@ -89,7 +89,7 @@ class SendTootService : Service(), Injectable {
.setContentText(notificationText)
.setProgress(1, 0, true)
.setOngoing(true)
.setColor(ContextCompat.getColor(this, R.color.tusky_blue))
.setColor(ContextCompat.getColor(this, R.color.chinwag_green))
.addAction(0, getString(android.R.string.cancel), cancelSendingIntent(sendingNotificationId))
if (tootsToSend.size == 0 || Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@ -180,7 +180,7 @@ class SendTootService : Service(), Injectable {
.setSmallIcon(R.drawable.ic_notify)
.setContentTitle(getString(R.string.send_toot_notification_error_title))
.setContentText(getString(R.string.send_toot_notification_saved_content))
.setColor(ContextCompat.getColor(this@SendTootService, R.color.tusky_blue))
.setColor(ContextCompat.getColor(this@SendTootService, R.color.chinwag_green))
notificationManager.cancel(tootId)
notificationManager.notify(errorNotificationId--, builder.build())
@ -229,7 +229,7 @@ class SendTootService : Service(), Injectable {
.setSmallIcon(R.drawable.ic_notify)
.setContentTitle(getString(R.string.send_toot_notification_cancel_title))
.setContentText(getString(R.string.send_toot_notification_saved_content))
.setColor(ContextCompat.getColor(this@SendTootService, R.color.tusky_blue))
.setColor(ContextCompat.getColor(this@SendTootService, R.color.chinwag_green))
notificationManager.notify(tootId, builder.build())

View file

@ -2,5 +2,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- attr not working here for Android 5? -->
<item android:state_checked="false" android:color="@color/textColorTertiary"/>
<item android:state_checked="true" android:color="@color/tusky_blue"/>
<item android:state_checked="true" android:color="@color/chinwag_green"/>
</selector>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="false" android:color="?android:attr/textColorTertiary"/>
<item android:state_focused="true" android:color="@color/tusky_blue"/>
<item android:state_focused="true" android:color="@color/chinwag_green"/>
</selector>

View file

@ -4,5 +4,5 @@
android:width="18dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="@color/tusky_blue" android:pathData="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M11,16.5L18,9.5L16.59,8.09L11,13.67L7.91,10.59L6.5,12L11,16.5Z" />
<path android:fillColor="@color/chinwag_green" android:pathData="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M11,16.5L18,9.5L16.59,8.09L11,13.67L7.91,10.59L6.5,12L11,16.5Z" />
</vector>

View file

@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/tusky_blue"
android:fillColor="@color/chinwag_green"
android:pathData="M15,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM6,10L6,7L4,7v3L1,10v2h3v3h2v-3h3v-2L6,10zM15,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
</vector>

View file

@ -4,5 +4,5 @@
android:pathData="M21.282,12A9.282,9.282 0,0 1,12 21.282,9.282 9.282,0 0,1 2.718,12 9.282,9.282 0,0 1,12 2.718,9.282 9.282,0 0,1 21.282,12Z"
android:strokeAlpha="1" android:strokeColor="#00000000"
android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="8"/>
<path android:fillAlpha="1" android:fillColor="@color/tusky_blue" android:pathData="M10,16.5l6,-4.5 -6,-4.5v9zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
<path android:fillAlpha="1" android:fillColor="@color/chinwag_green" android:pathData="M10,16.5l6,-4.5 -6,-4.5v9zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
</vector>

View file

@ -4,6 +4,6 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/tusky_blue"
android:fillColor="@color/chinwag_green"
android:pathData="M19,3L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM9,17L7,17v-7h2v7zM13,17h-2L11,7h2v10zM17,17h-2v-4h2v4z" />
</vector>

View file

@ -4,6 +4,6 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/tusky_blue"
android:fillColor="@color/chinwag_green"
android:pathData="M17,2L17,5L5,5L5,11L7,11L7,7L17,7L17,10L21,6L17,2zM9.75,9.75L9.75,14.25L14.25,14.25L14.25,9.75L9.75,9.75zM17,13L17,17L7,17L7,14L3,18L7,22L7,19L19,19L19,13L17,13z"/>
</vector>

View file

@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/tusky_blue"
android:fillColor="@color/chinwag_green"
android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/>
</vector>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid android:color="@color/tusky_blue" />
<solid android:color="@color/chinwag_green" />
</shape>

View file

@ -190,7 +190,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/account_note_saved"
android:textColor="@color/tusky_blue"
android:textColor="@color/chinwag_green"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/accountNoteTextInputLayout" />

View file

@ -29,7 +29,7 @@
android:id="@+id/licenseCardLink"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/tusky_blue" />
android:textColor="@color/chinwag_green" />
</LinearLayout>
</merge>

View file

@ -32,7 +32,7 @@
android:checkable="false"
app:chipEndPadding="4dp"
app:chipIcon="@drawable/ic_plus_24dp"
app:chipSurfaceColor="@color/tusky_blue"
app:chipSurfaceColor="@color/chinwag_green"
app:textEndPadding="0dp"
app:textStartPadding="0dp" />

View file

@ -76,7 +76,7 @@
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/download_fonts"
android:focusable="true"
android:tint="@color/tusky_blue"
android:tint="@color/chinwag_green"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -92,7 +92,7 @@
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@android:string/cancel"
android:focusable="true"
android:tint="@color/tusky_blue"
android:tint="@color/chinwag_green"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -517,8 +517,8 @@
sparkbutton:activeImage="@drawable/ic_reblog_active_24dp"
sparkbutton:iconSize="28dp"
sparkbutton:inactiveImage="@drawable/ic_reblog_24dp"
sparkbutton:primaryColor="@color/tusky_blue"
sparkbutton:secondaryColor="@color/tusky_blue_light" />
sparkbutton:primaryColor="@color/chinwag_green"
sparkbutton:secondaryColor="@color/chinwag_green_light" />
<at.connyduck.sparkbutton.SparkButton
android:id="@+id/status_favourite"

View file

@ -537,8 +537,8 @@
sparkbutton:activeImage="@drawable/ic_reblog_active_24dp"
sparkbutton:iconSize="28dp"
sparkbutton:inactiveImage="@drawable/ic_reblog_24dp"
sparkbutton:primaryColor="@color/tusky_blue"
sparkbutton:secondaryColor="@color/tusky_blue_light" />
sparkbutton:primaryColor="@color/chinwag_green"
sparkbutton:secondaryColor="@color/chinwag_green_light" />
<at.connyduck.sparkbutton.SparkButton
android:id="@+id/status_favourite"

View file

@ -69,7 +69,7 @@
android:checkable="false"
android:text="@string/add_hashtag_title"
app:chipIcon="@drawable/ic_plus_24dp"
app:chipSurfaceColor="@color/tusky_blue" />
app:chipSurfaceColor="@color/chinwag_green" />
</com.google.android.material.chip.ChipGroup>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorSurface">@color/tusky_grey_30</color>
<color name="colorSurface">@color/tusky_grey_10</color>
<color name="colorPrimaryDark">@color/tusky_grey_25</color>
<color name="colorBackground">@color/tusky_grey_20</color>

View file

@ -12,17 +12,17 @@
<color name="black">#000</color>
<!-- the number roughly corresponds to the % lightness of the grey -->
<color name="tusky_grey_05">#070b14</color>
<color name="tusky_grey_10">#16191f</color>
<color name="tusky_grey_20">#282c37</color>
<color name="tusky_grey_25">#313543</color>
<color name="tusky_grey_30">#444b5d</color>
<color name="tusky_grey_40">#596378</color>
<color name="tusky_grey_50">#6e7b92</color>
<color name="tusky_grey_70">#9baec8</color>
<color name="tusky_grey_80">#b9c8d8</color>
<color name="tusky_grey_90">#d9e1e8</color>
<color name="tusky_grey_95">#f0f0ec</color>
<color name="tusky_grey_05">#070707</color>
<color name="tusky_grey_10">#161616</color>
<color name="tusky_grey_20">#2c2c2c</color>
<color name="tusky_grey_25">#4b4b4b</color>
<color name="tusky_grey_30">#6e6e6e</color>
<color name="tusky_grey_40">#b3b3b3</color>
<color name="tusky_grey_50">#cacaca</color>
<color name="tusky_grey_70">#e1e1e1</color>
<color name="tusky_grey_80">#eaeaea</color>
<color name="tusky_grey_90">#f5f5f5</color>
<color name="tusky_grey_95">#fafafa</color>
<color name="transparent_tusky_blue">#8c2b90d9</color>
@ -33,11 +33,18 @@
<!-- colors used in the elephant friend drawables -->
<color name="elephant_friend_border_color">#121419</color>
<color name="elephant_friend_accent_color">@color/tusky_blue</color>
<color name="elephant_friend_accent_color">@color/chinwag_green</color>
<color name="elephant_friend_body_color">#9BAEC8</color>
<color name="elephant_friend_dark_body_color_1">#8192A6</color>
<color name="elephant_friend_dark_body_color_2">#7F90A4</color>
<color name="elephant_friend_light_color_1">#CAD4E0</color>
<color name="elephant_friend_light_color_2">#d9e1e8</color>
<color name="chinwag_green">#388e3c</color>
<color name="chinwag_green_light">#508f53</color>
<color name="transparent_chinwag_green">#8c388e3c</color>
<color name="chinwag_grey_dark">#cecec1</color>
<color name="chinwag_grey_medium">#f0f0ec</color>
<color name="chinwag_grey_light">#f2f2ef</color>
</resources>

View file

@ -32,8 +32,8 @@
<style name="SplashTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="android:windowBackground">@drawable/background_splash</item>
<item name="colorPrimary">@color/tusky_grey_10</item>
<item name="colorPrimaryDark">@color/tusky_grey_10</item>
<item name="colorPrimary">@color/tusky_grey_90</item>
<item name="colorPrimaryDark">@color/tusky_grey_90</item>
<item name="android:windowNoTitle">true</item>
</style>
@ -42,10 +42,10 @@
<style name="TuskyDialogActivityTheme" parent="@style/TuskyTheme" />
<style name="TuskyBaseTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">@color/tusky_blue</item>
<item name="colorPrimary">@color/chinwag_green</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorSecondary">@color/tusky_blue</item>
<item name="colorSecondary">@color/chinwag_green</item>
<item name="colorOnSecondary">@color/white</item>
<item name="colorSurface">@color/colorSurface</item>

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorSurface">@color/white</color>
<color name="colorPrimaryDark">@color/tusky_grey_70</color>
<color name="colorSurface">@color/chinwag_grey_medium</color>
<color name="colorPrimaryDark">@color/chinwag_green_light</color>
<color name="colorBackground">@color/tusky_grey_95</color>
<color name="windowBackground">@color/tusky_grey_80</color>