mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
修复single样式下图片居中显示异常bug (#4491)
Some checks are pending
Test Build / prepare (push) Waiting to run
Test Build / build (app, release) (push) Blocked by required conditions
Test Build / build (app, releaseA) (push) Blocked by required conditions
Test Build / prerelease (push) Blocked by required conditions
Test Build / lanzou (push) Blocked by required conditions
Test Build / test_Branch (push) Blocked by required conditions
Test Build / telegram (push) Blocked by required conditions
Some checks are pending
Test Build / prepare (push) Waiting to run
Test Build / build (app, release) (push) Blocked by required conditions
Test Build / build (app, releaseA) (push) Blocked by required conditions
Test Build / prerelease (push) Blocked by required conditions
Test Build / lanzou (push) Blocked by required conditions
Test Build / test_Branch (push) Blocked by required conditions
Test Build / telegram (push) Blocked by required conditions
* 当图片格式设置为single时,图片居中显示。 * 优化单图模式下标题的显示位置优化了标题威之居中 * 修复single样式下图片居中显示异常bug
This commit is contained in:
@@ -394,12 +394,6 @@ object ChapterProvider {
|
||||
durY = 0f
|
||||
}
|
||||
|
||||
// 图片居中:调整 X 坐标
|
||||
if (width < visibleWidth) {
|
||||
val adjustWidth = (visibleWidth - width) / 2f
|
||||
absStartX += adjustWidth.toInt() // 将起始 X 坐标移至居中位置
|
||||
}
|
||||
|
||||
// 图片竖直方向居中:调整 Y 坐标
|
||||
if (height < visibleHeight) {
|
||||
val adjustHeight = (visibleHeight - height) / 2f
|
||||
|
||||
@@ -366,12 +366,6 @@ class TextChapterLayout(
|
||||
durY = 0f
|
||||
}
|
||||
|
||||
// 图片居中:调整 X 坐标
|
||||
if (width < visibleWidth) {
|
||||
val adjustWidth = (visibleWidth - width) / 2f
|
||||
absStartX += adjustWidth.toInt() // 将起始 X 坐标移至居中位置
|
||||
}
|
||||
|
||||
// 图片竖直方向居中:调整 Y 坐标
|
||||
if (height < visibleHeight) {
|
||||
val adjustHeight = (visibleHeight - height) / 2f
|
||||
|
||||
Reference in New Issue
Block a user