Skip to content
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

Enable antialiasing for reply button #5491

Merged
merged 4 commits into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Minor: Add channel points indication for new bits power-up redemptions. (#5471)
- Minor: Added `/warn <username> <reason>` command for mods. This prevents the user from chatting until they acknowledge the warning. (#5474)
- Minor: Introduce HTTP API for plugins. (#5383)
- Minor: Improve appearance of reply button. (#5491)
- Bugfix: Fixed tab move animation occasionally failing to start after closing a tab. (#5426)
- Bugfix: If a network request errors with 200 OK, Qt's error code is now reported instead of the HTTP status. (#5378)
- Bugfix: Fixed restricted users usernames not being clickable. (#5405)
Expand Down
1 change: 1 addition & 0 deletions src/messages/layouts/MessageLayoutElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ void ImageWithCircleBackgroundLayoutElement::paint(
if (pixmap && !this->image_->animated())
{
QRectF boxRect(this->getRect());
painter.setRenderHint(QPainter::Antialiasing);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be changed to the value it had before, after calling drawPixmap (probably best to read it before calling setRenderHint rather than pushing the state).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and added QPainter::save and QPainter::restore calls around every message layout element paint in a4daddf

Copy link
Contributor Author

@dnsge dnsge Jul 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

painter.setPen(Qt::NoPen);
painter.setBrush(QBrush(this->color_, Qt::SolidPattern));
painter.drawEllipse(boxRect);
Expand Down
Loading