Commit Graph

161 Commits (e7acec15261927eb5380813d85786b7b3108fc12)

Author SHA1 Message Date
poire-z d601eabc4a TextBoxWidget: optimize memory usage (#3904)
By reducing the number of data structures, and avoiding nested tables,
which seemed to impose a lot of work on the garbage collector.
6 years ago
poire-z eb613ace3e [chore] CoverBrowser: avoid page info code duplication (#3835)
Also allows full refresh with small diagonal swipe
of Menu instances (TOC, bookmarks)
6 years ago
onde2rock f893b01f04 [fix, UX] CoverBrowser: reset cursor (#3817)
Also don't show the underline before the first key move.
6 years ago
onde2rock 74a06d98a2 [chore] Code cleanup : deprecate the 'Enter' event, replaced with 'Press' (#3815)
'Escape' now do 'Back' on SDL
'Enter' now do 'Press' on SDL
6 years ago
onde2rock dfd87447da [UX] Make the reader bottom menu compatible with key navigation (#3785)
* [toggleswitch] Add support for key navigation to this widget

Add the onFocus an onUnfocus event handler
add a new function that just circle the switch if not touch event is
detected

* Add key navigation to the readermenu

The shortcut is still Alt-gr on sdl, to be defined on Kindle

* Remove the old method of handling the Press key.

Now the event is handled by the main widget who implement focusmanager
and then dispatched to the currently focused item.
Modify the fine font tuning only for non touch-devices

See : https://github.com/koreader/koreader/pull/3785#issuecomment-375306466
6 years ago
Frans de Jonge d0f1dee618 [UX, fix] ui/widget/menu: add onScreenResize action 6 years ago
onde2rock 5fcb804d47 Allow opening hold menu on non touch devices (#3765)
Emulate the hold touch behavior on non touch device by clicking the right key
ButtonTable: do not add vertical separator to the layout because the focus
manager can't traverse them. Add check to make disabled button non-clickable.
6 years ago
Robert 39738955f3 File manager: added 'Go to letter' (#3664)
When Hold on page number, allows for inputing letters to go to file
starting with them (and not only numbers to go to page number).
6 years ago
poire-z c0c243c41a Menu: don't underline items on touch devices (#3663)
First item would be underlined if the device is both Touch and Keys
capable (emulator, android, pocketboot...), which is not really
pretty. Delay that till Keys for focusing are really used.
6 years ago
Robert 9c373f138f Menu: speed up rendering of long texts (#3657)
Slowness mostly noticable in Bookmarks with long highlights
6 years ago
Robert 46e0f30b0a Proper page changes using the up and down keys (#3621) 6 years ago
Robert d163f8281d Menu: configure number of items per page, wrap entries (#3589)
Configure number of items per page (from 6 to 24) - default is 14
Allow filenames to wrap so that we can see the full name
Used by File browser, History, Search Result, Bookmarks, Table of contents (only single line), File chooser, OPDS catalog
6 years ago
poire-z 591dc2119c FileBrowser: optimize 'change page to show last file'
This feature, introduced some days ago, was actually
doing 2 updateItems calls: the initial one, and a second
to switch to focused_file page (cheap with classic display mode,
less cheap with CoverBrowser modes).
This change allows doing that in a single call.
7 years ago
poire-z 532c850cbd Menu (TOC, bookmarks): add padding before right text (#3350) 7 years ago
poire-z f90973f73a Allow for disabling flashing of menu, icons and buttons (#3339) 7 years ago
poire-z 430b61ba76 Small visual fixes to Menu (#3338)
Rationalize horizontal construction of Menu items (TOC,
Bookmarks, Classic file views) for more even padding.
Align "x" close button diagonaly with top right border and title.

Also add forgotten scale_for_dpi to MultiConfirmBox
7 years ago
poire-z c770d71f14 Fix Menu (TOC, classic file browser...) right padding (#3255) 7 years ago
Frans de Jonge a6be301695 Added Size module 7 years ago
Frans de Jonge 9eb073a524 [travis] Add protection against unscaled sizes
As pointed out by @poire-z

* [fix, UX] SkimToWidget scaling

* [fix] Button scaling

* [fix, UX] Scale ProgressWidget

* [fix, UX] Scale confirmbox

* [fix, UX] Scale just about everything
7 years ago
poire-z 4d18ac1100 Some History fixes and enhancements (#3247)
Made the onHold buttons table similar to the one of File browser.
Added "Purge .sdr" and "Delete" to these buttons.
Moved the purgeSettings and removeFileFromHistoryIfWanted
logic into filemanagerutil functions.
Stay on the same page when manipulating history (previously, we were
always put back on first page).
Really keep deleted files in history (unless setting says otherwise).
Show deleted files in grey or dimmed in classic History and all
CoverBrowser display modes.
7 years ago
poire-z 3dd18d2a3b Fix "start with history" misalignment
due to a side effect with coverbrowser. CenterContainer is no
more needed as History is now full screen.
7 years ago
robert00s 7919026a19 Fix: crash when incorrect value in input page number 7 years ago
Qingping Hou 23c2955500 chore: style cleanup for infomessage 7 years ago
Frans de Jonge e1aa57f27e Font: unify font styling 7 years ago
Bastien Dejean ee54e127b1 FileManager: replace arrows by ellipsis to indicate cut-off long filenames 7 years ago
Frans de Jonge bec5f46245 Merge pull request #2524 from Hzj-jie/master2
Add characters in menu items to indicate sub menus
7 years ago
Hzj_jie 18117584c0 Resolve review comments 7 years ago
Hzj_jie c33d1aa43b Use 25b9 instead of > 7 years ago
Hzj_jie fa848719ae > 7 years ago
Hzj_jie 98a86ba62f prepose plus signal 7 years ago
Hzj_jie c90a484d01 Add a + for menu items with sub menu 7 years ago
Hzj_jie f91ad679d9 swithItemTable -> switchItemTable 7 years ago
robert00s 7ff1731aab Fix #2326 7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
retrue eae730d140 Some uppercase fixes (#2421) 8 years ago
poire-z 0aa19d72a0 FileManager: show files with sidecar dir in bold (#2391)
docsettings : added hasSidecarDir() and made getSidecarDir() more robust
widget/menu : allow items to specify themselves to be displayed in bold
8 years ago
chrox 6ec30376a6 fix two crashes 8 years ago
Qingping Hou 11ee8d6fcc refactor: use new KeyValuePage widget for displaying statistics 8 years ago
Alex Pletnev a6ebbe9adb #1807 FR: Add separator into menu 8 years ago
Qingping Hou 4759def09c chore: fix static-check errors 8 years ago
chrox b0df6d53e9 add Basic Authentication for OPDS catalog
use coroutine to support ad-hoc callback in login button so that when
the username/password is incorrect it will retry automatically
currently tested with COPS on apache

This should fix #1001.
9 years ago
NiLuJe 6309df9dec Guard against nil text in menu widget
Allow one to go further in the FM's setting menu on legacy devices...
... and potentially shoot oneself in the foot because of the unusable
confirmdialogs (among other things ;p).
9 years ago
frankyifei d0a44b9152 style 9 years ago
frankyifei f7fb103abc loop menu pages when it reaches ends
the following graph shows my idea.

1->2->3->4->5->6->7->8->9->10
└----------------------------------------┘
9 years ago
NiLuJe c847807322 Turns out that also looks better as ui refreshes 9 years ago
NiLuJe 50dbf6b581 Switch a few widgets to ui refresh modes
More closely matches native behavior on REAGL devices.
Closing those widgets should still trigger a partial refresh though,
because we usually get back to the reader, and text, so we want REAGL
;).
9 years ago
chrox ebdd374c93 Add 'input page number' function in filemanager
by holding on the page info label at the buttom of the filemanager
9 years ago
chrox c6f6699644 fix empty menu widget won't trigger screen refresh
This should fix #1398.
9 years ago
Qingping Hou 6ed8f30f35 fix: empty item_table crashes menu widget 10 years ago
chrox b3d79b053a workaround to fix #1340 10 years ago
Hans-Werner Hilse ff0fbbdb4b fix widget closing 10 years ago
Hans-Werner Hilse 94ce08937a clean up refreshes
This is a larger clean-up of the refresh situation.
The general shift is that refreshes are now mainly triggered by
the (top-level) widgets when they get shown or closed via UIManager.

All refreshes for the widgets when they are in use were handled by
themselves before. This adds the case of showing/closing.

It is the desired result of not having UIManager:show()/:close()
do (full screen) refreshes on its own.
10 years ago
Hans-Werner Hilse f02be20a65 refresh fixes for the menus
this will only refresh the areas that actually need to be refreshed.
10 years ago
Hans-Werner Hilse 82c26b1f18 adapt widgets to new refresh/repaint API 10 years ago
chrox ca60ceacd0 make radius field respects popout flag 10 years ago
Hans-Werner Hilse 22697adf20 switch from scaleByDPI() to scaleBySize() 10 years ago
chrox d11dba0558 fix #1169 and #1170 10 years ago
Frans de Jonge d701d9b198 First util.template encapsulated strings 10 years ago
Hans-Werner Hilse 3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
10 years ago
Qingping Hou 394c847e2b fix(app): initilize menu properly in reader and filemanager 10 years ago
Qingping Hou d1627337e0 fix(ui): fix dynamic menu height calculation 10 years ago
Hans-Werner Hilse 5982e24d57 unify color specification
colors were a mixture of 4bpp integers (0=white, 15=black) and
fractional blackness levels (0=white, 1.0=black) before. This is
now unified to use the color specification of the Blitbuffer API.
10 years ago
chrox c994e30cff fix #1024
if toc item has expand/collapse state and tap select on the left side
the state switch action is triggered, otherwise goto the
linked page.
10 years ago
chrox 7c9130744c add collapsable TOC menu 10 years ago
Hans-Werner Hilse 7b1777e095 adapt widgets and text rendering to new font rendering
no background for text rendering anymore
10 years ago
chrox cf882a078a fix page number of sub-menu is not updated 10 years ago
chrox 69bb4a3df3 add return button in menu 10 years ago
chrox 2bec0017a0 refactor out global functions showHomePage and showReaderUI 10 years ago
chrox c74c258fc7 add filemanager icon in reader menu
now we can access the filemanager in all launcher configurations
10 years ago
WS64 dd70023c2c Add a parameter to swithItemTable to jump directly to this item 10 years ago
NiLuJe 8b6c5a2e2e Tweak the spacer appearance condition
Make it sync with the first/last icon, instead of always showing it.
Doesn't change much, since it's invisible, but, still, more correct this
way ;).
10 years ago
NiLuJe bd32e1f10a Add some breathing room to the FM icons.
In the form of a spacer icon between the first/last icon and the
next/prev one. Should help with fatfingeritis.
10 years ago
WS64 2968960a35 Filemanager: Added "first" and "last" page functionality 10 years ago
chrox f13a165c4b tweaks of font size 10 years ago
chrox b8626f6098 pass onClose gesture to Menu widget 10 years ago
chrox e624695d54 the Back key on Android should close the popup window and menu 10 years ago
chrox 857bd6fcc8 strings not shown on GUI will not be translated
This may encourage users in transifex to join Koreader project.
10 years ago
nicolua 90d9c3ddb1 menu on k3 10 years ago
chrox 5b99b478b2 fix not fully filled items in filechooser
reported by mobileread user @ignacy
10 years ago
chrox 877cff2933 invert button on tap 10 years ago
chrox 4a32f4415e use borderless flat bookmark/toc window 10 years ago
chrox ac396e3aa9 highlight current toc entry 10 years ago
chrox 92219a1f1e cleanup: expand tab to 4 spaces 10 years ago
chrox b3b0844f34 basic functionality on file copy/paste/cut/delete in filemanager
There file operations will popup when holding on file entries
in filemanager.
This should implement #244.
10 years ago
chrox b0d27a021d tweaks on menu font size 11 years ago
chrox 42c5ae2ac0 add option to display file size in filemanager
file size is not shown by default
11 years ago
chrox ea91cdb4be set title bar height to height of text widget in Menu widget
without the height of the close button widget
This will make room for one more menu item entry and fix #355 and #394.
The larger tap zone for close button widget is still there.
11 years ago
HW 748a443cd5 Merge remote-tracking branch 'upstream/master'
resolved conflicts with refactored structure
11 years ago
HW 2154e7e852 Further refactoring
This should finish the work to make all globals to local variables.
That allows LuaJIT to properly compile things by interning the
references to the relevant parts (rather than looking up globals
all the time which stops a trace).
11 years ago
HW ef111b99c6 Refactored to use strictly locals 11 years ago
Giorgio Micotti a7d545632a Nicer close button, solves #321. 11 years ago
chrox c829b01d67 fix onSelect revert on config and menu 11 years ago
chrox 5cc8fc4c10 update page info layout in menu
this should fix #281
11 years ago
chrox 3934176b6c emulator has keyboard now 11 years ago
chrox 1c728d6945 fix widget out-of-bound in bookmark and toc menus
The original menu layout needs manual dimension calculations
such as  white padding for displaying page information in
footer as the title, all item contents and footer are stacked
in one VerticalGroup. Out-of-bound error(koreader/koreader-base#43)
will occur in some corner cases if we missed something in
the calculation. The patch sent in this PR invented a new
layout for menu widget in which no manual calculation is needed
for displaying the footer. And the footer will be placed well
inside the menu frame.

   +--------------+
   | +----------+ |
   | |+--------+| |
   | || Header || |
   | |+--------+| |
   | |+--------+| |
   | ||  Item  || |
   | ||  Item  || |
   | |+--------+| |
   | |(Vertical | |
   | |  Group)  | |
   | +----------+ |
   |    Footer    |
   |(OverlapGroup)|
   +--------------+
11 years ago
Qingping Hou c951eacc35 fix: reset current page on item_table switch for menu widget 11 years ago
Qingping Hou c66429c903 add is_popout and no_title to menu widget 11 years ago
Qingping Hou a0676790cd fix unnecessary frontlight module require 11 years ago
Giorgio Micotti cea353323e Initial light control widget; final fixes for kobo light 11 years ago
chrox 1520fd7974 add page up/down buttons in menus that have more than one pages 11 years ago