Bring toolbar appearance more in line with design

This commit is contained in:
Grishka 2023-06-05 04:46:21 +03:00
parent 02ddad22e7
commit a24b4363d7
4 changed files with 11 additions and 12 deletions

View File

@ -541,7 +541,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
private void updateToolbar(){
getToolbar().setOnClickListener(v->scrollToTop());
getToolbar().setNavigationContentDescription(R.string.back);
UiUtils.setToolbarWithSubtitleAppearance(getToolbar());
if(onScrollListener!=null){
onScrollListener.setViews(getToolbar());
}

View File

@ -76,12 +76,6 @@ public class SettingsMainFragment extends BaseSettingsFragment<Void>{
@Override
protected void doLoadData(int offset, int count){}
@Override
protected void onUpdateToolbar(){
super.onUpdateToolbar();
UiUtils.setToolbarWithSubtitleAppearance(getToolbar());
}
@Override
protected void onHidden(){
super.onHidden();

View File

@ -754,11 +754,6 @@ public class UiUtils{
};
}
public static void setToolbarWithSubtitleAppearance(Toolbar toolbar){
toolbar.setTitleTextAppearance(toolbar.getContext(), R.style.m3_title_medium);
toolbar.setSubtitleTextAppearance(toolbar.getContext(), R.style.m3_title_small);
}
@SuppressLint("DefaultLocale")
public static String formatMediaDuration(int seconds){
if(seconds>=3600)

View File

@ -189,6 +189,17 @@
<item name="appkitToolbarElevation">0px</item>
<item name="appkitToolbarBackground">?colorM3Background</item>
<item name="actionBarIconTint">@color/action_bar_icons</item>
<item name="android:titleTextAppearance">@style/action_bar_title</item>
<item name="android:subtitleTextAppearance">@style/action_bar_subtitle</item>
</style>
<style name="action_bar_title" parent="android:TextAppearance.Material.Widget.ActionBar.Title">
<item name="android:fontFamily">sans-serif</item>
<item name="android:textColor">?colorM3OnSurface</item>
</style>
<style name="action_bar_subtitle" parent="m3_title_small">
<item name="android:textColor">?colorM3OnSurfaceVariant</item>
</style>
<style name="Widget.Mastodon.Toolbar.ActionMode" parent="android:Widget.Material.ActionMode">