[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra] /
From: Yue Liu <opuspace () gmail ! com>
Date: 2011-01-21 5:44:39
Message-ID: 20110121054439.7ED5CA60C2 () git ! kde ! org
[Download RAW message or body]
Git commit ba503053a91a7bec91797706caadd7ae584f7f5d by Yue Liu
Pushed by liu into branch master
removed drop-shadow-spread element
M +3 -13 libs/flake/KoShapeShadow.cpp
M +0 -9 libs/flake/KoShapeShadow.h
M +1 -21 libs/widgets/KoShadowConfigWidget.cpp
M +0 -10 libs/widgets/KoShadowConfigWidget.h
M +1 -11 libs/widgets/KoShadowConfigWidget.ui
M +0 -3 plugins/dockers/shadowdocker/ShadowDocker.cpp
http://commits.kde.org/47e7010d/ba503053a91a7bec91797706caadd7ae584f7f5d
diff --git a/libs/flake/KoShapeShadow.cpp b/libs/flake/KoShapeShadow.cpp
index 4b29181..1063aad 100644
--- a/libs/flake/KoShapeShadow.cpp
+++ b/libs/flake/KoShapeShadow.cpp
@@ -67,9 +67,9 @@ void KoShapeShadow::fillStyle(KoGenStyle &style, \
KoShapeSavingContext &context)
style.addProperty("draw:shadow-offset-x", QString("%1pt").arg(d->offset.x()));
style.addProperty("draw:shadow-offset-y", QString("%1pt").arg(d->offset.y()));
if (d->blur != 0)
- style.addProperty("draw:shadow-blur-radius", QString("%1pt").arg(d->blur));
- if (d->spread != 0)
- style.addProperty("draw:shadow-spread", QString("%1pt").arg(d->spread));
+ style.addProperty("draw:shadow-blur-radius", QString("%1").arg(d->blur));
+ /*if (d->spread != 0)
+ style.addProperty("draw:shadow-spread", QString("%1pt").arg(d->spread));*/
}
void KoShapeShadow::paint(KoShape *shape, QPainter &painter, const KoViewConverter \
&converter) @@ -180,16 +180,6 @@ qreal KoShapeShadow::blur() const
return d->blur;
}
-void KoShapeShadow::setSpread(const qreal &spread)
-{
- d->spread = spread;
-}
-
-qreal KoShapeShadow::spread() const
-{
- return d->spread;
-}
-
void KoShapeShadow::setVisible(bool visible)
{
d->visible = visible;
diff --git a/libs/flake/KoShapeShadow.h b/libs/flake/KoShapeShadow.h
index b162491..07c760c 100644
--- a/libs/flake/KoShapeShadow.h
+++ b/libs/flake/KoShapeShadow.h
@@ -82,15 +82,6 @@ public:
/// Returns the shadow blur radius
qreal blur() const;
- /**
- * Sets the shadow spread radius of the shape
- * @param spread the shadow spread
- */
- void setSpread(const qreal &spread);
-
- /// Returns the shadow spread radius
- qreal spread() const;
-
/// Sets the shadow visibility
void setVisible(bool visible);
diff --git a/libs/widgets/KoShadowConfigWidget.cpp \
b/libs/widgets/KoShadowConfigWidget.cpp index 9617a3d..95f0d57 100644
--- a/libs/widgets/KoShadowConfigWidget.cpp
+++ b/libs/widgets/KoShadowConfigWidget.cpp
@@ -39,8 +39,7 @@ KoShadowConfigWidget::KoShadowConfigWidget( QWidget * parent )
{
d->widget.setupUi(this);
d->widget.shadowOffset->setValue( 0.0 );
- d->widget.shadowBlur->setValue( 10.0 );
- d->widget.shadowSpread->setValue( 0.0 );
+ d->widget.shadowBlur->setValue( 8.0 );
d->widget.shadowAngle->setValue( 0.0 );
d->widget.shadowAngle->setMinimum( 0.0 );
d->widget.shadowAngle->setMaximum( 360.0 );
@@ -56,7 +55,6 @@ KoShadowConfigWidget::KoShadowConfigWidget( QWidget * parent )
connect( d->widget.shadowAngle, SIGNAL(valueChanged(qreal,bool)), this, \
SLOT(offsetChanged()));
connect( d->widget.shadowOffset, SIGNAL(valueChangedPt(qreal)), this, \
SLOT(offsetChanged()));
connect( d->widget.shadowBlur, SIGNAL(valueChangedPt(qreal)), this, \
SLOT(blurChanged()));
- connect( d->widget.shadowSpread, SIGNAL(valueChangedPt(qreal)), this, \
SLOT(spreadChanged())); }
KoShadowConfigWidget::~KoShadowConfigWidget()
@@ -113,19 +111,6 @@ qreal KoShadowConfigWidget::shadowBlur() const
return blur;
}
-void KoShadowConfigWidget::setShadowSpread( const qreal &spread )
-{
- d->widget.shadowSpread->blockSignals(true);
- d->widget.shadowSpread->changeValue( spread );
- d->widget.shadowSpread->blockSignals(false);
-}
-
-qreal KoShadowConfigWidget::shadowSpread() const
-{
- qreal spread( d->widget.shadowSpread->value() );
- return spread;
-}
-
void KoShadowConfigWidget::setShadowVisible( bool visible )
{
d->widget.shadowVisible->blockSignals(true);
@@ -154,11 +139,6 @@ void KoShadowConfigWidget::blurChanged()
emit shadowBlurChanged( shadowBlur() );
}
-void KoShadowConfigWidget::spreadChanged()
-{
- emit shadowSpreadChanged( shadowSpread() );
-}
-
void KoShadowConfigWidget::setUnit( const KoUnit &unit )
{
d->widget.shadowOffset->setUnit( unit );
diff --git a/libs/widgets/KoShadowConfigWidget.h \
b/libs/widgets/KoShadowConfigWidget.h index 28b2d6f..10d64ba 100644
--- a/libs/widgets/KoShadowConfigWidget.h
+++ b/libs/widgets/KoShadowConfigWidget.h
@@ -52,12 +52,6 @@ public:
/// Returns the shadow blur radius
qreal shadowBlur() const;
- /// Sets the shadow spread radius
- void setShadowSpread( const qreal &spread );
-
- /// Returns the shadow spread radius
- qreal shadowSpread() const;
-
/// Sets if the shadow is visible
void setShadowVisible( bool visible );
@@ -77,9 +71,6 @@ signals:
/// Is emitted whenever the shadow blur radius has changed
void shadowBlurChanged( const qreal &blur );
- /// Is emitted whenever the shadow spread radius has changed
- void shadowSpreadChanged( const qreal &spread );
-
/// Is emitted whenever the shadow visibility has changed
void shadowVisibilityChanged( bool visible );
@@ -87,7 +78,6 @@ private slots:
void visibilityChanged();
void offsetChanged();
void blurChanged();
- void spreadChanged();
private:
class Private;
Private * const d;
diff --git a/libs/widgets/KoShadowConfigWidget.ui \
b/libs/widgets/KoShadowConfigWidget.ui index 1d0d4b2..0d677c1 100644
--- a/libs/widgets/KoShadowConfigWidget.ui
+++ b/libs/widgets/KoShadowConfigWidget.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>196</width>
- <height>175</height>
+ <height>148</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
@@ -68,16 +68,6 @@
<item row="3" column="1" colspan="2">
<widget class="KoUnitDoubleSpinBox" name="shadowBlur"/>
</item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Spread out:</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1" colspan="2">
- <widget class="KoUnitDoubleSpinBox" name="shadowSpread"/>
- </item>
</layout>
</widget>
</item>
diff --git a/plugins/dockers/shadowdocker/ShadowDocker.cpp \
b/plugins/dockers/shadowdocker/ShadowDocker.cpp index 6b9983a..157968d 100644
--- a/plugins/dockers/shadowdocker/ShadowDocker.cpp
+++ b/plugins/dockers/shadowdocker/ShadowDocker.cpp
@@ -65,7 +65,6 @@ ShadowDocker::ShadowDocker()
connect( d->widget, SIGNAL(shadowColorChanged(const KoColor&)), this, \
SLOT(shadowChanged()));
connect( d->widget, SIGNAL(shadowOffsetChanged(const QPointF&)), this, \
SLOT(shadowChanged()));
connect( d->widget, SIGNAL(shadowBlurChanged(const qreal&)), this, \
SLOT(shadowChanged()));
- connect( d->widget, SIGNAL(shadowSpreadChanged(const qreal&)), this, \
SLOT(shadowChanged()));
connect( d->widget, SIGNAL(shadowVisibilityChanged(bool)), this, \
SLOT(shadowChanged())); connect(this, SIGNAL(dockLocationChanged(Qt::DockWidgetArea \
)), this, SLOT(locationChanged(Qt::DockWidgetArea)));
@@ -101,7 +100,6 @@ void ShadowDocker::selectionChanged()
d->widget->setShadowOffset( shadow->offset() );
d->widget->setShadowColor( shadow->color() );
d->widget->setShadowBlur( shadow->blur() );
- d->widget->setShadowSpread( shadow->spread() );
}
void ShadowDocker::setCanvas( KoCanvasBase *canvas )
@@ -129,7 +127,6 @@ void ShadowDocker::shadowChanged()
newShadow->setColor( d->widget->shadowColor() );
newShadow->setOffset( d->widget->shadowOffset() );
newShadow->setBlur( d->widget->shadowBlur() );
- newShadow->setSpread( d->widget->shadowSpread() );
d->canvas->addCommand( new KoShapeShadowCommand( selection->selectedShapes(), \
newShadow ) ); }
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic