-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Replace some layout proc-macros with by-example macros over named widgets #476
+1,238
−918
Conversation
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
These are no longer used
This is useless except for documentation
This greatly improves error messages when a method call in widget layout syntax is unmatched.
Also impl From<Rgb> and FromStr for Background
Direct implementation of fn Tile::nav_next is simple enough in all cases where this macro was used.
Also moves float! macro to kas::widgets
Also restrict widget_set_rect! expansion to fn Layout::set_rect, allow optional definition of fn Tile::rect and adjust GripPart code.
If needed, these could be replaced with by-example marcros in kas_widgets, perhaps using feature macro_metavar_expr.
This feature is no longer applicable to anything
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.
The primary change is to replace the following proc-macros with by-example macros in
kas_widgets
over named widgets:column!
,row!
,list!
,grid!
,aligned_column!
,aligned_row!
frame!
macro and methodfn Frame::with_background
button!
macroFloat
widget and replacedfloat!
proc-macroalign
andpack
method call on string literals incollection!
to match widget layout syntaxAdditional changes:
'name
named storage fields which no longer have any usagefn AdaptWidget::with_state
to construct anAdapt
nodefn Tile::rect
optional, requiring usage ofwidget_set_rect!
withinLayout::set_rect
recursive-layout-widgets
(no longer applicable to anything)