General improvements (#316)
* Added support for right text alignment in epub reader * Added tabs management to PDF navigation drawer * Implemented unified selection menu placement logic * Added reset functionality for toolbar customization * Improved highlight filtering in epub pagination * Migrated hardcoded UI strings to string resources * Extracted desktop application logic from Main.kt into modular files * Refactored Main.kt by extracting PDF and EPUB logic into specialized files * Added Spanish language support * Added system default option to app language selection
This commit is contained in:
parent
759d4b73a0
commit
056485a140
77 changed files with 9184 additions and 5947 deletions
|
|
@ -160,4 +160,36 @@ class PdfReaderSettingsAndSharedModelsTest {
|
|||
assertTrue(width >= 1)
|
||||
assertTrue(height >= 1)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `pdf toolbar reset defaults match first-run toolbar defaults`() {
|
||||
assertEquals(
|
||||
setOf(PdfReaderTool.SCREEN_ORIENTATION.name, PdfReaderTool.HIGHLIGHT_ALL.name),
|
||||
defaultPdfHiddenTools()
|
||||
)
|
||||
assertEquals(PdfReaderTool.entries.toList(), defaultPdfToolOrder())
|
||||
assertEquals(
|
||||
PdfReaderTool.entries.filter { it.category == "Bottom Bar" }.map { it.name }.toSet(),
|
||||
defaultPdfBottomTools()
|
||||
)
|
||||
|
||||
val defaultItems = buildPdfToolbarItems(
|
||||
hiddenTools = defaultPdfHiddenTools(),
|
||||
toolOrder = defaultPdfToolOrder(),
|
||||
bottomTools = defaultPdfBottomTools()
|
||||
)
|
||||
|
||||
assertEquals(
|
||||
PdfToolbarSection.HIDDEN,
|
||||
defaultItems.single { it.tool == PdfReaderTool.SCREEN_ORIENTATION }.section
|
||||
)
|
||||
assertEquals(
|
||||
PdfToolbarSection.HIDDEN,
|
||||
defaultItems.single { it.tool == PdfReaderTool.HIGHLIGHT_ALL }.section
|
||||
)
|
||||
assertEquals(
|
||||
PdfToolbarSection.BOTTOM,
|
||||
defaultItems.single { it.tool == PdfReaderTool.SLIDER }.section
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue