Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 47559181 authored by Casper Boemann's avatar Casper Boemann

init the popup opacity slider

svn path=/trunk/koffice/; revision=662282
parent 72713295
......@@ -207,7 +207,7 @@ void KisLayerBox::updateUI()
slotSetColorSpace(m_image->activeDevice()->colorSpace());
else
slotSetColorSpace(m_image->colorSpace());
slotSetOpacity(int(float(active->opacity() * 100) / 255 + 0.5));
slotSetOpacity(active->opacity() * 100.0 / 255);
slotSetCompositeOp(active->compositeOp());
}
}
......@@ -227,11 +227,11 @@ void KisLayerBox::slotSetColorSpace(const KoColorSpace * colorSpace)
}
// range: 0-100
void KisLayerBox::slotSetOpacity(int opacity)
void KisLayerBox::slotSetOpacity(double opacity)
{
Q_ASSERT( opacity >= 0 && opacity <= 100 );
doubleOpacity->blockSignals(true);
//doubleOpacity->setValue(opacity);
doubleOpacity->setValue(opacity);
doubleOpacity->blockSignals(false);
}
......
......@@ -67,7 +67,7 @@ public:
public slots:
void slotSetCompositeOp(const KoCompositeOp* compositeOp);
void slotSetOpacity(int opacity);
void slotSetOpacity(double opacity);
void slotSetColorSpace(const KoColorSpace * colorSpace);
signals:
......
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