replace visibility icons

This commit is contained in:
sk
2023-01-25 23:51:42 +01:00
parent d7aceffc8f
commit 17e1cd1fe9
10 changed files with 27 additions and 12 deletions

View File

@@ -656,8 +656,8 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
view.findViewById(R.id.visibility).setVisibility(View.GONE); view.findViewById(R.id.visibility).setVisibility(View.GONE);
Drawable visibilityIcon = getActivity().getDrawable(switch(replyTo.visibility){ Drawable visibilityIcon = getActivity().getDrawable(switch(replyTo.visibility){
case PUBLIC -> R.drawable.ic_fluent_earth_20_regular; case PUBLIC -> R.drawable.ic_fluent_earth_20_regular;
case UNLISTED -> R.drawable.ic_fluent_people_community_20_regular; case UNLISTED -> R.drawable.ic_fluent_lock_open_20_regular;
case PRIVATE -> R.drawable.ic_fluent_people_checkmark_20_regular; case PRIVATE -> R.drawable.ic_fluent_lock_closed_20_filled;
case DIRECT -> R.drawable.ic_fluent_mention_20_regular; case DIRECT -> R.drawable.ic_fluent_mention_20_regular;
case LOCAL -> R.drawable.ic_fluent_eye_20_regular; case LOCAL -> R.drawable.ic_fluent_eye_20_regular;
}); });
@@ -1869,8 +1869,8 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
} }
visibilityBtn.setImageResource(switch(statusVisibility){ visibilityBtn.setImageResource(switch(statusVisibility){
case PUBLIC -> R.drawable.ic_fluent_earth_24_regular; case PUBLIC -> R.drawable.ic_fluent_earth_24_regular;
case UNLISTED -> R.drawable.ic_fluent_people_community_24_regular; case UNLISTED -> R.drawable.ic_fluent_lock_open_24_regular;
case PRIVATE -> R.drawable.ic_fluent_people_checkmark_24_regular; case PRIVATE -> R.drawable.ic_fluent_lock_closed_24_filled;
case DIRECT -> R.drawable.ic_fluent_mention_24_regular; case DIRECT -> R.drawable.ic_fluent_mention_24_regular;
case LOCAL -> R.drawable.ic_fluent_eye_24_regular; case LOCAL -> R.drawable.ic_fluent_eye_24_regular;
}); });

View File

