Allow changing track bg color easier.

This commit is contained in:
Kevin Whitaker
2017-02-18 17:24:45 -05:00
parent 25e4961f1a
commit d12e2471da
2 changed files with 7 additions and 2 deletions

View File

@@ -24,8 +24,7 @@
TrackDetails::TrackDetails()
{
this->setMaximumSize(Wt::WLength::Auto,Wt::WLength(200, Wt::WLength::Pixel));
//this->decorationStyle().setBorder(Wt::WBorder::Ridge);
this->decorationStyle().setBackgroundColor(Wt::WColor("#6FFF6F"));
changeBackgroundColor(Wt::WColor("#6FFF6F"));
this->addStyleClass("panel");
this->addStyleClass("panel-default");
mainLayout = new Wt::WHBoxLayout();
@@ -67,3 +66,8 @@ void TrackDetails::updateWithTrackDetails(AudioTrack track)
albumCover->setResource(coverData);
this->animateShow(Wt::WAnimation(Wt::WAnimation::Fade,Wt::WAnimation::TimingFunction::EaseIn, 500));
}
void TrackDetails::changeBackgroundColor(Wt::WColor color)
{
this->decorationStyle().setBackgroundColor(color);
}

View File

@@ -42,6 +42,7 @@ public:
Wt::WText* trackAlbum;
void updateWithTrackDetails(AudioTrack track);
void changeBackgroundColor(Wt::WColor color);
};
#endif // TRACKDETAILS_H