-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 database name and color options for unlock view #10819
base: develop
Are you sure you want to change the base?
Add database name and color options for unlock view #10819
Conversation
bf2081d
to
2592430
Compare
You should use the Qt color picker, see example here: keepassxc/src/gui/entry/EditEntryWidget.cpp Lines 1654 to 1687 in 9aa0406
|
2592430
to
b51c6e7
Compare
@droidmonkey let me know if there is anything else you need to make this mergeable. |
Seemed fine on first pass good work |
b51c6e7
to
3f9aba1
Compare
I made a ton of improvements and am trying to settle on one of the three views for the color. I like the middle one the best (it is the current one in the code): I changed the summary to be the database name and streamlined it into the main text on the unlock screen. If the name or color are not set then the unlock screen looks like it does before this change. |
3f9aba1
to
17e67d0
Compare
m_ui->displayColorLabel->setStyleSheet( | ||
QString("background: %1; border: 1px solid palette(dark); border-radius: 4px").arg(color)); | ||
|
||
// m_ui->centralStack->setStyleSheet(QString("QStackedWidget {border: 4px solid %1}").arg(color)); |
Check notice
Code scanning / CodeQL
Commented-out code Note
I quite like both the second and third ones, however I still quite like the original banner style and how in your face it was |
The original was ok, but looked like our warning/error banner to be honest. I wouldn't personally use this feature with the original look, but with the 2nd or 3rd I would. I also wanted to separate the database name from the color since some people would want one or the other. I'll let @phoerious weigh in before I make any more changes. |
Fixes #10783.
Adds two database configuration options (stored as public custom data) that allow a short summary text to be displayed on the database unlock screen. The user can specify both the message and an optional color which, if set, causes the summary to be displayed on a colored background with an appropriately contrasting text color.
The summary message is stored in
KPXC_PUBLIC_SUMMARY
and the color is stored inKPXC_PUBLIC_COLOR
.Screenshots
Testing strategy
I have extensively performed manual testing with different values of both the message (empty, short text, long text etc) and color (empty, varying colors, invalid colors etc). I've also tested opening/closing the database, starting keepassxc after it was the last DB opened etc to approach the unlock UI from different code paths.
Type of change