Center fixture rows around scores and inner crests (by Codex)
This commit is contained in:
1 parent
9a93c4fcc8
commit
af60e499a2
7 files changed
+144
-29
No files matched your search
@@ -47,6 +47,26 @@
|
|||||||
.match-list .report-row,.match-list .report-club-button {font-size:34dp;}
|
.match-list .report-row,.match-list .report-club-button {font-size:34dp;}
|
||||||
.match-list .report-head {font-size:34dp;color:var(--muted);}
|
.match-list .report-head {font-size:34dp;color:var(--muted);}
|
||||||
.match-list .report-cell {padding:12dp 28dp;}
|
.match-list .report-cell {padding:12dp 28dp;}
|
||||||
|
.match-list .report-cell.first {justify-content:flex-end;padding-left:46dp;}
|
||||||
|
.match-list .report-cell:last-child {justify-content:flex-start;padding-right:46dp;}
|
||||||
|
.match-list .report-cell.score {padding-left:8dp;padding-right:8dp;}
|
||||||
|
.match-list .name-first .report-club-name {text-align:right;}
|
||||||
|
.match-list .report-cell:last-child .report-club-name {text-align:left;}
|
||||||
|
/* Full row width preserves the score axis; 18dp outer reserves protect long names from the scrollbar. */
|
||||||
|
.opening-pair-row {display:flex;align-items:center;gap:18dp;width:100%;height:100%;font-size:30dp;}
|
||||||
|
.opening-pair-row.current {font-size:38dp;}
|
||||||
|
.opening-pair-number,.opening-pair-counter {display:flex;align-items:center;justify-content:flex-end;flex-shrink:0;width:46dp;font-size:24dp;color:var(--muted);}
|
||||||
|
.opening-pair-side {display:flex;align-items:center;gap:18dp;flex:1;min-width:0;}
|
||||||
|
.opening-pair-side.home {justify-content:flex-end;text-align:right;}
|
||||||
|
.opening-pair-side.away {justify-content:flex-start;text-align:left;}
|
||||||
|
.opening-pair-side .image-frame {flex-shrink:0;}
|
||||||
|
.opening-pair-name {display:block;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
|
||||||
|
.opening-pair-name:first-child:last-child {color:var(--muted);}
|
||||||
|
.opening-pair-versus {display:flex;align-items:center;justify-content:center;flex-shrink:0;width:40dp;color:var(--muted);}
|
||||||
|
.opening-pair-row.compact {font-size:27dp;gap:12dp;}
|
||||||
|
.opening-pair-row.compact .opening-pair-side {gap:12dp;}
|
||||||
|
.opening-pair-row.compact .opening-pair-number,.opening-pair-row.compact .opening-pair-counter {width:34dp;font-size:21dp;}
|
||||||
|
.opening-pair-row.compact .opening-pair-versus {width:22dp;}
|
||||||
body.midnight .report-row {color:#d8e0e8;}
|
body.midnight .report-row {color:#d8e0e8;}
|
||||||
body.midnight .report-head,body.midnight .report-sort {color:#a0aebc;}
|
body.midnight .report-head,body.midnight .report-sort {color:#a0aebc;}
|
||||||
body.midnight .report-cell[aria-sort=ascending] .report-sort,body.midnight .report-cell[aria-sort=descending] .report-sort {color:#dae6f0;}
|
body.midnight .report-cell[aria-sort=ascending] .report-sort,body.midnight .report-cell[aria-sort=descending] .report-sort {color:#dae6f0;}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ Implementierung in der Spiel-Engine.
|
|||||||
| Training | [Übungen, Kader, Intensität und Demo-Automatik](desktop/training/README.md) |
|
| Training | [Übungen, Kader, Intensität und Demo-Automatik](desktop/training/README.md) |
|
||||||
| Taktik | [Interaktive Diagramme und Einsatzregler](desktop/tactics/README.md) |
|
| Taktik | [Interaktive Diagramme und Einsatzregler](desktop/tactics/README.md) |
|
||||||
| Kalender | [Zwölf Monate, transponierte Wochen und Ligavorschau](desktop/calendar/README.md) |
|
| Kalender | [Zwölf Monate, transponierte Wochen und Ligavorschau](desktop/calendar/README.md) |
|
||||||
|
| Paarungsanordnung | [Mittige Ergebnisse und innenliegende Wappen](desktop/fixtures/README.md) |
|
||||||
| Berichte | [Tabellen, Stärken, Ligaspiele, übrige Spiele und Profile](desktop/reports/README.md) |
|
| Berichte | [Tabellen, Stärken, Ligaspiele, übrige Spiele und Profile](desktop/reports/README.md) |
|
||||||
| Freundschaftsspiele | [Gegner, Austragungsort, Kostenbestätigung und Vormerkungen](desktop/friendlies/README.md) |
|
| Freundschaftsspiele | [Gegner, Austragungsort, Kostenbestätigung und Vormerkungen](desktop/friendlies/README.md) |
|
||||||
| Verlegen | [Kalendergestützte Verlegung mit Rücknahme](desktop/postpone/README.md) |
|
| Verlegen | [Kalendergestützte Verlegung mit Rücknahme](desktop/postpone/README.md) |
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
# Paarungszeilen · gemeinsame Mittelachse
|
||||||
|
|
||||||
|
Stand: 24. Oktober 2026. Designänderung nach Michaels Vorgabe:
|
||||||
|
|
||||||
|
**Heimname → Heimwappen → Ergebnis → Auswärtswappen → Auswärtsname**
|
||||||
|
|
||||||
|
Das Ergebnis beziehungsweise der neutrale Trenner steht in der Mitte der
|
||||||
|
Begegnungszeile. Die Heimseite richtet sich nach rechts, die Auswärtsseite
|
||||||
|
nach links aus. Die Wappen liegen innen am Ergebnis; Namen wachsen nach
|
||||||
|
außen. Beide Mannschaftsbereiche sind gleich breit. Lange Namen erhalten
|
||||||
|
Auslassungspunkte, ohne Wappen oder Ergebnis zusammenzudrücken.
|
||||||
|
|
||||||
|
## Übertragene Ansichten
|
||||||
|
|
||||||
|
- Native und HTML: Ligaspiele, übrige Spiele einschließlich der langen
|
||||||
|
DFB-Pokal-Liste; laufende Auslosung, zuletzt gezogene Paarungen und Übersicht.
|
||||||
|
- HTML: Ergebnisliste nach dem Spiel, Auswahl paralleler Übertragungen,
|
||||||
|
TOTO-Spielprogramm und die WM-/EM-Finalrundenliste.
|
||||||
|
- Die Länder-Finalrunden verwenden ihre vorhandenen Ländernamen. Es werden
|
||||||
|
dort keine Vereinswappen als Nationalmannschaftswappen ausgegeben.
|
||||||
|
|
||||||
|
Die großen Anzeigetafeln und Tabellen mit Ranglisten haben eigene Formen.
|
||||||
|
Datums-/Terminbeschreibungen im Kalender und bei Verlegen sind weiterhin
|
||||||
|
Beschreibungstext zur jeweiligen Auswahl.
|
||||||
|
|
||||||
|
## Geometrie
|
||||||
|
|
||||||
|
Die breiten Ligaberichte verwenden eine **160dp** breite Mittelspalte statt
|
||||||
|
400dp. Seitlich bleiben dort 8dp Innenabstand, damit auch die Überschrift
|
||||||
|
„Ergebnis“ vollständig hineinpasst. Heim und Auswärts liegen spiegelgleich
|
||||||
|
an dieser Mitte. Der native Bericht hält seine Mittelachse auch bei sichtbarem
|
||||||
|
Scrollbalken. Die Seitenbreiten werden aus den tatsächlich gerundeten
|
||||||
|
Rahmenpixeln berechnet; außen schützen zusätzliche 18dp den Platz für lange Namen.
|
||||||
|
|
||||||
|
Die Paarungsnummer der Auslosung erhält rechts ein gleich großes leeres
|
||||||
|
Gegenstück. Dadurch verschiebt sie die Ergebnisachse weder beim ersten Los
|
||||||
|
noch beim Wechsel zwischen ein- und zweistelligen Nummern. Die Übersicht
|
||||||
|
zentriert jede Begegnung innerhalb ihrer eigenen Spalte. Native Breiten:
|
||||||
|
2352dp für die aktuelle Paarung, 1289dp je Übersichtsspalte mit 34dp Abstand.
|
||||||
|
|
||||||
|
Im HTML-Spielprogramm werden zusätzliche Informationen wie Spielnummer,
|
||||||
|
Liga oder Auswahlkästchen ebenfalls symmetrisch berücksichtigt. TOTO zeigt
|
||||||
|
bei noch nicht ausgetragenen Spielen einen neutralen „–“-Trenner.
|
||||||
|
|
||||||
|
## Daten und Einbindung
|
||||||
|
|
||||||
|
Die Änderung betrifft die Präsentation der vorhandenen Paarungen. Teilnehmer,
|
||||||
|
Spielstände, Losfolge, Termine, Tippdaten und Enginezustand werden dabei
|
||||||
|
nicht verändert. Bestehende Vereinsknöpfe und Berichtsaufrufe bleiben bedienbar.
|
||||||
|
Die native UI bleibt eine Vorschau bis Anstoß; Match- und Post-Match-Seiten
|
||||||
|
in diesem Paket betreffen den bereits vorhandenen HTML-Prototyp.
|
||||||
|
|
||||||
|
Quellen: private HTML-Produktbasis `3070f242dfcd5130e5caa4eae20c53db14eebb4d`,
|
||||||
|
insbesondere `table-window.css`, `club-data.css`, `season-opening.css`,
|
||||||
|
`post-match.css`, `match-broadcast.css` und `toto-window.css`.
|
||||||
|
Native Umsetzung: `reports_screens.inc`, `screens.inc`, `reports.rcss`.
|
||||||
|
Der neue HTML-Stand ist die Gestaltungsreferenz für weitere native Ports.
|
||||||
|
|
||||||
|
## Prüfung
|
||||||
|
|
||||||
|
Die gezielten Katalog-/Berichts- und RmlUI-Controltests bestehen.
|
||||||
|
Der bestandene visuelle Vergleich prüft Mittelachsen und Wappenabstände, lange Namen,
|
||||||
|
32 Pokalpaarungen mit Scrollen, Auslosungsphasen sowie die vorhandenen
|
||||||
|
Klickpfade in drei Themes. Bilder, Messwerte und ladbare UI-Demostände bleiben
|
||||||
|
unter `bmh_4k_ui/docs/qa/fixture-alignment-2026-10-24/` im privaten
|
||||||
|
Mockup-Repository. Auch die echte laufende Ziehung wurde auf Pause,
|
||||||
|
Fortsetzen, Überspringen und den Wechsel zum Desktop geprüft. Die
|
||||||
|
Berichtsmitte stimmt einschließlich 720p und sichtbarem Scrollbalken mit
|
||||||
|
der Fensterachse überein. Bei der Auslosung ist die Zeile lokal exakt
|
||||||
|
symmetrisch; bei 720p bleibt die bestehende allgemeine Inhaltsrundung von
|
||||||
|
ungefähr einem Drittel Pixel zur Fensterachse sichtbar. Diese Prüfung
|
||||||
|
betrifft Linux/OpenGL und Browser, keine native Plattformabnahme aller Menüs.
|
||||||
@@ -221,3 +221,8 @@ Build; neun fehlende Matrixfälle und die finalen Aufnahmen wurden danach
|
|||||||
ergänzt. Die beiden Fokuskorrekturen wurden gezielt nachgeprüft. Diese
|
ergänzt. Die beiden Fokuskorrekturen wurden gezielt nachgeprüft. Diese
|
||||||
Nachweise betreffen Linux/OpenGL und die beschriebenen Daten; sie sind
|
Nachweise betreffen Linux/OpenGL und die beschriebenen Daten; sie sind
|
||||||
keine vollständige Windows-/macOS-Laufzeitabnahme oder Freigabe aller Menüs.
|
keine vollständige Windows-/macOS-Laufzeitabnahme oder Freigabe aller Menüs.
|
||||||
|
|
||||||
|
Die [gemeinsame Paarungsanordnung](../fixtures/README.md) ersetzt seit
|
||||||
|
24. Oktober die weit auseinanderliegenden Mannschaftsseiten: Heimname und
|
||||||
|
Heimwappen rechtsbündig zur schmalen Ergebnisspalte, danach Auswärtswappen
|
||||||
|
und Auswärtsname linksbündig.
|
||||||
@@ -18,15 +18,15 @@ std::string report_zone(int rank, int count, int tier) {
|
|||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
std::string App::report_club_button(const std::string &id, bool away) {
|
std::string App::report_club_button(const std::string &id, bool name_first) {
|
||||||
const auto *c = world_->find("clubs", id);
|
const auto *c = world_->find("clubs", id);
|
||||||
if (!c)
|
if (!c)
|
||||||
return "<span>—</span>";
|
return "<span>—</span>";
|
||||||
const auto name = esc(world_->name(*c));
|
const auto name = esc(world_->name(*c));
|
||||||
const auto text = "<span class=\"report-club-name\" title=\"" + name +
|
const auto text = "<span class=\"report-club-name\" title=\"" + name +
|
||||||
"\">" + name + "</span>";
|
"\">" + name + "</span>";
|
||||||
return btn("club-detail", away ? text + crest(c, 42) : crest(c, 42) + text,
|
return btn("club-detail", name_first ? text + crest(c, 42) : crest(c, 42) + text,
|
||||||
std::string("report-club-button ") + (away ? "away " : "") +
|
std::string("report-club-button ") + (name_first ? "name-first " : "") +
|
||||||
(manager(snap()).value("club", "") == id ? "current" : ""),
|
(manager(snap()).value("club", "") == id ? "current" : ""),
|
||||||
"id=\"report-club-" + esc(id) + "\" data-id=\"" + esc(id) + "\"");
|
"id=\"report-club-" + esc(id) + "\" data-id=\"" + esc(id) + "\"");
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ std::string App::render_reports(const std::string &mode) {
|
|||||||
{"points", "Punkte"}, {"gf", "Tore"}, {"diff", "Diff."}};
|
{"points", "Punkte"}, {"gf", "Tore"}, {"diff", "Diff."}};
|
||||||
std::vector<double> widths;
|
std::vector<double> widths;
|
||||||
if (matches)
|
if (matches)
|
||||||
widths = {1104, 400, 1104}; // Match card has two 2dp borders.
|
widths = {1224, 160, 1224}; // Match card has two 2dp borders.
|
||||||
else if (strengths) {
|
else if (strengths) {
|
||||||
widths.push_back(2612 * .38);
|
widths.push_back(2612 * .38);
|
||||||
for (int i = 0; i < 5; ++i) widths.push_back(2612 * .62 / 5);
|
for (int i = 0; i < 5; ++i) widths.push_back(2612 * .62 / 5);
|
||||||
@@ -123,7 +123,7 @@ std::string App::render_reports(const std::string &mode) {
|
|||||||
(!matches && !strengths && column == 5 ? " form" : "") +
|
(!matches && !strengths && column == 5 ? " form" : "") +
|
||||||
"\" role=\"cell\" style=\"width:" + scalar(widths[column]) + "dp;\">";
|
"\" role=\"cell\" style=\"width:" + scalar(widths[column]) + "dp;\">";
|
||||||
if (matches && column != 1)
|
if (matches && column != 1)
|
||||||
body += report_club_button(row.at(column == 0 ? "home" : "away").get<std::string>(), column == 2);
|
body += report_club_button(row.at(column == 0 ? "home" : "away").get<std::string>(), column == 0);
|
||||||
else if (!matches && column == 0) {
|
else if (!matches && column == 0) {
|
||||||
if (!strengths) {
|
if (!strengths) {
|
||||||
const auto zone = report_zone(row.value("rank", 0), int(rows.size()), tier);
|
const auto zone = report_zone(row.value("rank", 0), int(rows.size()), tier);
|
||||||
|
|||||||
+13
-23
@@ -562,27 +562,17 @@ std::string App::render_opening() {
|
|||||||
const size_t a = size_t(index * 2), b = a + 1;
|
const size_t a = size_t(index * 2), b = a + 1;
|
||||||
if (b >= pool.size())
|
if (b >= pool.size())
|
||||||
return std::string();
|
return std::string();
|
||||||
const auto label_for = [&](const Json *c, bool home) {
|
const auto label_for = [&](const Json *c, bool home, bool visible) {
|
||||||
return "<span class=\"club-label\" style=\"flex:1;justify-content:" +
|
const auto text = "<span class=\"opening-pair-name\">" +
|
||||||
std::string(home ? "flex-end" : "flex-start") + ";\">" +
|
(visible ? esc(world_->name(*c)) : home ? "Heim" : "Noch nicht gezogen") + "</span>";
|
||||||
(home ? "<span>" + esc(world_->name(*c)) + "</span>" +
|
const auto logo = visible ? crest(c, size) : "";
|
||||||
crest(c, size)
|
return "<span class=\"opening-pair-side " + std::string(home ? "home" : "away") + "\">" +
|
||||||
: crest(c, size) + "<span>" + esc(world_->name(*c)) +
|
(home ? text + logo : logo + text) + "</span>";
|
||||||
"</span>") +
|
|
||||||
"</span>";
|
|
||||||
};
|
};
|
||||||
return "<div class=\"row\" style=\"height:100%;gap:18dp;\"><span "
|
return "<div class=\"opening-pair-row " + std::string(size == 36 ? "compact" : size == 66 ? "current" : "") +
|
||||||
"class=\"small\" style=\"width:40dp;text-align:right;\">" +
|
"\"><span class=\"opening-pair-number\"><span>" + std::to_string(index + 1) + "</span></span>" +
|
||||||
std::to_string(index + 1) + "</span>" +
|
label_for(pool[a], true, known > 0) + "<span class=\"opening-pair-versus\"><span>–</span></span>" +
|
||||||
(known > 0 ? label_for(pool[a], true)
|
label_for(pool[b], false, known > 1) + "<span class=\"opening-pair-counter\" aria-hidden=\"true\"></span></div>";
|
||||||
: "<span class=\"muted\" "
|
|
||||||
"style=\"flex:1;text-align:right;\">Heim</span>") +
|
|
||||||
"<span class=\"muted\" "
|
|
||||||
"style=\"width:30dp;text-align:center;\">–</span>" +
|
|
||||||
(known > 1 ? label_for(pool[b], false)
|
|
||||||
: "<span class=\"muted\" style=\"flex:1;\">Noch nicht "
|
|
||||||
"gezogen</span>") +
|
|
||||||
"</div>";
|
|
||||||
};
|
};
|
||||||
body = "<h2 style=\"font-size:46dp;\">" +
|
body = "<h2 style=\"font-size:46dp;\">" +
|
||||||
std::string(opening_page_ == 3 ? "1. Runde" : "DFB-Pokal") +
|
std::string(opening_page_ == 3 ? "1. Runde" : "DFB-Pokal") +
|
||||||
@@ -600,13 +590,13 @@ std::string App::render_opening() {
|
|||||||
const int current = std::max(0, (draw_revealed_ - 1) / 2),
|
const int current = std::max(0, (draw_revealed_ - 1) / 2),
|
||||||
known = draw_revealed_ ? draw_revealed_ - current * 2 : 0;
|
known = draw_revealed_ ? draw_revealed_ - current * 2 : 0;
|
||||||
body += "<div class=\"panel\" style=\"position:absolute;" +
|
body += "<div class=\"panel\" style=\"position:absolute;" +
|
||||||
rect(130, 1026, 2348, 126) +
|
rect(130, 1026, 2352, 126) +
|
||||||
"padding:10dp 28dp;font-size:38dp;\">" +
|
"padding:10dp 28dp;font-size:38dp;\">" +
|
||||||
pair(current, known, 66) + "</div>";
|
pair(current, known, 66) + "</div>";
|
||||||
for (int i = std::max(0, current - 3); i < current; ++i)
|
for (int i = std::max(0, current - 3); i < current; ++i)
|
||||||
body +=
|
body +=
|
||||||
"<div style=\"position:absolute;" +
|
"<div style=\"position:absolute;" +
|
||||||
rect(158, 1190 + (i - std::max(0, current - 3)) * 155, 2292, 145) +
|
rect(158, 1190 + (i - std::max(0, current - 3)) * 155, 2296, 145) +
|
||||||
"border-bottom:2dp var(--border);\">" + pair(i, 2, 42) + "</div>";
|
"border-bottom:2dp var(--border);\">" + pair(i, 2, 42) + "</div>";
|
||||||
body += "<div class=\"bottom-controls\" "
|
body += "<div class=\"bottom-controls\" "
|
||||||
"style=\"justify-content:flex-end;\">" +
|
"style=\"justify-content:flex-end;\">" +
|
||||||
@@ -618,7 +608,7 @@ std::string App::render_opening() {
|
|||||||
} else {
|
} else {
|
||||||
for (int column = 0; column < 2; ++column) {
|
for (int column = 0; column < 2; ++column) {
|
||||||
body += "<div class=\"panel\" style=\"position:absolute;" +
|
body += "<div class=\"panel\" style=\"position:absolute;" +
|
||||||
rect(column * 1321, 154, 1287, 1500) + "padding:12dp 18dp;\">";
|
rect(column * 1323, 154, 1289, 1500) + "padding:12dp 18dp;\">";
|
||||||
for (int row = 0; row < 16; ++row)
|
for (int row = 0; row < 16; ++row)
|
||||||
body += "<div style=\"height:92dp;font-size:27dp;border-bottom:1dp "
|
body += "<div style=\"height:92dp;font-size:27dp;border-bottom:1dp "
|
||||||
"var(--border);\">" +
|
"var(--border);\">" +
|
||||||
|
|||||||
+28
-1
@@ -307,6 +307,7 @@ class App final : public Rml::EventListener {
|
|||||||
std::string last_rendered_menu_;
|
std::string last_rendered_menu_;
|
||||||
std::optional<float> training_scroll_;
|
std::optional<float> training_scroll_;
|
||||||
std::optional<float> report_scroll_;
|
std::optional<float> report_scroll_;
|
||||||
|
float fixture_half_width_ = -1.f;
|
||||||
std::string last_report_state_, report_picker_, report_detail_kind_,
|
std::string last_report_state_, report_picker_, report_detail_kind_,
|
||||||
report_detail_club_, report_detail_player_, report_detail_return_focus_,
|
report_detail_club_, report_detail_player_, report_detail_return_focus_,
|
||||||
report_option_to_scroll_;
|
report_option_to_scroll_;
|
||||||
@@ -603,7 +604,7 @@ class App final : public Rml::EventListener {
|
|||||||
void init_desktop();
|
void init_desktop();
|
||||||
std::string widget(const std::string &, const Json &);
|
std::string widget(const std::string &, const Json &);
|
||||||
std::string render_reports(const std::string &);
|
std::string render_reports(const std::string &);
|
||||||
std::string report_club_button(const std::string &, bool away = false);
|
std::string report_club_button(const std::string &, bool name_first = false);
|
||||||
std::string render_report_detail();
|
std::string render_report_detail();
|
||||||
bool report_detail_action(const std::string &, Rml::Element *);
|
bool report_detail_action(const std::string &, Rml::Element *);
|
||||||
std::string report_picker(const std::string &, double, double);
|
std::string report_picker(const std::string &, double, double);
|
||||||
@@ -686,6 +687,7 @@ class App final : public Rml::EventListener {
|
|||||||
dirty_ = true;
|
dirty_ = true;
|
||||||
}
|
}
|
||||||
void render() {
|
void render() {
|
||||||
|
fixture_half_width_ = -1.f;
|
||||||
// A window-close save prompt can leave a menu while its local dialog is
|
// A window-close save prompt can leave a menu while its local dialog is
|
||||||
// open. Never keep that menu's modal/input gate in the destination view.
|
// open. Never keep that menu's modal/input gate in the destination view.
|
||||||
if (menu_ != last_rendered_menu_) {
|
if (menu_ != last_rendered_menu_) {
|
||||||
@@ -790,6 +792,29 @@ class App final : public Rml::EventListener {
|
|||||||
if (auto *button = element("popup")->QuerySelector("button"))
|
if (auto *button = element("popup")->QuerySelector("button"))
|
||||||
button->Focus();
|
button->Focus();
|
||||||
}
|
}
|
||||||
|
bool center_fixture_columns() {
|
||||||
|
auto *list = element("report-list");
|
||||||
|
if (!list || !list->IsClassSet("match-list"))
|
||||||
|
return false;
|
||||||
|
auto *score = list->QuerySelector(".report-cell.score");
|
||||||
|
if (!score)
|
||||||
|
return false;
|
||||||
|
const auto &box = list->GetBox();
|
||||||
|
// Rml rounds borders to physical pixels. Use the actual full inner width,
|
||||||
|
// independently of the scrollport, so fractional density cannot move scores.
|
||||||
|
const float inner = box.GetSize(Rml::BoxArea::Border).x -
|
||||||
|
box.GetEdge(Rml::BoxArea::Border, Rml::BoxEdge::Left) -
|
||||||
|
box.GetEdge(Rml::BoxArea::Border, Rml::BoxEdge::Right);
|
||||||
|
const float half = std::max(0.f, (inner - score->GetBox().GetSize(Rml::BoxArea::Border).x) / 2.f);
|
||||||
|
if (std::abs(half - fixture_half_width_) < .001f)
|
||||||
|
return false;
|
||||||
|
fixture_half_width_ = half;
|
||||||
|
Rml::ElementList sides;
|
||||||
|
list->QuerySelectorAll(sides, ".report-cell.first,.report-cell:last-child");
|
||||||
|
for (auto *side : sides)
|
||||||
|
side->SetProperty("width", scalar(half) + "px");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
void frame() {
|
void frame() {
|
||||||
flush_selects();
|
flush_selects();
|
||||||
if (ticket_)
|
if (ticket_)
|
||||||
@@ -801,6 +826,8 @@ class App final : public Rml::EventListener {
|
|||||||
context_->Update();
|
context_->Update();
|
||||||
if (center_selects(*doc_))
|
if (center_selects(*doc_))
|
||||||
context_->Update();
|
context_->Update();
|
||||||
|
if (center_fixture_columns())
|
||||||
|
context_->Update();
|
||||||
if (training_scroll_) {
|
if (training_scroll_) {
|
||||||
if (auto *roster = element("training-roster"))
|
if (auto *roster = element("training-roster"))
|
||||||
roster->SetScrollTop(*training_scroll_);
|
roster->SetScrollTop(*training_scroll_);
|
||||||
|
|||||||
Reference in new issue
Block a user