From 25e4961f1ab8263a4cb4bae4b44ecff291c5ca5c Mon Sep 17 00:00:00 2001 From: Kevin Whitaker Date: Sat, 18 Feb 2017 17:20:09 -0500 Subject: [PATCH] Remove some of old styling for new bootstrap css. --- src/WebInterface.cpp | 1 + src/ui/PlayerInterface.cpp | 9 ++++++--- src/ui/TrackDetails.cpp | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/WebInterface.cpp b/src/WebInterface.cpp index ecbb734..4c807d4 100644 --- a/src/WebInterface.cpp +++ b/src/WebInterface.cpp @@ -35,6 +35,7 @@ WebInterface::WebInterface(const Wt::WEnvironment& env) : Wt::WApplication(env) priv_int = new internal; this->useStyleSheet(Wt::WLink("/resources/font-awesome/css/font-awesome.min.css")); setTheme(new Wt::WBootstrapTheme()); + ((Wt::WBootstrapTheme*)theme())->setVersion(Wt::WBootstrapTheme::Version3); setTitle("Arbitrateor - Audio Jukebox"); enableUpdates(true); priv_int->playerUI = new PlayerInterface(this); diff --git a/src/ui/PlayerInterface.cpp b/src/ui/PlayerInterface.cpp index b04abe2..8673f43 100644 --- a/src/ui/PlayerInterface.cpp +++ b/src/ui/PlayerInterface.cpp @@ -43,6 +43,7 @@ PlayerInterface::PlayerInterface(WebInterface* app) trackProgress->setInterval(1000); trackProgress->timeout().connect(this,&PlayerInterface::updateProgressFromTimer); currentTrackDetails = new TrackDetails(); + currentTrackDetails->setMinimumSize(Wt::WLength(100,Wt::WLength::Pixel),Wt::WLength(100,Wt::WLength::Pixel)); playpause = new Wt::WPushButton(); playpause->setTextFormat(Wt::XHTMLText); playpause->decorationStyle().font().setFamily(Wt::WFont::Default,"FontAwesome"); @@ -67,10 +68,11 @@ PlayerInterface::PlayerInterface(WebInterface* app) interfaceLayout->addWidget(playControlWidget); interfaceLayout->addWidget(currentTrackProgress); interfaceLayout->addLayout(voteControlLayout); - playControlWidget->decorationStyle().setBorder(Wt::WBorder::Outset); - playControlWidget->decorationStyle().setBackgroundColor(Wt::WColor("#00B200")); + playControlWidget->addStyleClass("panel"); + playControlWidget->addStyleClass("panel-default"); + playControlWidget->decorationStyle().setBackgroundColor(Wt::WColor("gainsboro")); playControlLayout->addWidget(playpause,0,Wt::AlignmentFlag::AlignLeft | Wt::AlignmentFlag::AlignMiddle); - playControlLayout->addWidget(currentTrackDetails); + playControlLayout->addWidget(currentTrackDetails,0,Wt::AlignmentFlag::AlignCenter | Wt::AlignmentFlag::AlignMiddle); playControlLayout->addWidget(skipControls,0,Wt::AlignmentFlag::AlignRight | Wt::AlignmentFlag::AlignMiddle); } @@ -170,4 +172,5 @@ void PlayerInterface::updateDetailsFromServer(AudioTrack track) updateSkipDeniedFromServer(); } currentTrackDetails->updateWithTrackDetails(track); + } diff --git a/src/ui/TrackDetails.cpp b/src/ui/TrackDetails.cpp index 6c25d0b..86e14a0 100644 --- a/src/ui/TrackDetails.cpp +++ b/src/ui/TrackDetails.cpp @@ -24,8 +24,10 @@ TrackDetails::TrackDetails() { this->setMaximumSize(Wt::WLength::Auto,Wt::WLength(200, Wt::WLength::Pixel)); - this->decorationStyle().setBorder(Wt::WBorder::Ridge); + //this->decorationStyle().setBorder(Wt::WBorder::Ridge); this->decorationStyle().setBackgroundColor(Wt::WColor("#6FFF6F")); + this->addStyleClass("panel"); + this->addStyleClass("panel-default"); mainLayout = new Wt::WHBoxLayout(); this->setLayout(mainLayout); metaLayout = new Wt::WVBoxLayout(); @@ -33,6 +35,7 @@ TrackDetails::TrackDetails() albumCover = new Wt::WImage(); albumCover->setMinimumSize(Wt::WLength(75,Wt::WLength::Pixel),Wt::WLength(75,Wt::WLength::Pixel)); albumCover->setMaximumSize(Wt::WLength(200,Wt::WLength::Pixel),Wt::WLength(200,Wt::WLength::Pixel)); + albumCover->addStyleClass("img-rounded"); mainLayout->addWidget(albumCover); mainLayout->addSpacing(Wt::WLength(10, Wt::WLength::Pixel)); mainLayout->addLayout(metaLayout); -- GitLab