add an offset on the Y axis to the panel protocol#89
Open
shrub900 wants to merge 1 commit into
Open
Conversation
This adds an option to offset the geometry of a panel by set amount of pixels New function provided and accesible via the protocol: set_y_offset
| break; | ||
| case SWC_PANEL_EDGE_LEFT: | ||
| x = screen->x; | ||
| y = screen->y + screen->height - view->height - panel->offset; |
Owner
There was a problem hiding this comment.
Should the left and right edges also consider y_offset? Right now offset is not always x offset but also behaves like y offset for left and right panels.
Maybe we could call it edge_offset and side_offset?
|
|
||
| <request name="set_y_offset"> | ||
| <arg name="offset" type="uint" /> | ||
| </request> |
Owner
There was a problem hiding this comment.
I was thinking we could just deprecate and rename set_offset, and add a new request that handles both edge and side offset.
In any case, the behavior we introduce here should be consistent and easily explained. As proposed, we have something like
- Top: offset is from left, y_offset is from top.
- Bottom: offset is from left, y_offset is from bottom.
- Left: offset is from bottom, y_offset doesn't do anything.
- Right: offset is from bottom, y_offset doesn't do anything.
Though also I think we're in agreement that we should just use layer shell, so maybe it's not worth worrying to much about this.
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.
This adds an option to offset the geometry of a panel by set amount of pixels
New function provided and accesible via the protocol: set_y_offset
this commit comes from neuswc: it allows the use of the mojito bar that was designed for neuswc with normal swc compositors like velox