Screensaver: improve sleep screen message - #13571
Conversation
|
Have a look at the infomessage class so that you avoid running through the https://github.com/koreader/koreader/blob/master/frontend/ui/widget/infomessage.lua#L182 |
|
If you want one line, don't press Enter. |
What i mean is, you might be unnecessarily running through the whole loop every time you lock the device, but you don't need to, as you would expect to not be a single line |
|
The "whole loop" of what? |
|
Yes, we reduce font size of long messages to fit to the screen. |
But I need to fit to the screen, even with multiple lines. koreader/frontend/ui/widget/infomessage.lua Line 187 in bf8adf2 force_one_line is not applicable if I pressed Enter.
|
|
Just saying make sure you don't end up here https://github.com/koreader/koreader/blob/master/frontend/ui/widget/infomessage.lua#L182 |
|
Sorry for my bad English, I don't understand you. |
|
koreader/frontend/ui/screensaver.lua Lines 692 to 698 in bf8adf2 Does that make sense? |
|
Sorry guys, a side question. |
The loop is required to fit the text in the max height. If the text contains "line-break" chars, koreader/frontend/ui/widget/infomessage.lua Line 182 in bf8adf2 |
Yes. What does your long text contain? |
@hius07 I wanted to ask about centered text instead of justified. On the screensaver screenshot in the OP, is it possible to have the text in each line centered? |
The lines are centered when the message position is "top" or "bottom". |
|
But for vertically centered position horizontal position is not available? :D Seems weird, but OK |
|
When I say avoid the loop, what i mean is avoid running it under |
(1) Because of long description, the input dialog buttons were overlapped with the keyboard.
Move description to the info message.
(2) Allow multiline messages. Closes #13559.
This change is