Commit 620c1f60 authored by Thomas's avatar Thomas
Browse files

Merge branch 'working' into 'develop'

change colors of fedilab features

See merge request tom79/fedilab!456
parents 890daef5 2a6c7ec6
......@@ -1330,6 +1330,32 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
}
});
if (theme == Helper.THEME_BLACK) {
holder.fedilab_features.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4__));
holder.custom_feature_bookmark.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4__));
holder.custom_feature_translate.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4__));
holder.custom_feature_timed_mute.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4__));
holder.custom_feature_schedule.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4__));
holder.custom_feature_mention.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4__));
holder.custom_feature_cache.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4__));
} else if (theme == Helper.THEME_DARK) {
holder.fedilab_features.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4_));
holder.custom_feature_bookmark.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4_));
holder.custom_feature_translate.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4_));
holder.custom_feature_timed_mute.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4_));
holder.custom_feature_schedule.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4_));
holder.custom_feature_mention.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4_));
holder.custom_feature_cache.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4_));
} else {
holder.fedilab_features.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4));
holder.custom_feature_bookmark.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4));
holder.custom_feature_translate.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4));
holder.custom_feature_timed_mute.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4));
holder.custom_feature_schedule.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4));
holder.custom_feature_mention.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4));
holder.custom_feature_cache.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC4));
}
if (status.isCustomFeaturesDisplayed()) {
holder.fedilab_features_panel.setVisibility(View.VISIBLE);
} else {
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:id="@+id/fedilab_features_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:layout_marginStart="5dp"
android:background="@color/custom_features_panel_background"
android:paddingStart="2dp"
android:paddingTop="4dp"
android:paddingEnd="2dp"
android:paddingBottom="4dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/fedilab_features"
app:layout_constraintStart_toEndOf="@id/fedilab_features"
app:layout_constraintTop_toTopOf="@id/fedilab_features">
<ImageButton
android:id="@+id/custom_feature_timed_mute"
android:id="@+id/custom_feature_bookmark"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/timed_mute"
android:src="@drawable/ic_timelapse"
android:tooltipText="@string/timed_mute"
android:contentDescription="@string/bookmark_add"
android:src="@drawable/ic_bookmark_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/custom_feature_schedule"
app:layout_constraintEnd_toStartOf="@id/custom_feature_translate"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_schedule"
android:id="@+id/custom_feature_translate"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/schedule"
android:src="@drawable/ic_schedule"
android:tooltipText="@string/schedule_boost"
android:contentDescription="@string/translate"
android:src="@drawable/ic_translate_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/custom_feature_timed_mute"
app:layout_constraintRight_toLeftOf="@id/custom_feature_translate"
app:layout_constraintEnd_toStartOf="@id/custom_feature_timed_mute"
app:layout_constraintStart_toEndOf="@id/custom_feature_bookmark"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_translate"
android:id="@+id/custom_feature_timed_mute"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/translate"
android:src="@drawable/ic_translate_white"
android:tooltipText="@string/translate"
android:contentDescription="@string/timed_mute"
android:src="@drawable/ic_timed_mute"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/custom_feature_schedule"
app:layout_constraintRight_toLeftOf="@id/custom_feature_bookmark"
app:layout_constraintEnd_toStartOf="@id/custom_feature_schedule"
app:layout_constraintStart_toEndOf="@id/custom_feature_translate"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_bookmark"
android:id="@+id/custom_feature_schedule"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/bookmark_add"
android:src="@drawable/ic_bookmark_white"
android:tooltipText="@string/bookmark_add"
android:contentDescription="@string/schedule"
android:src="@drawable/ic_schedule_boost"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/custom_feature_translate"
app:layout_constraintRight_toLeftOf="@id/custom_feature_mention"
app:layout_constraintEnd_toStartOf="@id/custom_feature_mention"
app:layout_constraintStart_toEndOf="@id/custom_feature_timed_mute"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
......@@ -70,14 +81,14 @@
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/mention_account"
android:src="@drawable/ic_mention_white"
android:tooltipText="@string/mention_status"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/custom_feature_bookmark"
app:layout_constraintRight_toLeftOf="@id/custom_feature_cache"
app:layout_constraintEnd_toStartOf="@id/custom_feature_cache"
app:layout_constraintStart_toEndOf="@id/custom_feature_schedule"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
......@@ -85,14 +96,14 @@
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/refresh_cache"
android:src="@drawable/ic_refresh"
android:tooltipText="@string/refresh_cache"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/custom_feature_mention"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/custom_feature_mention"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -277,9 +277,9 @@
android:id="@+id/status_account_username"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
......@@ -960,113 +960,7 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/fedilab_features_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:background="@color/custom_features_panel_background"
android:paddingStart="2dp"
android:paddingTop="4dp"
android:paddingEnd="2dp"
android:paddingBottom="4dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/fedilab_features"
app:layout_constraintStart_toEndOf="@id/fedilab_features"
app:layout_constraintTop_toTopOf="@id/fedilab_features">
<ImageButton
android:id="@+id/custom_feature_bookmark"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/bookmark_add"
android:src="@drawable/ic_bookmark_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/custom_feature_translate"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_translate"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/translate"
android:src="@drawable/ic_translate_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/custom_feature_timed_mute"
app:layout_constraintStart_toEndOf="@id/custom_feature_bookmark"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_timed_mute"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/timed_mute"
android:src="@drawable/ic_timed_mute"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/custom_feature_schedule"
app:layout_constraintStart_toEndOf="@id/custom_feature_translate"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_schedule"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/schedule"
android:src="@drawable/ic_schedule_boost"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/custom_feature_mention"
app:layout_constraintStart_toEndOf="@id/custom_feature_timed_mute"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_mention"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/mention_account"
android:src="@drawable/ic_mention_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/custom_feature_cache"
app:layout_constraintStart_toEndOf="@id/custom_feature_schedule"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_cache"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/refresh_cache"
android:src="@drawable/ic_refresh"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/custom_feature_mention"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<include layout="@layout/custom_fedilab_features" />
<include
layout="@layout/layout_quick_reply"
......
......@@ -635,113 +635,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/status_toot_date" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/fedilab_features_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:background="@color/custom_features_panel_background"
android:paddingStart="2dp"
android:paddingTop="4dp"
android:paddingEnd="2dp"
android:paddingBottom="4dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/fedilab_features"
app:layout_constraintStart_toEndOf="@id/fedilab_features"
app:layout_constraintTop_toTopOf="@id/fedilab_features">
<ImageButton
android:id="@+id/custom_feature_bookmark"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/bookmark_add"
android:src="@drawable/ic_bookmark_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/custom_feature_translate"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_translate"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/translate"
android:src="@drawable/ic_translate_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/custom_feature_timed_mute"
app:layout_constraintStart_toEndOf="@id/custom_feature_bookmark"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_timed_mute"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/timed_mute"
android:src="@drawable/ic_timed_mute"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/custom_feature_schedule"
app:layout_constraintStart_toEndOf="@id/custom_feature_translate"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_schedule"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/schedule"
android:src="@drawable/ic_schedule_boost"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/custom_feature_mention"
app:layout_constraintStart_toEndOf="@id/custom_feature_timed_mute"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_mention"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/mention_account"
android:src="@drawable/ic_mention_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/custom_feature_cache"
app:layout_constraintStart_toEndOf="@id/custom_feature_schedule"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_cache"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/refresh_cache"
android:src="@drawable/ic_refresh"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/custom_feature_mention"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<include layout="@layout/custom_fedilab_features" />
</androidx.constraintlayout.widget.ConstraintLayout>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment