Commit cdebff5b authored by jpbl's avatar jpbl

We added the volume buttons

parent 9b3e31a0
......@@ -84,7 +84,12 @@ SFLPhoneWindow::initGUIButtons()
mVolume = new VolumeControl(":/sflphone/images/volume.png",
mMain);
mVolume->setOrientation(VolumeControl::Vertical);
mVolume->move(0,0);
mVolume->move(365,91);
mMicVolume = new VolumeControl(":/sflphone/images/volume.png",
mMain);
mMicVolume->setOrientation(VolumeControl::Vertical);
mMicVolume->move(347,91);
}
......
......@@ -62,6 +62,7 @@ private:
JPushButton *mMute;
VolumeControl *mVolume;
VolumeControl *mMicVolume;
SFLLcd *mLcd;
QLabel *mMain;
......
......@@ -44,23 +44,10 @@ VolumeControl::~VolumeControl()
void
VolumeControl::resize()
{
if(mOrientation == VolumeControl::Horizontal) {
QWidget::resize(QSize(mSlider->size().width(),
mMaxPosition + mSlider->size().height()));
}
else {
QWidget::resize(QSize(mMaxPosition + mSlider->size().width(),
mSlider->size().height()));
}
QPixmap q(TransparentWidget::transparize(QString(":/sflphone/images/slider")));
std::cout << "mask isNull: " << q.mask().isNull() << std::endl;
std::cout << "isNull: " << q.isNull() << std::endl;
std::cout << q.size().width() << "," << q.size().height() << std::endl;
QPixmap q(QString(":/sflphone/images/slider"));
setPixmap(q);
if(q.hasAlpha()) {
std::cout << "has alpha" << std::endl;
setMask(q.mask());
}
QWidget::resize(q.size());
mMaxPosition = q.height() - mSlider->height();
}
void
......
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