mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fix: provide better UX for HTML color picker edit (#2942)
This commit is contained in:
parent
a8a07426b9
commit
0dd545fa15
2 changed files with 6 additions and 6 deletions
|
@ -5,6 +5,7 @@
|
|||
- Minor: Channel name in `<channel> has gone offline. Exiting host mode.` messages is now clickable. (#2922)
|
||||
- Minor: Added `/openurl` command. Usage: `/openurl <URL>`. Opens the provided URL in the browser. (#2461, #2926)
|
||||
- Bugfix: Fixed large timeout durations in moderation buttons overlapping with usernames or other buttons. (#2865, #2921)
|
||||
- Bugfix: Fix bad behavior of the HTML color picker edit when user input is being entered. (#2942)
|
||||
|
||||
## 2.3.3
|
||||
|
||||
|
|
|
@ -365,12 +365,11 @@ void ColorPickerDialog::initHtmlColor(LayoutCreator<QWidget> &creator)
|
|||
html->addWidget(htmlLabel, 0, 0);
|
||||
html->addWidget(htmlEdit, 0, 1);
|
||||
|
||||
QObject::connect(htmlEdit, &QLineEdit::textEdited,
|
||||
[=](const QString &text) {
|
||||
QColor col(text);
|
||||
if (col.isValid())
|
||||
this->selectColor(col, false);
|
||||
});
|
||||
QObject::connect(htmlEdit, &QLineEdit::editingFinished, [this] {
|
||||
const QColor col(this->ui_.picker.htmlEdit->text());
|
||||
if (col.isValid())
|
||||
this->selectColor(col, false);
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
Loading…
Reference in a new issue