Replaced deprecated QColorDialog::getRgba by QColorDialog::getColor

This commit is contained in:
thunder2 2025-07-21 23:28:21 +02:00
parent 990f4dbf09
commit bdae3b35b4
3 changed files with 9 additions and 12 deletions

View file

@ -1507,10 +1507,9 @@ void ChatWidget::on_markButton_clicked(bool bValue)
void ChatWidget::chooseColor()
{
bool ok;
QRgb color = QColorDialog::getRgba(currentColor.rgba(), &ok, window());
if (ok) {
currentColor = QColor(color);
QColor color = QColorDialog::getColor(currentColor, window(), "", QColorDialog::ShowAlphaChannel);
if (color.isValid()) {
currentColor = color;
PeerSettings->setPrivateChatColor(chatId, currentColor.name());
colorChanged();
setColorAndFont(false);