Some more polish both flatly and darkly themes
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include <Wt/WAnchor.h>
|
||||
#include <Wt/WBootstrapTheme.h>
|
||||
#include <Wt/WEnvironment.h>
|
||||
#include <Wt/WLinkedCssStyleSheet.h>
|
||||
#include <Wt/WMenu.h>
|
||||
#include <Wt/WNavigationBar.h>
|
||||
#include <Wt/WPopupMenu.h>
|
||||
@@ -115,7 +116,25 @@ LmsApplication::LmsApplication(const Wt::WEnvironment& env,
|
||||
_dbSession {db},
|
||||
_appGroups {appGroups}
|
||||
{
|
||||
auto bootstrapTheme = std::make_unique<Wt::WBootstrapTheme>();
|
||||
|
||||
class MyTheme : public Wt::WBootstrapTheme
|
||||
{
|
||||
private:
|
||||
std::vector<Wt::WLinkedCssStyleSheet> styleSheets() const override
|
||||
{
|
||||
return
|
||||
{
|
||||
Wt::WLinkedCssStyleSheet {Wt::WLink {"css/bootstrap-flatly.min.css"}},
|
||||
Wt::WLinkedCssStyleSheet {Wt::WLink {"css/lms-flatly.css"}},
|
||||
// Wt::WLinkedCssStyleSheet {Wt::WLink {"css/bootstrap-darkly.min.css"}},
|
||||
// Wt::WLinkedCssStyleSheet {Wt::WLink {"css/lms-darkly.css"}},
|
||||
// Wt::WLinkedCssStyleSheet {Wt::WLink {"css/bootstrap-slate.css"}},
|
||||
Wt::WLinkedCssStyleSheet { Wt::WLink {"resources/themes/bootstrap/3/wt.css"}},
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
auto bootstrapTheme = std::make_unique<MyTheme>();
|
||||
bootstrapTheme->setVersion(Wt::BootstrapVersion::v3);
|
||||
bootstrapTheme->setResponsive(true);
|
||||
setTheme(std::move(bootstrapTheme));
|
||||
|
||||
@@ -132,8 +132,7 @@ Artist::refresh()
|
||||
|
||||
auto cover = std::make_unique<Wt::WImage>();
|
||||
cover->setImageLink(LmsApp->getImageResource()->getReleaseUrl(release.id(), 128));
|
||||
// Some images may not be square
|
||||
cover->setWidth(128);
|
||||
cover->setStyleClass("Lms-cover-medium");
|
||||
anchor->setImage(std::move(cover));
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ ReleaseLink::ReleaseLink(Database::Release::pointer release)
|
||||
|
||||
Wt::WAnchor* anchor = bindWidget("cover", LmsApplication::createReleaseAnchor(release, false));
|
||||
auto cover = std::make_unique<Wt::WImage>();
|
||||
cover->setImageLink(LmsApp->getImageResource()->getReleaseUrl(release.id(), 48));
|
||||
cover->setWidth(48);
|
||||
cover->setImageLink(LmsApp->getImageResource()->getReleaseUrl(release.id(), 64));
|
||||
cover->setStyleClass("Lms-cover-small");
|
||||
anchor->setImage(std::move(cover));
|
||||
|
||||
auto artists = release->getReleaseArtists();
|
||||
|
||||
@@ -114,7 +114,10 @@ Release::refresh()
|
||||
}
|
||||
}
|
||||
|
||||
t->bindNew<Wt::WImage>("cover", Wt::WLink(LmsApp->getImageResource()->getReleaseUrl(release.id(), 512)));
|
||||
{
|
||||
Wt::WImage* cover {t->bindNew<Wt::WImage>("cover", Wt::WLink(LmsApp->getImageResource()->getReleaseUrl(release.id(), 512)))};
|
||||
cover->setStyleClass("Lms-cover-large");
|
||||
}
|
||||
|
||||
Wt::WContainerWidget* clusterContainers {t->bindNew<Wt::WContainerWidget>("clusters")};
|
||||
{
|
||||
|
||||
@@ -98,7 +98,7 @@ Releases::addSome()
|
||||
auto cover = std::make_unique<Wt::WImage>();
|
||||
cover->setImageLink(LmsApp->getImageResource()->getReleaseUrl(release.id(), 128));
|
||||
// Some images may not be square
|
||||
cover->setWidth(128);
|
||||
cover->setStyleClass("Lms-cover-medium");
|
||||
anchor->setImage(std::move(cover));
|
||||
|
||||
entry->bindWidget("release-name", LmsApplication::createReleaseAnchor(release));
|
||||
|
||||
Reference in New Issue
Block a user