Details
-
Suggestion
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.0.1
-
None
Description
It would be nice to be able to have (non-circular) gradients. This would allow, for example, QtWebkit to correctly render the -webkit-radial-gradient CSS function:
#include <QApplication> #include <QMainWindow> #include <QWebView> int main(int argc, char *argv[]) { QApplication a(argc, argv); QMainWindow w; w.resize(300, 210); w.show(); QWebView view(&w); view.resize(w.width(), w.height()); view.load(QUrl("file:///home/micurtis/dev/test/webkit/ellipse-issue.html")); view.show(); return a.exec(); }
ellipse-issue.html:
<html> <header></header> <body> <div class="xc-Ellipse" style="position: absolute; pointer-events: none; height: 139px; width: 186px; left: 57px; top: 35px; visibility: visible;"><div id="xgen_6" style="top: 0px; left: 0px; width: 185px; height: 138px; background-image: -webkit-radial-gradient(50% 50%, ellipse contain, rgba(150, 175, 207, 0.8), rgba(0, 0, 0, 0.8) 20%, rgba(255, 255, 0, 0.8) 57.142857140000004%, rgba(0, 0, 0, 0.8) 83.11688312%, rgb(255, 0, 0)); background-clip: border-box; border: 1px solid rgb(0, 0, 0); border-top-left-radius: 93px 69.5px; border-top-right-radius: 93px 69.5px; border-bottom-right-radius: 93px 69.5px; border-bottom-left-radius: 93px 69.5px;"></div></div> </body> </html>
Attached is a failed attempt at achieving this using QRadialGradient.