-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Add a uri
property to LinkButton
#30675
Conversation
082053b
to
ec8fe74
Compare
5dd6280
to
5d3ce87
Compare
b158b59
to
7d5d358
Compare
@zaksnet Is this still desired? If so, it needs to be rebased on the latest master branch. |
7d5d358
to
bc3f5ab
Compare
4e23add
to
bc3f5ab
Compare
7ea3eca
to
06d4016
Compare
Alright this finaly seems to be working: Just as a reminder, all this PR does is adding the Url parameter for the LinkButton. This is convenient because all the user has to do is enter the url in the editor. Otherwise to get the same result you'd have to create a script and export a variable to the editor. |
EDIT: NVM, i get them with any project when i open/close it a couple of times. |
06d4016
to
0292d47
Compare
You mean like
instead of
? btw by connecting |
7442879
to
6033cb0
Compare
@aaronfranke @Calinou This is ready for review |
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.
Just a documentation review as I crossed this PR.
I'd suggest overriding the virtual I'm also not convinced about the usefulness of the |
6033cb0
to
b1fe266
Compare
b1fe266
to
cfcc47d
Compare
url
property to LinkButton
uri
property to LinkButton
cfcc47d
to
3faaf98
Compare
I force pushed an update to solve merge conflicts, and do some further improvements to the docs, and clean up of unused methods added to the header. I also changed the I don't mind changing back to |
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
3faaf98
to
d73a9b5
Compare
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.
Tested and it seems to work fine.
One thing I thought might be expected for some users would be to set the URI as tooltip for the LinkButton, but if this is implemented it might have to be opt-out (e.g. a uri_as_tooltip
bool property). But let's wait first to see if some users actually request it.
Changes done.
Thanks! |
Cherry-picked for 3.6. |
This is useful when you want to add link buttons through code (simplifies things) and anyway without this
linkButton
is just a button with an underline. I tried connecting thepressed
signal instead of launching the URL from the draw event but i couldn't figure it out, any guidance is appreciated. Also documentedlinkButton.xml
If this is going to get merged it would be nice to add:
I wouldn't bother otherwise since you can do all this with a button already, but since this exists, we could improve it.
EDIT: Changed keyword from
Link
toUrl
since its more proper in this case (link most of the times implies a website URL, while URL can be anything from websites, file paths to system paths or even UNC network paths). Also addedlaunch_url
to manually launch theUrl
. @akien-mga please review.