mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 17:31:48 +01:00
improve if readability
improve bottom edge readability
This commit is contained in:
parent
1d92c4474f
commit
a029fc950e
@ -52,9 +52,14 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) :
|
|||||||
0 else -1
|
0 else -1
|
||||||
)
|
)
|
||||||
window?.navigationBarColor = Color.TRANSPARENT
|
window?.navigationBarColor = Color.TRANSPARENT
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && preferences.readerTheme()
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O &&
|
||||||
.getOrDefault() == 0 && activity.window.decorView.rootWindowInsets.systemWindowInsetRight == 0 && activity.window.decorView.rootWindowInsets.systemWindowInsetLeft == 0
|
preferences.readerTheme().getOrDefault() == 0 &&
|
||||||
) window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
activity.window.decorView.rootWindowInsets.systemWindowInsetRight == 0 &&
|
||||||
|
activity.window.decorView.rootWindowInsets.systemWindowInsetLeft == 0
|
||||||
|
) {
|
||||||
|
window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
||||||
|
}
|
||||||
|
|
||||||
val height = activity.window.decorView.rootWindowInsets.systemWindowInsetBottom
|
val height = activity.window.decorView.rootWindowInsets.systemWindowInsetBottom
|
||||||
sheetBehavior.peekHeight = 550.dpToPx + height
|
sheetBehavior.peekHeight = 550.dpToPx + height
|
||||||
|
|
||||||
@ -87,9 +92,14 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) :
|
|||||||
is WebtoonViewer -> initWebtoonPreferences()
|
is WebtoonViewer -> initWebtoonPreferences()
|
||||||
}
|
}
|
||||||
|
|
||||||
setBottomEdge(
|
|
||||||
if (activity.viewer is PagerViewer) page_transitions else webtoon_side_padding, activity
|
|
||||||
)
|
val bottomEdgeView = when(activity.viewer is PagerViewer){
|
||||||
|
true -> page_transitions
|
||||||
|
false -> webtoon_side_padding
|
||||||
|
}
|
||||||
|
|
||||||
|
setBottomEdge(bottomEdgeView, activity)
|
||||||
|
|
||||||
close_button.setOnClickListener {
|
close_button.setOnClickListener {
|
||||||
dismiss()
|
dismiss()
|
||||||
|
Loading…
Reference in New Issue
Block a user