Allow changing track bg color easier.
This commit is contained in:
@@ -24,8 +24,7 @@
|
|||||||
TrackDetails::TrackDetails()
|
TrackDetails::TrackDetails()
|
||||||
{
|
{
|
||||||
this->setMaximumSize(Wt::WLength::Auto,Wt::WLength(200, Wt::WLength::Pixel));
|
this->setMaximumSize(Wt::WLength::Auto,Wt::WLength(200, Wt::WLength::Pixel));
|
||||||
//this->decorationStyle().setBorder(Wt::WBorder::Ridge);
|
changeBackgroundColor(Wt::WColor("#6FFF6F"));
|
||||||
this->decorationStyle().setBackgroundColor(Wt::WColor("#6FFF6F"));
|
|
||||||
this->addStyleClass("panel");
|
this->addStyleClass("panel");
|
||||||
this->addStyleClass("panel-default");
|
this->addStyleClass("panel-default");
|
||||||
mainLayout = new Wt::WHBoxLayout();
|
mainLayout = new Wt::WHBoxLayout();
|
||||||
@@ -67,3 +66,8 @@ void TrackDetails::updateWithTrackDetails(AudioTrack track)
|
|||||||
albumCover->setResource(coverData);
|
albumCover->setResource(coverData);
|
||||||
this->animateShow(Wt::WAnimation(Wt::WAnimation::Fade,Wt::WAnimation::TimingFunction::EaseIn, 500));
|
this->animateShow(Wt::WAnimation(Wt::WAnimation::Fade,Wt::WAnimation::TimingFunction::EaseIn, 500));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TrackDetails::changeBackgroundColor(Wt::WColor color)
|
||||||
|
{
|
||||||
|
this->decorationStyle().setBackgroundColor(color);
|
||||||
|
}
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public:
|
|||||||
Wt::WText* trackAlbum;
|
Wt::WText* trackAlbum;
|
||||||
|
|
||||||
void updateWithTrackDetails(AudioTrack track);
|
void updateWithTrackDetails(AudioTrack track);
|
||||||
|
void changeBackgroundColor(Wt::WColor color);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TRACKDETAILS_H
|
#endif // TRACKDETAILS_H
|
||||||
|
|||||||
Reference in New Issue
Block a user