Commit ccee63c1 authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

Add support for "media" attribute of external CSS links

parent 80bf397c
Pipeline #950 passed with stage
in 23 seconds
......@@ -16,10 +16,12 @@ QByteArray QmlAbstractCssObject::outputMimeType (void) const {
QmlCssFileReference::QmlCssFileReference (QObject * parent)
: QmlAbstractCssObject (parent)
, m_link ("")
, m_media ("all")
{ }
void QmlCssFileReference::outputContent (QString & output) const {
output += QS ("<link rel=\"stylesheet\" type=\"text/css\" href=\"%1\" media=\"screen\" />").arg (m_link);
output += QS ("<link rel=\"stylesheet\" type=\"text/css\" href=\"%1\" media=\"%2\" />").arg (m_link).arg (m_media);
}
// CSS INLINE STYLE
......
......@@ -16,6 +16,7 @@ public:
class QmlCssFileReference : public QmlAbstractCssObject {
Q_OBJECT
QML_WRITABLE_CSTREF_PROPERTY (QString, link)
QML_WRITABLE_CSTREF_PROPERTY (QString, media)
public:
explicit QmlCssFileReference (QObject * parent = Q_NULLPTR);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment