-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I modify arrow of page overlap function? #9181
Comments
There is not setting for this in the menus, the icon and size are hardcoded. Currently, you could just override the icon used (control.expand.alpha) with something different, which must be a SVG file, that you could drop in a (create this directoty) koreader/icons/ by giving it the name control.expand.alpha.svg. koreader/frontend/apps/reader/modules/readerview.lua Lines 114 to 120 in 5bcd3d0
Once #9104 is merged (soon), you could hack the above bit code that builds the thing to give it another name and size. Something like this, put in local IconWidget = require("ui/widget/iconwidget")
local ReaderView = require("apps/reader/modules/readerview")
local addWidgets_orig = ReaderView.addWidgets
ReaderView:addWidgets = function(self)
-- Run original code
addWidgets_orig(self)
local arrow_size = Screen:scaleBySize(16 * 2)
self.arrow = IconWidget:new{
icon = "the_name_of_my_svg_file",
width = arrow_size,
height = arrow_size,
alpha = true, -- or false, if you don't want transparency with your big solid black icon
}
end |
thanks for the reply, I'll try to modify the image control.expand.alpha , also the size. |
I made these modifications to the icon file: 1- increase size to 32*32 , 2- add some white space to above and below 3- fill background with solid white (only left part), 2- made arrow %100 black. modified the code to be able to use the icon with size 32 (as descirbed above) |
Feel free to share its code here :) |
Oh, I mean with the code you already shared |
Oh, right, I posted some code :) I haven't tested it, I see that it is missing something at top: |
To test the user patches I switched to Developer Upgrade mode, Now when It restarts it says:
Unfortunately I don't know how to look at the error logs if any. |
there should be a file |
It says: 5th line: I didn't get the reason of error, if you have an idea I can try :) |
Right. Replace this |
Yes this fixed the problem, thanks appreciated your help on this. Here is the working patch: |
When I read PDFs with two columns page overlap function makes it better to read docs. I want to add some white and black border to arrow to make it more visible at first sight . Where can I find it? is it customizable? Is there a way to do this? Thanks .
The text was updated successfully, but these errors were encountered: