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
|
|
@ -198,4 +198,29 @@ class EpubReaderBridgeAndControlsTest {
|
|||
assertTrue(ReaderTool.entries.any { it.category == "Overflow Menu" })
|
||||
assertEquals("Top Bar", ReaderTool.SCREEN_ORIENTATION.category)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `reader toolbar reset defaults match first-run toolbar defaults`() {
|
||||
assertEquals(setOf(ReaderTool.SCREEN_ORIENTATION.name), defaultReaderHiddenTools())
|
||||
assertEquals(ReaderTool.entries.toList(), defaultReaderToolOrder())
|
||||
assertEquals(
|
||||
ReaderTool.entries.filter { it.category == "Bottom Bar" }.map { it.name }.toSet(),
|
||||
defaultReaderBottomTools()
|
||||
)
|
||||
|
||||
val defaultItems = buildReaderToolbarItems(
|
||||
hiddenTools = defaultReaderHiddenTools(),
|
||||
toolOrder = defaultReaderToolOrder(),
|
||||
bottomTools = defaultReaderBottomTools()
|
||||
)
|
||||
|
||||
assertEquals(
|
||||
ToolbarSection.HIDDEN,
|
||||
defaultItems.single { it.tool == ReaderTool.SCREEN_ORIENTATION }.section
|
||||
)
|
||||
assertEquals(
|
||||
ToolbarSection.BOTTOM,
|
||||
defaultItems.single { it.tool == ReaderTool.SLIDER }.section
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue