-
Notifications
You must be signed in to change notification settings - Fork 3
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
Brig/scaling redux #88
Merged
lehitoskin
merged 17 commits into
lehitoskin:master
from
IonoclastBrigham:brig/scaling-redux
Jun 22, 2018
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9c464f9
First pass, use dc<%> scaling for zoom.
IonoclastBrigham 1d4310a
Resolves a contract issue in del-embed-tags!.
IonoclastBrigham a6029d7
Second pass, use dc<%> scaling for zoom.
IonoclastBrigham a32a160
Refactors zoom menu.
IonoclastBrigham c282eba
Expands zoom menu à la Firefox.
IonoclastBrigham 06f613e
Adds zoom level to status bar.
IonoclastBrigham b905f89
Refactors zoom buttons to use DC zoom.
IonoclastBrigham 972a77d
Void out menu separators to avoid contaminating stdout.
IonoclastBrigham ded058f
Special zoom status label for fit, hidden for 1X.
IonoclastBrigham 9f7c578
Make zoom-to-fit "sticky" when resizing the window.
IonoclastBrigham 557fcbe
WIP: commenting code to disable image rescaling.
IonoclastBrigham 7f54917
WIP: enable dc-zoom on image load, fix centering bug.
IonoclastBrigham 77aa9cc
Adds center-fit zoom mode as default when loading image.
IonoclastBrigham f9af220
First pass, reenable scrollbars for dc-zoom.
IonoclastBrigham 1973e1e
Second pass, reenable scrollbars for dc-zoom.
IonoclastBrigham e51d9a6
Factors out ivy-canvas% to its own source file, more modular.
IonoclastBrigham 9531217
Changes equality operator to work with booleans.
IonoclastBrigham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of passing
set-fullscreen
andtoggle-fullscreen
as initialization parameters to the canvas? Wouldn't it be more appropriate todefine/public
them as member functions of the class?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if you look at what those functions actually do, you couldn't make them member functions, as-is. The two callbacks you mention, for example operate on the
ivy-frame
instance, which theivy-canvas%
class doesn't know anything about, per se.We could call
get-parent
, but the frame may not always be the direct parent of the canvas. I'd be pretty bummed about a solution where fullscreen stopped working depending on where the canvas was in the layout hierarchy. Perhapsget-top-level-window
would work here?Really, though, the only reason the canvas wants to know about any of this at all is that it's the one intercepting the fullscreen accelerator keys. What would probably be a cleaner solution would be to expose more general on-key callbacks that can be registered from the outside, instead of the canvas knowing/caring about fullscreen stuff at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. That makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So short answer is there's a good, technical reason for it, but there's also a couple of alternatives that might be better but will require extra work. Guidance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to say that having those be member functions is the "better" approach, since
get-top-level-window
will return the ivy frame, in this case.