forked from quickshell/quickshell
service/notifications: use bytes over bits in pixmap rowstride check
Fixes incorrect rowstride warnings.
This commit is contained in:
parent
dfededc901
commit
448623de5a
1 changed files with 3 additions and 4 deletions
|
@ -42,10 +42,9 @@ const QDBusArgument& operator>>(const QDBusArgument& argument, DBusNotificationI
|
|||
} else if (channels != (pixmap.hasAlpha ? 4 : 3)) {
|
||||
qCWarning(logNotifications) << "Unable to parse pixmap as channel count is incorrect."
|
||||
<< "Got " << channels << "expected" << (pixmap.hasAlpha ? 4 : 3);
|
||||
} else if (rowstride != pixmap.width * sampleBits * channels) {
|
||||
} else if (rowstride != pixmap.width * channels) {
|
||||
qCWarning(logNotifications) << "Unable to parse pixmap as rowstride is incorrect. Got"
|
||||
<< rowstride << "expected"
|
||||
<< (pixmap.width * sampleBits * channels);
|
||||
<< rowstride << "expected" << (pixmap.width * channels);
|
||||
}
|
||||
|
||||
return argument;
|
||||
|
@ -55,7 +54,7 @@ const QDBusArgument& operator<<(QDBusArgument& argument, const DBusNotificationI
|
|||
argument.beginStructure();
|
||||
argument << pixmap.width;
|
||||
argument << pixmap.height;
|
||||
argument << pixmap.width * (pixmap.hasAlpha ? 4 : 3) * 8;
|
||||
argument << pixmap.width * (pixmap.hasAlpha ? 4 : 3);
|
||||
argument << pixmap.hasAlpha;
|
||||
argument << 8;
|
||||
argument << (pixmap.hasAlpha ? 4 : 3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue