Fixes to blue themes

This commit is contained in:
Jays2Kings 2021-04-09 13:07:20 -04:00
parent d3a1d8a8a9
commit ed1fb9de1a
8 changed files with 10 additions and 8 deletions

View File

@ -12,7 +12,6 @@ import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.widget.SearchView
import androidx.core.content.ContextCompat
import androidx.core.graphics.ColorUtils
import androidx.recyclerview.widget.RecyclerView
import com.bluelinelabs.conductor.ControllerChangeHandler
@ -251,11 +250,11 @@ class BrowseController :
}
binding.bottomSheet.pill.alpha = (1 - progress) * 0.25f
val selectedColor = ColorUtils.setAlphaComponent(
ContextCompat.getColor(binding.bottomSheet.tabs.context, R.color.colorAccent),
bottomSheet.context.getResourceColor(R.attr.tabBarIconColor),
(progress * 255).toInt()
)
val unselectedColor = ColorUtils.setAlphaComponent(
bottomSheet.context.getResourceColor(R.attr.colorOnBackground),
bottomSheet.context.getResourceColor(R.attr.actionBarTintColor),
153
)
binding.bottomSheet.sheetLayout.elevation = progress * 5
@ -293,7 +292,7 @@ class BrowseController :
}
)
binding.shadow2.translationY = pad
binding.bottomSheet.root.sheetBehavior?.peekHeight = 58.spToPx + padding
binding.bottomSheet.root.sheetBehavior?.peekHeight = 56.spToPx + padding
binding.bottomSheet.root.extensionFrameLayout?.binding?.fastScroller?.updateLayoutParams<ViewGroup.MarginLayoutParams> {
bottomMargin = -pad.toInt()
}

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:alpha="0.26667" android:color="?attr/colorAccent" />
<item android:alpha="0.4" android:color="?attr/colorAccent" />
</selector>

View File

@ -7,5 +7,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/colorAccentText" android:state_selected="true"/>
<item android:color="@color/colorAccent" android:state_pressed="true"/>
<item android:alpha="0.60" android:color="?attr/colorOnBackground"/>
<item android:alpha="0.60" android:color="?attr/actionBarTintColor"/>
</selector>

View File

@ -5,7 +5,7 @@
android:start="2dp" >
<shape>
<corners android:radius="4dp" />
<solid android:color="@color/accent_alpha" />
<solid android:color="?tabHighlightBackground" />
<size android:height="28sp"/>
</shape>
</item>

View File

@ -79,7 +79,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:tabIndicatorColor="?attr/colorAccent"
app:tabGravity="fill"/>
</FrameLayout>
</com.google.android.material.appbar.AppBarLayout>

View File

@ -15,6 +15,7 @@
<attr name="readerBackground" format="color"/>
<attr name="tabBarIconColor" format="reference|integer"/>
<attr name="tabBarIconInactive" format="reference|integer"/>
<attr name="tabHighlightBackground" format="reference|integer"/>
<declare-styleable name="ReaderSpinnerView">
<attr name="title" format="reference|string"/>

View File

@ -226,6 +226,7 @@
<item name="tabTextColor">@color/tabs_selector_alt</item>
<item name="tabRippleColor">@android:color/transparent</item>
<item name="tabIndicator">@drawable/tab_highlight_indicator</item>
<item name="tabIndicatorColor">?tabHighlightBackground</item>
<item name="tabMaxWidth">0dp</item>
<item name="tabMode">fixed</item>
<item name="tabIndicatorAnimationMode">elastic</item>

View File

@ -41,6 +41,7 @@
<item name="android:statusBarColor">@color/status_bar</item>
<item name="android:navigationBarColor">#B3000000</item>
<item name="android:colorEdgeEffect">@color/colorAccent</item>
<item name="tabHighlightBackground">@color/accent_alpha</item>
<!-- Material Dialog colors -->
<item name="md_color_title">@color/textColorPrimary</item>
@ -60,6 +61,7 @@
<item name="colorSecondary">@color/app_color_primary</item>
<item name="tabBarIconColor">@color/md_white_1000</item>
<item name="tabBarIconInactive">@color/md_white_1000_50</item>
<item name="tabHighlightBackground">@color/md_white_1000_50</item>
<item name="actionBarTintColor">@color/md_white_1000</item>
<item name="actionBarTheme">@style/Theme.ActionBar.Dark.DayNight</item>
<item name="android:windowLightStatusBar">false</item>