Switch to vanilla v5, broken
This commit is contained in:
@@ -27,14 +27,12 @@ namespace UserInterface {
|
||||
LmsTheme::LmsTheme(Database::UITheme theme)
|
||||
: _theme {theme}
|
||||
{
|
||||
setVersion(Wt::BootstrapVersion::v3);
|
||||
setResponsive(true); // Should be not necessary since applied via head-matter
|
||||
}
|
||||
|
||||
void
|
||||
LmsTheme::setTheme(Database::UITheme theme)
|
||||
LmsTheme::setTheme(Database::UITheme )
|
||||
{
|
||||
if (theme == _theme)
|
||||
/* if (theme == _theme)
|
||||
return;
|
||||
|
||||
// Hack, use the application interface directly since changing theme is not allowed
|
||||
@@ -45,12 +43,13 @@ LmsTheme::setTheme(Database::UITheme theme)
|
||||
_theme = theme;
|
||||
for (const auto& styleSheet : getStyleSheets(theme))
|
||||
LmsApp->useStyleSheet(styleSheet);
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
std::vector<Wt::WLinkedCssStyleSheet>
|
||||
LmsTheme::styleSheets() const
|
||||
{
|
||||
const std::vector<Wt::WLink> styleSheets {getStyleSheets(_theme)};
|
||||
/ const std::vector<Wt::WLink> styleSheets {getStyleSheets(_theme)};
|
||||
std::vector<Wt::WLinkedCssStyleSheet> res;
|
||||
res.reserve(styleSheets.size());
|
||||
|
||||
@@ -59,7 +58,7 @@ LmsTheme::styleSheets() const
|
||||
}
|
||||
|
||||
std::vector<Wt::WLink>
|
||||
LmsTheme::getStyleSheets(Database::UITheme theme)
|
||||
LmsTheme::getStyleSheets(Database::UITheme )
|
||||
{
|
||||
switch (theme)
|
||||
{
|
||||
@@ -85,5 +84,5 @@ LmsTheme::getStyleSheets(Database::UITheme theme)
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <Wt/WBootstrapTheme.h>
|
||||
#include <Wt/WBootstrap5Theme.h>
|
||||
#include <Wt/WLinkedCssStyleSheet.h>
|
||||
|
||||
#include "services/database/Types.hpp"
|
||||
|
||||
namespace UserInterface
|
||||
{
|
||||
class LmsTheme : public Wt::WBootstrapTheme
|
||||
class LmsTheme : public Wt::WBootstrap5Theme
|
||||
{
|
||||
public:
|
||||
LmsTheme(Database::UITheme theme);
|
||||
@@ -36,8 +36,8 @@ namespace UserInterface
|
||||
void setTheme(Database::UITheme theme);
|
||||
|
||||
private:
|
||||
std::vector<Wt::WLinkedCssStyleSheet> styleSheets() const override;
|
||||
static std::vector<Wt::WLink> getStyleSheets(Database::UITheme theme);
|
||||
// std::vector<Wt::WLinkedCssStyleSheet> styleSheets() const override;
|
||||
// static std::vector<Wt::WLink> getStyleSheets(Database::UITheme theme);
|
||||
|
||||
Database::UITheme _theme;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user