Separate Matchday balance colours from the skin accent (by Codex)
This commit is contained in:
1 parent
85a1fe5a95
commit
94dc5ecbc4
8 files changed
+42
-10
No files matched your search
@@ -281,6 +281,12 @@ int main(int argc, char **argv) try {
|
||||
button_markup("load", "<span id='front-test-label'>Spiel laden</span><span class='front-hover-arrow'>›</span>", "front-menu-action", "id='front-test-button'") + "</div>"
|
||||
"<div class='front-mod-entry' style='position:absolute;left:2100dp;top:1800dp;width:1100dp;'>"
|
||||
"<span class='front-mod-copy'><strong id='mod-test-name'>Synthetic world</strong><small><span>OpenBMH</span></small></span><span class='front-mod-type'>Modern</span></div>";
|
||||
content += "<div class='info-cash'><strong id='cash-positive' class='money-amount'>1.000 €</strong>"
|
||||
"<strong id='cash-zero' class='money-amount'>0 €</strong><strong id='cash-negative' class='money-amount is-negative'>-1.000 €</strong></div>"
|
||||
"<div class='desk-account-main'><strong id='widget-positive' class='money-amount'>1.000 €</strong>"
|
||||
"<strong id='widget-negative' class='money-amount is-negative'>-1.000 €</strong></div>"
|
||||
"<span id='money-reference' class='money-amount'>Money</span><span id='negative-reference' style='color:var(--danger);'>Negative</span>"
|
||||
"<span id='text-reference'>Text</span>";
|
||||
auto *doc = context->LoadDocumentFromMemory(
|
||||
"<rml><head><style>" + css.str() + "</style></head><body class='" +
|
||||
theme + "'>" + content + "</body></rml>");
|
||||
@@ -297,6 +303,16 @@ int main(int argc, char **argv) try {
|
||||
}
|
||||
require(doc->GetElementById("gallery-scroll-test")->GetScrollHeight() > doc->GetElementById("gallery-scroll-test")->GetClientHeight()*2,"Gallery content does not contribute to scroll extent");
|
||||
require(!center_selects(*doc), "Control centering does not settle");
|
||||
const auto money_color = doc->GetElementById("money-reference")->GetComputedValues().color();
|
||||
const auto negative_color = doc->GetElementById("negative-reference")->GetComputedValues().color();
|
||||
for (const auto *id : {"cash-positive", "cash-zero", "widget-positive"})
|
||||
require(doc->GetElementById(id)->GetComputedValues().color() == money_color, "Positive/zero balance uses another colour");
|
||||
for (const auto *id : {"cash-negative", "widget-negative"})
|
||||
require(doc->GetElementById(id)->GetComputedValues().color() == negative_color, "Negative balance lost its warning colour");
|
||||
require(money_color != negative_color, "Money and negative colours are indistinguishable");
|
||||
if (std::string(theme) == "matchday")
|
||||
require(money_color == doc->GetElementById("text-reference")->GetComputedValues().color(), "Matchday positive money must use neutral text colour");
|
||||
|
||||
for (const auto *id : {"stats-scale-label", "stats-legend-label", "stats-player-label", "stats-world-label", "stats-from-label", "stats-winner-label", "news-brand-test", "settings-row-label", "settings-row-help", "month-label", "warning-label", "fixture-label", "front-test-label", "mod-test-name"}) {
|
||||
auto *label = doc->GetElementById(id);
|
||||
require(label && label->GetBox().GetSize(Rml::BoxArea::Content).x > 0 && visible_text_lines(*label) > 0,
|
||||
|
||||
Reference in new issue
Block a user