mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-24 04:02:09 +00:00
Add option to disable loading SCSS directly
This commit is contained in:
parent
ddee5aa1ad
commit
7948fa073b
4 changed files with 17 additions and 7 deletions
|
@ -12,6 +12,11 @@
|
|||
# - foo\nbar -> "foo<newline>bar"
|
||||
# - foo\sbar -> "foo bar"
|
||||
|
||||
# If true, gBar ignores *.scss files and only tries to load *.css files.
|
||||
# This is useful, if you don't want to SCSS, or if you want to use newer SCSS features,
|
||||
# that libsass (the backend gBar uses) doesn't support.
|
||||
ForceCSS: false
|
||||
|
||||
# The following three options control the ordering of the widgets.
|
||||
# Reordering can cause slight margin inconsistencies,
|
||||
# so it is recommend to only make minor adjustments to the default layout.
|
||||
|
|
17
src/CSS.cpp
17
src/CSS.cpp
|
@ -112,14 +112,17 @@ namespace CSS
|
|||
|
||||
for (auto& dir : locations)
|
||||
{
|
||||
if (CompileAndLoadSCSS(dir + "/style.scss"))
|
||||
if (!Config::Get().forceCSS)
|
||||
{
|
||||
LOG("SCSS found and loaded successfully!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG("Warning: Failed loading SCSS, falling back to CSS!");
|
||||
if (CompileAndLoadSCSS(dir + "/style.scss"))
|
||||
{
|
||||
LOG("SCSS found and loaded successfully!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG("Warning: Failed loading SCSS, falling back to CSS!");
|
||||
}
|
||||
}
|
||||
|
||||
if (LoadCSS(dir + "/style.css"))
|
||||
|
|
|
@ -283,6 +283,7 @@ void Config::Load(const std::string& overrideConfigLocation)
|
|||
AddConfigVar("MicHighIcon", config.micHighIcon, lineView, foundProperty);
|
||||
AddConfigVar("PackageOutOfDateIcon", config.packageOutOfDateIcon, lineView, foundProperty);
|
||||
|
||||
AddConfigVar("ForceCSS", config.forceCSS, lineView, foundProperty);
|
||||
AddConfigVar("CenterWidgets", config.centerWidgets, lineView, foundProperty);
|
||||
AddConfigVar("AudioInput", config.audioInput, lineView, foundProperty);
|
||||
AddConfigVar("AudioRevealer", config.audioRevealer, lineView, foundProperty);
|
||||
|
|
|
@ -54,6 +54,7 @@ public:
|
|||
std::string checkPackagesCommand =
|
||||
"p=\"$(checkupdates)\"; e=$?; if [ $e -eq 127 ] ; then exit 127; fi; if [ $e -eq 2 ] ; then echo \"0\" && exit 0; fi; echo \"$p\" | wc -l";
|
||||
|
||||
bool forceCSS = false; // Whether to disable loading SCSS directly.
|
||||
bool centerWidgets = true; // Force the center widgets to be in the center.
|
||||
bool audioRevealer = false;
|
||||
bool audioInput = false;
|
||||
|
|
Loading…
Reference in a new issue