| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9f47f37 commit 90f66fe
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -353,13 +353,6 @@ void HudWindow::resizeEvent(QResizeEvent* event) | |||
| 353 | 353 | // resize. We do this because applying a blur effect to the drop | |
| 354 | 354 | // shadow is computationally expensive. | |
| 355 | 355 | ||
| 356 | - // First, draw the shadow, using a pleasant gradient. | ||
| 357 | - QLinearGradient shadowGradient; | ||
| 358 | - shadowGradient.setStart(rect().width() / 2, 0.0); | ||
| 359 | - shadowGradient.setFinalStop(rect().width() / 2, rect().height()); | ||
| 360 | - shadowGradient.setColorAt(0.0, QColor(0, 0, 0, 20)); | ||
| 361 | - shadowGradient.setColorAt(1.0, QColor(0, 0, 0, 200)); | ||
| 362 | - | ||
| 363 | 356 | QImage unblurredImage | |
| 364 | 357 | ( | |
| 365 | 358 | rect().width(), | |
@@ -371,8 +364,8 @@ void HudWindow::resizeEvent(QResizeEvent* event) | |||
| 371 | 364 | QPainter painter(&unblurredImage); | |
| 372 | 365 | painter.setRenderHint(QPainter::Antialiasing); | |
| 373 | 366 | painter.setPen(QPen(Qt::NoPen)); | |
| 374 | - painter.setBrush(QBrush(shadowGradient)); | ||
| 375 | - painter.drawRoundedRect(rect().adjusted(10, 10, -10, -8), 5, 5); | ||
| 367 | + painter.setBrush(QBrush(QColor(0, 0, 0, 200))); | ||
| 368 | + painter.drawRoundedRect(rect().adjusted(10, 12, -10, -8), 5, 5); | ||
| 376 | 369 | painter.end(); | |
| 377 | 370 | ||
| 378 | 371 | // Now we need to blur the shadow onto its final destination image, | |
@@ -390,7 +383,7 @@ void HudWindow::resizeEvent(QResizeEvent* event) | |||
| 390 | 383 | painter.setRenderHint(QPainter::Antialiasing); | |
| 391 | 384 | ||
| 392 | 385 | // Note that the blur only applies to the alpha channel. | |
| 393 | - qt_blurImage(&painter, unblurredImage, 20, true, true); | ||
| 386 | + qt_blurImage(&painter, unblurredImage, 18, true, true); | ||
| 394 | 387 | painter.end(); | |
| 395 | 388 | } | |
| 396 | 389 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments