-
Notifications
You must be signed in to change notification settings - Fork 141
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
Introduced password input widget #1662
Introduced password input widget #1662
Conversation
Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
Nice. Maybe we can reduce duplicated code even more by having a widget that unifies the two password lineEdits and the related labels. This would involve these steps:
|
Signed-off-by: Chirag Aggarwal <[email protected]>
So a QWidget? What do you think about a |
For the one containing multiple Widgets yes.
Together with the min password length this spreads password validation rules over multiple places and classes. |
Signed-off-by: Chirag Aggarwal <[email protected]>
Can you please take a look at the use of translation? |
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.
This is looking like what I had in mind. How Vorta uses the password inputs makes it hard to move it into its own class. Although inheriting QWdiget
would be nice, it doesn't make much sense for this use. I think inheriting QObject
would be better. This makes PasswordInput
a manager of widgets instead of a widget itself.
…s, removed passwordLabelChanged Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
…tion to methods Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
…eck for creating PasswordInput instead remove in subclass Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
Hey, thanks for removing some duplicate code here. Just tried it locally and noticed this:
|
Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
Fixed in new commits. Also resolved merge conflicts. |
The show/hide icon state works as expected now. Just for the "Add Existing Repo" dialog, there may be a fixed height set, which squeezes the lines a bit. I know we wanted to reduce the extra space a bit, but this needs to be done without settings a fixed height on the dialog window, but by editing the ?vertical space element within it. (I know Qt can be fickle). |
Ah, it doesn't happen on OS and UI I'm testing on. I'll fix that. |
@m3nu Without changing fixed height, do you want to expand the inner widget? I enabled |
Signed-off-by: Chirag Aggarwal <[email protected]>
Sorry I'm still unsure what you are proposing. I don't think inner widget has a fixed height but because main layout has fixed height, it's expanding. The fixed height seems to be based on Add new repo so can we use a lower fixed height for this dialog? 92608f9#diff-804dae53d409307e28853c1c80251c625c13f04bd7b0037ef30dc99fe347a77dR10 |
If possible we shouldn't use fixed heights when creating a GUI. |
Signed-off-by: Chirag Aggarwal <[email protected]>
Okay so I've removed the fixed size property and added some margin. I've also set a min width otherwise existing repo dialog would be quite smaller than the new repo dialog. Let me know if I understood it correctly. |
Sounds good, I'll test it when I find the time. |
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, fixing it. |
Signed-off-by: Chirag Aggarwal <[email protected]>
Fixed the red border. Is that white text an issue with this widget or the theme? |
Signed-off-by: Chirag Aggarwal <[email protected]>
Both is fixed now. On my desktop the text is white and the background black. |
Description
Added a new PasswordInput widget for PyQt to improve functionality and reusability.
Not completed and looking for feedback.
Related Issue
Originally posted by @real-yfprojects in #1659 (comment)
Screenshots (if appropriate):
visiblity toggle:
validation error (min length):
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.