diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-08-07 01:14:06 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-08-07 01:14:06 (GMT) |
commit | 14466ace2ffe1b6707b1120ab76d0baa49635007 (patch) | |
tree | 1bc0ac698049219ff1f8b25c1b071afbe2819af7 | |
parent | 844a1c12dfcd9c78b9647993c4dac573fb5ecd44 (diff) | |
parent | aef0f96295cefdaa6e8e799733892aa00987226c (diff) | |
download | Qt-14466ace2ffe1b6707b1120ab76d0baa49635007.zip Qt-14466ace2ffe1b6707b1120ab76d0baa49635007.tar.gz Qt-14466ace2ffe1b6707b1120ab76d0baa49635007.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r-- | demos/declarative/flickr/content/Progress.qml | 4 | ||||
-rw-r--r-- | demos/declarative/flickr/content/Slider.qml | 6 | ||||
-rw-r--r-- | src/declarative/fx/qfxlayoutitem.cpp | 3 | ||||
-rw-r--r-- | src/declarative/fx/qfxscalegrid.cpp | 6 | ||||
-rw-r--r-- | src/declarative/fx/qfxscalegrid_p.h | 2 |
5 files changed, 13 insertions, 8 deletions
diff --git a/demos/declarative/flickr/content/Progress.qml b/demos/declarative/flickr/content/Progress.qml index ae6bb18..4268963 100644 --- a/demos/declarative/flickr/content/Progress.qml +++ b/demos/declarative/flickr/content/Progress.qml @@ -6,7 +6,7 @@ Item { property var progress: 0 Rect { - id: Container; anchors.fill: parent + id: Container; anchors.fill: parent; smooth: true border.color: "white"; border.width: 0; radius: height/2 - 2 gradient: Gradient { GradientStop { position: 0; color: "#66343434" } @@ -18,7 +18,7 @@ Item { id: Fill y: 2; height: parent.height-4; x: 2; width: Math.max(parent.width * progress - 4, 0); - opacity: width < 1 ? 0 : 1 + opacity: width < 1 ? 0 : 1; smooth: true gradient: Gradient { GradientStop { position: 0; color: "lightsteelblue" } GradientStop { position: 1.0; color: "steelblue" } diff --git a/demos/declarative/flickr/content/Slider.qml b/demos/declarative/flickr/content/Slider.qml index 0c15ec6..51385bc 100644 --- a/demos/declarative/flickr/content/Slider.qml +++ b/demos/declarative/flickr/content/Slider.qml @@ -16,16 +16,16 @@ Item { gradient: Gradient { GradientStop { position: 0.0; color: "#66343434" } GradientStop { position: 1.0; color: "#66000000" } - } + } } Rect { - id: Handle + id: Handle; smooth: true x: Slider.width / 2 - Handle.width / 2; y: 2; width: 30; height: Slider.height-4; radius: 6 gradient: Gradient { GradientStop { position: 0.0; color: "lightgray" } GradientStop { position: 1.0; color: "gray" } - } + } MouseRegion { anchors.fill: parent; drag.target: parent diff --git a/src/declarative/fx/qfxlayoutitem.cpp b/src/declarative/fx/qfxlayoutitem.cpp index 446a8d7..1f814e8 100644 --- a/src/declarative/fx/qfxlayoutitem.cpp +++ b/src/declarative/fx/qfxlayoutitem.cpp @@ -78,7 +78,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,LayoutItem,QFxLayoutItem) */ QFxLayoutItem::QFxLayoutItem(QFxItem* parent) - : QFxItem(parent), m_maximumSize(INT_MAX,INT_MAX), m_preferredSize(100,100), m_minimumSize(0,0) + : QFxItem(parent), m_maximumSize(INT_MAX,INT_MAX), m_minimumSize(0,0), m_preferredSize(100,100) { setGraphicsItem(this); } @@ -93,6 +93,7 @@ void QFxLayoutItem::setGeometry(const QRectF & rect) QSizeF QFxLayoutItem::sizeHint(Qt::SizeHint w, const QSizeF &constraint) const { + Q_UNUSED(constraint); if(w == Qt::MinimumSize){ return m_minimumSize; }else if(w == Qt::MaximumSize){ diff --git a/src/declarative/fx/qfxscalegrid.cpp b/src/declarative/fx/qfxscalegrid.cpp index 198ac6d..8eb9890 100644 --- a/src/declarative/fx/qfxscalegrid.cpp +++ b/src/declarative/fx/qfxscalegrid.cpp @@ -41,6 +41,7 @@ #include <QBuffer> #include <qml.h> +#include <QDebug> #include "qfxscalegrid_p.h" @@ -202,7 +203,7 @@ QFxGridScaledImage::QFxGridScaledImage(QIODevice *data) _pix = imgFile; } -QFxScaleGrid::TileRule QFxGridScaledImage::stringToRule(const QString &s) const +QFxScaleGrid::TileRule QFxGridScaledImage::stringToRule(const QString &s) { if (s == QLatin1String("Stretch")) return QFxScaleGrid::Stretch; @@ -210,6 +211,9 @@ QFxScaleGrid::TileRule QFxGridScaledImage::stringToRule(const QString &s) const return QFxScaleGrid::Repeat; if (s == QLatin1String("Round")) return QFxScaleGrid::Round; + + qWarning() << "Unknown tile rule specified. Using Stretch"; + return QFxScaleGrid::Stretch; } bool QFxGridScaledImage::isValid() const diff --git a/src/declarative/fx/qfxscalegrid_p.h b/src/declarative/fx/qfxscalegrid_p.h index a8df3c1..483ade1 100644 --- a/src/declarative/fx/qfxscalegrid_p.h +++ b/src/declarative/fx/qfxscalegrid_p.h @@ -119,7 +119,7 @@ public: QString pixmapUrl() const; private: - QFxScaleGrid::TileRule stringToRule(const QString &) const; + static QFxScaleGrid::TileRule stringToRule(const QString &); private: int _l; |