Adds a whole lot of icons for the relocated publish button

This commit is contained in:
LucasGGamerM 2023-01-01 17:09:49 -03:00
parent a617693f93
commit da1b47ea0d
6 changed files with 36 additions and 5 deletions

View File

@ -1648,7 +1648,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
if(GlobalUserPreferences.relocatePublishButton){ if(GlobalUserPreferences.relocatePublishButton){
publishButton.setCompoundDrawablesWithIntrinsicBounds(scheduledStatus != null && scheduledStatus.scheduledAt.isAfter(DRAFTS_AFTER_INSTANT) publishButton.setCompoundDrawablesWithIntrinsicBounds(scheduledStatus != null && scheduledStatus.scheduledAt.isAfter(DRAFTS_AFTER_INSTANT)
? R.drawable.ic_fluent_save_24_filled : R.drawable.ic_fluent_drafts_24_selector, 0, 0, 0); ? R.drawable.ic_fluent_save_24_selector : R.drawable.ic_fluent_drafts_24_selector, 0, 0, 0);
}else{ }else{
publishButton.setText(scheduledStatus != null && scheduledStatus.scheduledAt.isAfter(DRAFTS_AFTER_INSTANT) publishButton.setText(scheduledStatus != null && scheduledStatus.scheduledAt.isAfter(DRAFTS_AFTER_INSTANT)
? R.string.save : R.string.sk_draft); ? R.string.save : R.string.sk_draft);
@ -1662,12 +1662,21 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
scheduleDraftText.setText(R.string.sk_compose_scheduled); scheduleDraftText.setText(R.string.sk_compose_scheduled);
scheduleDraftText.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0); scheduleDraftText.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
scheduleDraftDismiss.setContentDescription(getString(R.string.sk_compose_no_schedule)); scheduleDraftDismiss.setContentDescription(getString(R.string.sk_compose_no_schedule));
draftsBtn.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_fluent_clock_20_filled, 0, 0, 0); draftsBtn.setCompoundDrawablesWithIntrinsicBounds(GlobalUserPreferences.relocatePublishButton ? R.drawable.ic_fluent_clock_24_filled : R.drawable.ic_fluent_clock_20_filled, 0, 0, 0);
publishButton.setText(scheduledStatus != null && scheduledStatus.scheduledAt.equals(scheduledAt) if(GlobalUserPreferences.relocatePublishButton)
? R.string.save : R.string.sk_schedule); {
publishButton.setCompoundDrawablesWithIntrinsicBounds(scheduledStatus != null && scheduledStatus.scheduledAt.isAfter(DRAFTS_AFTER_INSTANT)
? R.drawable.ic_fluent_save_24_selector : R.drawable.ic_fluent_clock_24_selector, 0, 0, 0);
}else{
publishButton.setText(scheduledStatus != null && scheduledStatus.scheduledAt.equals(scheduledAt)
? R.string.save : R.string.sk_schedule);
}
} }
} else { } else {
draftsBtn.setCompoundDrawablesWithIntrinsicBounds(GlobalUserPreferences.relocatePublishButton ? R.drawable.ic_fluent_clock_24_regular : R.drawable.ic_fluent_clock_20_regular, 0, 0, 0); draftsBtn.setCompoundDrawablesWithIntrinsicBounds(GlobalUserPreferences.relocatePublishButton ? R.drawable.ic_fluent_clock_24_regular : R.drawable.ic_fluent_clock_20_regular, 0, 0, 0);
if(GlobalUserPreferences.relocatePublishButton){
publishButton.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_fluent_send_24_selector, 0, 0, 0);
}
resetPublishButtonText(); resetPublishButtonText();
} }
} }

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="M15.25 13.5h-4c-0.414 0-0.75-0.336-0.75-0.75v-6C10.5 6.336 10.836 6 11.25 6S12 6.336 12 6.75V12h3.25c0.414 0 0.75 0.336 0.75 0.75s-0.336 0.75-0.75 0.75zM12 2C6.478 2 2 6.478 2 12s4.478 10 10 10 10-4.478 10-10S17.522 2 12 2z" android:fillColor="?colorButtonText"/>
</vector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_fluent_clock_24_filled_enabled" android:state_enabled="true"/>
<item android:drawable="@drawable/ic_fluent_clock_24_regular"/>
</selector>

View File

@ -5,5 +5,5 @@
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:pathData="M6.75,3H5.75C4.231,3 3,4.231 3,5.75V18.25C3,19.769 4.231,21 5.75,21H6V15C6,13.757 7.007,12.75 8.25,12.75H15.75C16.993,12.75 18,13.757 18,15V21H18.25C19.769,21 21,19.769 21,18.25V8.286C21,7.424 20.658,6.597 20.048,5.987L18.013,3.952C17.411,3.351 16.599,3.009 15.75,3V7.5C15.75,8.743 14.743,9.75 13.5,9.75H9C7.757,9.75 6.75,8.743 6.75,7.5V3ZM14.25,3V7.5C14.25,7.914 13.914,8.25 13.5,8.25H9C8.586,8.25 8.25,7.914 8.25,7.5V3H14.25ZM16.5,21V15C16.5,14.586 16.164,14.25 15.75,14.25H8.25C7.836,14.25 7.5,14.586 7.5,15V21H16.5Z" android:pathData="M6.75,3H5.75C4.231,3 3,4.231 3,5.75V18.25C3,19.769 4.231,21 5.75,21H6V15C6,13.757 7.007,12.75 8.25,12.75H15.75C16.993,12.75 18,13.757 18,15V21H18.25C19.769,21 21,19.769 21,18.25V8.286C21,7.424 20.658,6.597 20.048,5.987L18.013,3.952C17.411,3.351 16.599,3.009 15.75,3V7.5C15.75,8.743 14.743,9.75 13.5,9.75H9C7.757,9.75 6.75,8.743 6.75,7.5V3ZM14.25,3V7.5C14.25,7.914 13.914,8.25 13.5,8.25H9C8.586,8.25 8.25,7.914 8.25,7.5V3H14.25ZM16.5,21V15C16.5,14.586 16.164,14.25 15.75,14.25H8.25C7.836,14.25 7.5,14.586 7.5,15V21H16.5Z"
android:fillColor="#212121"/> android:fillColor="?colorButtonText"/>
</vector> </vector>

View File

@ -0,0 +1,9 @@
<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="M3,5.75C3,4.231 4.231,3 5.75,3H15.715C16.576,3 17.403,3.342 18.013,3.952L20.048,5.987C20.658,6.597 21,7.424 21,8.286V18.25C21,19.769 19.769,21 18.25,21H5.75C4.231,21 3,19.769 3,18.25V5.75ZM5.75,4.5C5.06,4.5 4.5,5.06 4.5,5.75V18.25C4.5,18.94 5.06,19.5 5.75,19.5H6V14.25C6,13.007 7.007,12 8.25,12H15.75C16.993,12 18,13.007 18,14.25V19.5H18.25C18.94,19.5 19.5,18.94 19.5,18.25V8.286C19.5,7.821 19.316,7.376 18.987,7.048L16.952,5.013C16.692,4.752 16.358,4.583 16,4.523V7.25C16,8.493 14.993,9.5 13.75,9.5H9.25C8.007,9.5 7,8.493 7,7.25V4.5H5.75ZM16.5,19.5V14.25C16.5,13.836 16.164,13.5 15.75,13.5H8.25C7.836,13.5 7.5,13.836 7.5,14.25V19.5H16.5ZM8.5,4.5V7.25C8.5,7.664 8.836,8 9.25,8H13.75C14.164,8 14.5,7.664 14.5,7.25V4.5H8.5Z"
android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_fluent_save_24_filled" android:state_enabled="true"/>
<item android:drawable="@drawable/ic_fluent_save_24_regular"/>
</selector>