@@ -96,8 +96,8 @@ public class ExtendedFooterStatusDisplayItem extends StatusDisplayItem{
visibility.setImageResource(switch (s.visibility) { visibility.setImageResource(switch (s.visibility) {
case PUBLIC -> R.drawable.ic_fluent_earth_20_regular; case PUBLIC -> R.drawable.ic_fluent_earth_20_regular;
case UNLISTED -> R.drawable.ic_fluent_people_community_20_regular; case UNLISTED -> R.drawable.ic_fluent_lock_open_20_regular;
case PRIVATE -> R.drawable.ic_fluent_people_checkmark_20_regular; case PRIVATE -> R.drawable.ic_fluent_lock_closed_20_filled;
case DIRECT -> R.drawable.ic_fluent_mention_20_regular; case DIRECT -> R.drawable.ic_fluent_mention_20_regular;
case LOCAL -> R.drawable.ic_fluent_eye_20_regular; case LOCAL -> R.drawable.ic_fluent_eye_20_regular;
}); });

View File

@@ -239,8 +239,8 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
Drawable checkMark = ctx.getDrawable(R.drawable.ic_fluent_checkmark_circle_20_regular); Drawable checkMark = ctx.getDrawable(R.drawable.ic_fluent_checkmark_circle_20_regular);
Drawable publicDrawable = ctx.getDrawable(R.drawable.ic_fluent_earth_24_regular); Drawable publicDrawable = ctx.getDrawable(R.drawable.ic_fluent_earth_24_regular);
Drawable unlistedDrawable = ctx.getDrawable(R.drawable.ic_fluent_people_community_24_regular); Drawable unlistedDrawable = ctx.getDrawable(R.drawable.ic_fluent_lock_open_24_regular);
Drawable followersDrawable = ctx.getDrawable(R.drawable.ic_fluent_people_checkmark_24_regular); Drawable followersDrawable = ctx.getDrawable(R.drawable.ic_fluent_lock_closed_24_filled);
StatusPrivacy defaultVisibility = session.preferences != null ? session.preferences.postingDefaultVisibility : null; StatusPrivacy defaultVisibility = session.preferences != null ? session.preferences.postingDefaultVisibility : null;
// e.g. post visibility is unlisted, but default is public // e.g. post visibility is unlisted, but default is public

View File

@@ -55,8 +55,8 @@ public class ReblogOrReplyLineStatusDisplayItem extends StatusDisplayItem{
this.visibility = visibility; this.visibility = visibility;
this.iconEnd = visibility != null ? switch (visibility) { this.iconEnd = visibility != null ? switch (visibility) {
case PUBLIC -> R.drawable.ic_fluent_earth_20_regular; case PUBLIC -> R.drawable.ic_fluent_earth_20_regular;
case UNLISTED -> R.drawable.ic_fluent_people_community_20_regular; case UNLISTED -> R.drawable.ic_fluent_lock_open_20_regular;
case PRIVATE -> R.drawable.ic_fluent_people_checkmark_20_regular; case PRIVATE -> R.drawable.ic_fluent_lock_closed_20_filled;
default -> 0; default -> 0;
} : 0; } : 0;
} }

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="20dp" android:height="20dp" android:viewportWidth="20" android:viewportHeight="20">
<path android:pathData="M10 2c1.657 0 3 1.343 3 3v1h1c1.105 0 2 0.895 2 2v7c0 1.105-0.895 2-2 2H6c-1.105 0-2-0.895-2-2V8c0-1.105 0.895-2 2-2h1V5c0-1.657 1.343-3 3-3zm4 5H6C5.448 7 5 7.448 5 8v7c0 0.552 0.448 1 1 1h8c0.552 0 1-0.448 1-1V8c0-0.552-0.448-1-1-1zm-4 3.5c0.552 0 1 0.448 1 1s-0.448 1-1 1-1-0.448-1-1 0.448-1 1-1zM10 3C8.895 3 8 3.895 8 5v1h4V5c0-1.105-0.895-2-2-2z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M12 2c2.21 0 4 1.79 4 4v2h2.5C19.328 8 20 8.672 20 9.5v11c0 0.828-0.672 1.5-1.5 1.5h-13C4.672 22 4 21.328 4 20.5v-11C4 8.672 4.672 8 5.5 8H8V6c0-2.21 1.79-4 4-4zm0 11.5c-0.828 0-1.5 0.672-1.5 1.5s0.672 1.5 1.5 1.5c0.829 0 1.5-0.672 1.5-1.5s-0.671-1.5-1.5-1.5zM12 4c-1.105 0-2 0.895-2 2v2h4V6c0-1.105-0.895-2-2-2z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M12 2c2.21 0 4 1.79 4 4v2h1.75C18.993 8 20 9.007 20 10.25v9.5c0 1.243-1.007 2.25-2.25 2.25H6.25C5.007 22 4 20.993 4 19.75v-9.5C4 9.007 5.007 8 6.25 8H8V6c0-2.21 1.79-4 4-4zm5.75 7.5H6.25c-0.414 0-0.75 0.336-0.75 0.75v9.5c0 0.414 0.336 0.75 0.75 0.75h11.5c0.414 0 0.75-0.336 0.75-0.75v-9.5c0-0.414-0.336-0.75-0.75-0.75zm-5.75 4c0.829 0 1.5 0.672 1.5 1.5s-0.671 1.5-1.5 1.5c-0.828 0-1.5-0.672-1.5-1.5s0.672-1.5 1.5-1.5zm0-10c-1.38 0-2.5 1.12-2.5 2.5v2h5V6c0-1.38-1.12-2.5-2.5-2.5z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="20dp" android:height="20dp" android:viewportWidth="20" android:viewportHeight="20">
<path android:pathData="M9.997 2c1.44 0 2.666 1.01 2.944 2.402 0.054 0.27-0.122 0.534-0.392 0.588-0.271 0.054-0.534-0.121-0.588-0.392C11.775 3.673 10.958 3 9.996 3 8.941 3 8.076 3.817 8 4.853l-0.006 0.15V7H14c1.105 0 2 0.895 2 2v7c0 1.105-0.895 2-2 2H6c-1.105 0-2-0.895-2-2V9c0-1.105 0.895-2 2-2h0.995V5.002C6.995 3.344 8.339 2 9.997 2zM14 8H6C5.448 8 5 8.448 5 9v7c0 0.552 0.448 1 1 1h8c0.552 0 1-0.448 1-1V9c0-0.552-0.448-1-1-1zm-4 3.5c0.552 0 1 0.448 1 1s-0.448 1-1 1-1-0.448-1-1 0.448-1 1-1z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M12 2.004c1.875 0 3.334 1.206 3.928 3.003 0.13 0.393-0.084 0.817-0.477 0.947-0.394 0.13-0.818-0.083-0.948-0.477C14.102 4.262 13.185 3.504 12 3.504c-1.407 0-2.42 0.958-2.496 2.551L9.499 6.25v1.749h8.251c1.19 0 2.166 0.926 2.245 2.097L20 10.25v9.496c0 1.19-0.925 2.166-2.096 2.245l-0.154 0.005H6.25c-1.19 0-2.166-0.925-2.245-2.096L4 19.746V10.25c0-1.191 0.925-2.166 2.096-2.245L6.25 8l1.749-0.001v-1.75C8 3.712 9.71 2.005 12 2.005zM17.75 9.5H6.25c-0.38 0-0.694 0.282-0.743 0.648L5.5 10.25v9.496c0 0.38 0.282 0.693 0.648 0.743l0.102 0.007h11.5c0.38 0 0.694-0.282 0.743-0.648l0.007-0.102V10.25c0-0.38-0.282-0.694-0.648-0.743L17.75 9.5zm-5.75 4c0.828 0 1.499 0.67 1.499 1.498 0 0.827-0.671 1.498-1.499 1.498-0.828 0-1.499-0.67-1.499-1.498s0.671-1.499 1.499-1.499z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -16,10 +16,10 @@
android:icon="@drawable/ic_fluent_earth_24_regular" android:icon="@drawable/ic_fluent_earth_24_regular"
android:title="@string/visibility_public"/> android:title="@string/visibility_public"/>
<item android:id="@+id/vis_unlisted" <item android:id="@+id/vis_unlisted"
android:icon="@drawable/ic_fluent_people_community_24_regular" android:icon="@drawable/ic_fluent_lock_open_24_regular"
android:title="@string/sk_visibility_unlisted"/> android:title="@string/sk_visibility_unlisted"/>
<item android:id="@+id/vis_followers" <item android:id="@+id/vis_followers"
android:icon="@drawable/ic_fluent_people_checkmark_24_regular" android:icon="@drawable/ic_fluent_lock_closed_24_regular"
android:title="@string/visibility_followers_only"/> android:title="@string/visibility_followers_only"/>
<item android:id="@+id/vis_private" <item android:id="@+id/vis_private"
android:icon="@drawable/ic_fluent_mention_24_regular" android:icon="@drawable/ic_fluent_mention_24_regular"