mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-03 09:17:50 +03:00
improve autocalculationss for mask/blur regions
--this fix provides more accurate roundness masks based on user preference
This commit is contained in:
parent
4d1fbfd584
commit
b6a38e3830
@ -433,8 +433,8 @@ const CornerRegions &Theme::cornersMask(const int &radius)
|
|||||||
int axis = (2 * radius) + 2;
|
int axis = (2 * radius) + 2;
|
||||||
QImage cornerimage(axis, axis, QImage::Format_ARGB32);
|
QImage cornerimage(axis, axis, QImage::Format_ARGB32);
|
||||||
QPainter painter(&cornerimage);
|
QPainter painter(&cornerimage);
|
||||||
//!does not provide valid masks
|
//!does not provide valid masks ?
|
||||||
//painter.setRenderHints(QPainter::Antialiasing);
|
painter.setRenderHints(QPainter::Antialiasing);
|
||||||
|
|
||||||
QPen pen(Qt::black);
|
QPen pen(Qt::black);
|
||||||
pen.setStyle(Qt::SolidLine);
|
pen.setStyle(Qt::SolidLine);
|
||||||
@ -454,7 +454,7 @@ const CornerRegions &Theme::cornersMask(const int &radius)
|
|||||||
for(int x=0; x<radius; ++x) {
|
for(int x=0; x<radius; ++x) {
|
||||||
QRgb point = line[x];
|
QRgb point = line[x];
|
||||||
|
|
||||||
if (QColor(point) == Qt::black) {
|
if (QColor(point) != Qt::white) {
|
||||||
bits = bits + "1 ";
|
bits = bits + "1 ";
|
||||||
width = qMax(0, x);
|
width = qMax(0, x);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user