-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Ported Action Bar
in Rust
#554
Conversation
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.
Apart from the one comment, it looks good
src/Library/demos/Action Bar/code.rs
Outdated
let start_widget: gtk::Button = workbench::builder().object("start_widget").unwrap(); | ||
let end_widget: gtk::Button = workbench::builder().object("end_widget").unwrap(); | ||
|
||
button.connect_clicked(move |button| { |
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.
You should use this function https://gtk-rs.org/gtk-rs-core/stable/0.18/docs/glib/object/trait.ObjectExt.html#tymethod.connect_notify_local with parameter "active" instead
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.
You should use this function https://gtk-rs.org/gtk-rs-core/stable/0.18/docs/glib/object/trait.ObjectExt.html#tymethod.connect_notify_local with parameter "active" instead
Made the changes :) and also added my name in the contributors list.
src/Library/demos/Action Bar/code.rs
Outdated
button.connect_notify_local(Some("active"), move |button, _| { | ||
action_bar.set_revealed(!button.is_active()); | ||
}); |
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.
Please make sure to always run the formatter before submitting your PRs.
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.
Please make sure to always run the formatter before submitting your PRs.
can you tell more about the formatter , i am a beginner and do not know about it , help will be much appreciated :)
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.
Workbench formats your snippets every time you run them.
All you have to do is run them once, and then copy the formatted code into src/Library/demos/Action Bar/code.rs
:)
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.
Workbench formats your snippets every time you run them. All you have to do is run them once, and then copy the formatted code into
src/Library/demos/Action Bar/code.rs
:)
i copied the exact code from the builder after running it , maybe a problem on my side, i will look into it and manually format it till i figure it out :)
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.
Screen recording
So you don't get this behavior?
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.
Screen recording So you don't get this behavior?
i build the development configuration again hopefully it will be resolved , i remember it formatted my poorly written checkbox code yesterday :)
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.
the formatter works correctly now, i formatted the code and thank you very much of reminding me about this feature and for helping me :)
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.
Are you sure? Line 10 still looks off.
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.
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.
Not sure why it didn't work out on your side, but I now formatted it myself.
Please check the implementation :) . and let me know of any anomalies.