-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] Persisting font size between Brackets Sessions #2848
Comments
Comment by WebsiteDeveloper i tested this and get an error like this return (new $.Deferred()).reject().promise() as to the persistent font size, it works great so thank you for that feature |
Comment by lkcampbell Thanks for finding the source of the CommandManager problem. It is odd that the behavior is different with one of the shortcuts but not the other two. I would expect the CommandManager to deal with all disabled commands without throwing an error. I will put together a repro and report a bug on this behavior. |
Comment by peterflynn
|
Comment by lkcampbell
The only other white space cleanups I kept are on the license. Those are legitimate cleanups. |
Comment by lkcampbell I have at least one more commit I want to do. I will let you all know when it is ready to look at again. |
Comment by lkcampbell
I selected font size 72 as the max. It's ridiculously large and also the font size limit on Windows Notepad. I addressed every bullet you mentioned directly and I believe I addressed the last bullet indirectly. The preference value fontSizeAdjustment has a default of zero already, so even if it isn't defined it will be zero. If the value is really large or really small, the min and max font size will take care of that situation. I believe that takes care of all of the possible values but let me know if there is a value I missed. |
Comment by lkcampbell Okay, it's ready to check again, thanks. |
Comment by redmunds Why do we need a max font size? If we do, I think a max font size of 72 (px) is not large enough. It might seem ridiculously large on your device, but 4K resolution monitors are starting to come out, so it won't seem so large on those. Maybe max font size is the height of the Brackets window? |
Comment by TomMalbran I believe this #2640 is the main reason for a max font size. So it could be good to investigate at which size brackets crashes and use a size smaller than that, and maybe check if other things affect this too. |
Comment by lkcampbell Ah, the slippery slope of selecting arbitrary values :). The max font size is to address the following issues: Also add an upper bound check here to fix issues #2640 and #994. |
Comment by lkcampbell Sorry hit the wrong button :( |
Comment by lkcampbell Perhaps we are running into a bit of scope creep on this pull request. If you like, I can roll back the max size code and just submit the font size persistence part. Then, after the merge, I can look into the max font size problem. |
Comment by redmunds OK, I guess 72 is a reasonable starting point. Ultimately, it needs to be defined in a json file, but we don't yet have default user preferences setup in a json file. |
Comment by RaymondLim Looks good to me. Merging. |
Issue by lkcampbell
Sunday Mar 03, 2013 at 07:37 GMT
Originally opened as adobe/brackets#3027
Here is the code to persist font size between Brackets Sessions per this discussion:
https://groups.google.com/forum/#!topic/brackets-dev/rYDR13sbhnk
In addition, I noticed a bug where the Increase, Decrease, and Restore Font Size commands remain enabled when there is no current document open in the editor. When I executed the commands, it threw errors into the Dev Tools console.
I fixed the bug but there is still a small problem I can't figure out. When the commands are disabled, I am still able to use the shortcut key for Decrease Font Size (Ctrl--) and throw a different error into the Dev Tools console. I don't know why it is still firing off after I disabled the command. Doesn't happen with the other two disabled commands. Any assistance or insight on this problem would be appreciated.
-- Lance.
lkcampbell included the following code: https://github.com/adobe/brackets/pull/3027/commits
The text was updated successfully, but these errors were encountered: