Feature to change preview font size for plain/text files.#190
Open
34x wants to merge 5 commits intohaiwen:masterfrom
Open
Feature to change preview font size for plain/text files.#19034x wants to merge 5 commits intohaiwen:masterfrom
34x wants to merge 5 commits intohaiwen:masterfrom
Conversation
…elf because it's required also for changing font and that way logic will be a bit more clear
… font settings value
Member
|
thanks for contributing to the project and make the app better |
|
Agreed, this looks very nice. Incidentally, when you hit the back button you can see that the default iOS text rendering has the table view cell labels collapsed/clipped vertically. Can you confirm you're using Xcode 9? I'd posted the clipping as #187, and we do have a branch that has those fixed too, but I'm not yet sure if there's appetite for a larger MR yet. Just looking to confirm what you see. |
Author
|
@scottcc Yes, I am using Xcode 9 and table cells look weird (like half collapsing). |
|
Thanks, yeah. From what we've seen, it has to do with the top-to-bottom constraints within that cell. Appreciate the confirmation! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi!
First of all thank you for the app and server!
In short what this pr doing:
And details:
One of my way to use Seafile on iOS it's reading and editing text files. I am using iPhone SE and standard WebView font size sometimes very difficult to read so I decided to contribute a bit to the project.
This PR contains from 2 major parts:
View element that display quick settings for changing font size (it's small orange box on the right bottom corner with the arrow). I decided to create this instead of putting this to common settings for two reasons: the first one - I found it's not easy to understand philosophy of settings screen at all and the second is that's much more intuitive to change font size right in context of viewing a file.
The second part is about actually changing the font and storing it between app launches. For storing data I used
[NSUserDefaults standardUserDefaults]but not sure if it's correct or not, because in some places app uses defaults for domain and in some - standard.For handling changes I added observer for this property in user defaults.
And for actually setting font size I used js string
document.body.style.fontSize = '%@';in thewebView. Sizes are provided in%to reflect user defined settings for the system fonts and default value is100%.Bugs: I found that with some sizes update did not work (for example when font size changed from 400% to 420% then to 440% e.t.c.) but after closing the view and opening it again it uses correct size. I am not sure why it happens, maybe some MobileSafari specific.
Best regards
Maks