Fixed a MacOS bug in the stylesheet parser
This commit is contained in:
parent
ed3c21bd36
commit
ad7b3e6bed
4 changed files with 8 additions and 3 deletions
1
.clangd
1
.clangd
|
|
@ -1,4 +1,5 @@
|
|||
CompileFlags:
|
||||
CompilationDatabase: bin
|
||||
Add: ["--target=x86_64-w64-mingw32"]
|
||||
Diagnostics:
|
||||
MissingIncludes: None
|
||||
|
|
@ -1 +1 @@
|
|||
2066
|
||||
2067
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include "Stylesheet.hpp"
|
||||
#include "FileSystem.hpp"
|
||||
#include "Logger.hpp"
|
||||
#include <algorithm>
|
||||
|
||||
namespace ostd
|
||||
{
|
||||
|
|
@ -361,7 +362,11 @@ namespace ostd
|
|||
if (exitCondition)
|
||||
return false;
|
||||
String lineCopy = line;
|
||||
for (const auto&[var, val] : variables)
|
||||
std::vector<std::pair<String, std::pair<String, bool>>> sortedVars(variables.begin(), variables.end());
|
||||
std::sort(sortedVars.begin(), sortedVars.end(), [](const auto& a, const auto& b) {
|
||||
return a.first.len() > b.first.len();
|
||||
});
|
||||
for (const auto&[var, val] : sortedVars)
|
||||
{
|
||||
if (lineCopy.contains(var))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ class Window : public ogfx::gui::Window
|
|||
m_label1.addThemeOverride("@.label.borderColor", Colors::DarkMagenta);
|
||||
m_label1.addThemeOverride("@:pressed.label.backgroundColor", Colors::Crimson);
|
||||
m_label1.addThemeOverride("@:hover.label.backgroundColor", Colors::DarkRed);
|
||||
m_label1.addThemeOverride("@:hover.label.cursor", cast<i32>(ogfx::WindowCore::eCursor::Pointer));
|
||||
m_label1.reloadTheme();
|
||||
|
||||
m_check1.setText("Check this out!");
|
||||
|
|
|
|||
Loading…
Reference in a new issue