Complete Modern desktop widgets and file libraries (by Codex)
This commit is contained in:
1 parent
db89d889f7
commit
31bcf93205
43 files changed
+3134
-484
No files matched your search
@@ -113,7 +113,7 @@ int main(int argc, char **argv) try {
|
||||
std::ostringstream css;
|
||||
for (const auto *name : {"theme.rcss", "ticket.rcss", "sports.rcss",
|
||||
"calendar.rcss", "reports.rcss", "report_details.rcss",
|
||||
"report_pickers.rcss", "indoor.rcss", "planning.rcss", "almanac.rcss", "finance.rcss", "bank.rcss", "contracts.rcss", "amount.rcss", "environment.rcss", "advertising.rcss", "toto.rcss", "lineup.rcss", "transfer.rcss", "career_reports.rcss", "rankings.rcss", "stadium.rcss", "statistics.rcss", "news.rcss", "settings.rcss"}) {
|
||||
"report_pickers.rcss", "indoor.rcss", "planning.rcss", "almanac.rcss", "finance.rcss", "bank.rcss", "contracts.rcss", "amount.rcss", "environment.rcss", "advertising.rcss", "toto.rcss", "lineup.rcss", "transfer.rcss", "career_reports.rcss", "rankings.rcss", "stadium.rcss", "statistics.rcss", "news.rcss", "settings.rcss", "widgets.rcss", "files.rcss"}) {
|
||||
std::ifstream input(root / name);
|
||||
require(bool(input), "Production stylesheet missing");
|
||||
css << input.rdbuf() << '\n';
|
||||
@@ -188,6 +188,14 @@ int main(int argc, char **argv) try {
|
||||
"<option>3840 × 2160</option></select></div>"
|
||||
"<div class='settings-jump-label'><select id='settings-jump-test' class='settings-select'>"
|
||||
"<option selected>Spielablauf und Wettbewerbe</option><option>Ergebnisse</option></select></div></div>";
|
||||
content += "<div class='desktop-card desk-card' style='left:40dp;top:1500dp;width:472dp;height:472dp;'>"
|
||||
"<div id='month-box' class='desk-calendar-month'><span id='month-label'>Juli 2032</span></div></div>"
|
||||
"<button class='desk-warning' style='left:700dp;top:1500dp;width:180dp;height:176dp;'><span class='status-lamp'></span>"
|
||||
"<span id='warning-label' class='warning-caption'>Kontostand</span></button>"
|
||||
"<div class='desk-card' style='position:absolute;left:1100dp;top:1500dp;width:968dp;height:472dp;'>"
|
||||
"<div class='desk-fixture'><div><span id='fixture-label'>Synthetic Club</span></div></div></div>";
|
||||
content += "<div id='gallery-scroll-test' class='modern-widget-gallery' style='left:2700dp;top:1500dp;width:900dp;height:200dp;max-height:200dp;'>"
|
||||
"<div style='position:relative;height:1000dp;'><article class='widget-gallery-item' style='top:600dp;'></article></div></div>";
|
||||
auto *doc = context->LoadDocumentFromMemory(
|
||||
"<rml><head><style>" + css.str() + "</style></head><body class='" +
|
||||
theme + "'>" + content + "</body></rml>");
|
||||
@@ -202,8 +210,9 @@ int main(int argc, char **argv) try {
|
||||
context->Update();
|
||||
context->Render();
|
||||
}
|
||||
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");
|
||||
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"}) {
|
||||
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"}) {
|
||||
auto *label = doc->GetElementById(id);
|
||||
require(label && label->GetBox().GetSize(Rml::BoxArea::Content).x > 0 && visible_text_lines(*label) > 0,
|
||||
"A production statistics/news label has collapsed or lost its font face");
|
||||
@@ -213,6 +222,7 @@ int main(int argc, char **argv) try {
|
||||
require(button, "Button missing");
|
||||
centered_text(*button, *button);
|
||||
}
|
||||
centered_text(*doc->GetElementById("month-label"), *doc->GetElementById("month-box"));
|
||||
auto *list = doc->GetElementById("list");
|
||||
centered_text(*list, *list, false);
|
||||
auto *rich = doc->GetElementById("rich");
|
||||
|
||||
Reference in new issue
Block a user