diff --git a/app/build.gradle b/app/build.gradle
index 9febe45623..871cee9aa1 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -98,7 +98,7 @@ android {
dependencies {
// Modified dependencies
- compile 'com.github.inorichi:subsampling-scale-image-view:44aa442'
+ compile 'com.github.inorichi:subsampling-scale-image-view:9048f23'
compile 'com.github.inorichi:junrar-android:634c1f5'
// Android support library
diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt
index 4812b0c723..fa77e4ad46 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt
@@ -41,6 +41,8 @@ class PreferenceKeys(context: Context) {
val readerTheme = context.getString(R.string.pref_reader_theme_key)
+ val cropBorders = context.getString(R.string.pref_crop_borders_key)
+
val readWithTapping = context.getString(R.string.pref_read_with_tapping_key)
val readWithVolumeKeys = context.getString(R.string.pref_read_with_volume_keys_key)
diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt
index 9fdda648ae..f6a9648299 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt
@@ -34,7 +34,7 @@ class PreferencesHelper(val context: Context) {
fun rotation() = rxPrefs.getInteger(keys.rotation, 1)
- fun enableTransitions() = rxPrefs.getBoolean(keys.enableTransitions, true)
+ fun pageTransitions() = rxPrefs.getBoolean(keys.enableTransitions, true)
fun showPageNumber() = rxPrefs.getBoolean(keys.showPageNumber, true)
@@ -60,6 +60,8 @@ class PreferencesHelper(val context: Context) {
fun readerTheme() = rxPrefs.getInteger(keys.readerTheme, 0)
+ fun cropBorders() = rxPrefs.getBoolean(keys.cropBorders, false)
+
fun readWithTapping() = rxPrefs.getBoolean(keys.readWithTapping, true)
fun readWithVolumeKeys() = rxPrefs.getBoolean(keys.readWithVolumeKeys, false)
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsDialog.kt
index 56659e637d..bdcc558dd1 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsDialog.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsDialog.kt
@@ -83,6 +83,11 @@ class ReaderSettingsDialog : DialogFragment() {
fullscreen.setOnCheckedChangeListener { v, isChecked ->
preferences.fullscreen().set(isChecked)
}
+
+ crop_borders.isChecked = preferences.cropBorders().getOrDefault()
+ crop_borders.setOnCheckedChangeListener { v, isChecked ->
+ preferences.cropBorders().set(isChecked)
+ }
}
override fun onDestroyView() {
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PageView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PageView.kt
index 26326cb323..a75eaaee77 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PageView.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PageView.kt
@@ -70,6 +70,7 @@ class PageView @JvmOverloads constructor(context: Context, attrs: AttributeSet?
setRegionDecoderClass(reader.regionDecoderClass)
setBitmapDecoderClass(reader.bitmapDecoderClass)
setVerticalScrollingParent(reader is VerticalReader)
+ setCropBorders(reader.cropBorders)
setOnTouchListener { v, motionEvent -> reader.gestureDetector.onTouchEvent(motionEvent) }
setOnLongClickListener { reader.onLongClick(page) }
setOnImageEventListener(object : SubsamplingScaleImageView.DefaultOnImageEventListener() {
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReader.kt
index 3e3581cb11..d3c1f45890 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReader.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReader.kt
@@ -79,6 +79,12 @@ abstract class PagerReader : BaseReader() {
var transitions: Boolean = false
private set
+ /**
+ * Whether to crop image borders.
+ */
+ var cropBorders: Boolean = false
+ private set
+
/**
* Scale type (fit width, fit screen, etc).
*/
@@ -150,9 +156,16 @@ abstract class PagerReader : BaseReader() {
.distinctUntilChanged()
.subscribe { refreshAdapter() })
- add(preferences.enableTransitions()
+ add(preferences.pageTransitions()
.asObservable()
.subscribe { transitions = it })
+
+ add(preferences.cropBorders()
+ .asObservable()
+ .doOnNext { cropBorders = it }
+ .skip(1)
+ .distinctUntilChanged()
+ .subscribe { refreshAdapter() })
}
setPagesOnAdapter()
diff --git a/app/src/main/res/layout/dialog_reader_settings.xml b/app/src/main/res/layout/dialog_reader_settings.xml
index 67244208dd..2ac02900b6 100644
--- a/app/src/main/res/layout/dialog_reader_settings.xml
+++ b/app/src/main/res/layout/dialog_reader_settings.xml
@@ -165,6 +165,12 @@
android:layout_height="wrap_content"
android:text="@string/pref_show_page_number"/>
+
+
Цял екран
Заключи ориентацията
- Преходи
+ Преходи
Номер на страница
Персонализирана яркост
Персонализиран цветен филтър
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 40dbdadc7e..ff82bcd3e9 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -95,7 +95,7 @@
Pantalla completa
Bloquear orientación
- Habilitar transiciones
+ Habilitar transiciones
Mostrar el número de página
Utilizar brillo personalizado
Mantener la pantalla encendida
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 96a272ec9f..e9f448295a 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -115,7 +115,7 @@
Plein écran
Verrouiller l\'orientation
- Activer les transitions
+ Activer les transitions
Afficher le numéro de page
Utiliser une luminosité personnalisée
Utiliser un filtre de couleur personnalisé
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index f1dc9eaf72..ab7da63cd3 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -115,7 +115,7 @@
Schermo intero
Blocca orientamento
- Abilita transizioni
+ Abilita transizioni
Mostra numero di pagina
Usa luminosità personalizzata
Usa filtro colore personalizzato
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 6c9191347d..8bc775afab 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -100,7 +100,7 @@
Ocultar barra de estado
Bloquear orientação
- Permitir transições
+ Permitir transições
Mostrar número de página
Usar brilho personalizado
Manter ecrã ligado
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 363fd5a093..6eb73b1283 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -213,7 +213,7 @@
Отсылать отчеты о падениях
Проверять обновления
Автоматически проверять новые версии
- Включить переходы
+ Включить переходы
Полноэкранный режим
Декодер изображений
Масштабирование
diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml
index c300f1e838..0aec85aceb 100644
--- a/app/src/main/res/values-vi/strings.xml
+++ b/app/src/main/res/values-vi/strings.xml
@@ -118,7 +118,7 @@
Đầy màn hình
Khóa xoay
- Bật hiệu ứng chuyển trang
+ Bật hiệu ứng chuyển trang
Hiện số trang
Dùng độ sáng tùy chỉnh
Dùng bộ lọc màu tùy chỉnh
diff --git a/app/src/main/res/values/keys.xml b/app/src/main/res/values/keys.xml
index 8e672c3db4..4c2ea1549c 100644
--- a/app/src/main/res/values/keys.xml
+++ b/app/src/main/res/values/keys.xml
@@ -37,8 +37,10 @@
pref_red_filter_value
pref_reader_theme_key
image_decoder
+ crop_borders
reader_volume_keys
reader_tap
+
pref_filter_downloaded_key
pref_filter_unread_key
library_sorting_mode
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index d4e29f6fc8..cfc4d48664 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -120,8 +120,9 @@
Fullscreen
Lock orientation
- Enable transitions
+ Page transitions
Show page number
+ Crop borders
Use custom brightness
Use custom color filter
Keep screen on
diff --git a/app/src/main/res/xml/pref_reader.xml b/app/src/main/res/xml/pref_reader.xml
index ec3a5b63d6..4c59665d60 100644
--- a/app/src/main/res/xml/pref_reader.xml
+++ b/app/src/main/res/xml/pref_reader.xml
@@ -64,7 +64,7 @@
android:defaultValue="true" />
@@ -73,6 +73,11 @@
android:key="@string/pref_show_page_number_key"
android:defaultValue="true" />
+
+