Resolve RmlUi deprecation warning, add L1/R1 tabbing to MenuBar

This commit is contained in:
Irastris
2026-05-07 13:48:12 -04:00
parent ff054f6f47
commit cf12d19860
4 changed files with 17 additions and 7 deletions
+4 -4
View File
@@ -343,7 +343,7 @@ icon.celebration {
color: rgba(224, 219, 200, 45%);
}
progressbar {
progress {
display: block;
width: 100%;
height: 6dp;
@@ -352,12 +352,12 @@ progressbar {
margin: 6dp 0 2dp 0;
}
progressbar.progress-done fill {
progress.progress-done fill {
background-color: #44aa22;
border-radius: 3dp;
}
progressbar.progress-ongoing fill {
progress.progress-ongoing fill {
background-color: #2255bb;
border-radius: 3dp;
}
@@ -460,7 +460,7 @@ window.modal.danger .modal-header icon {
color: #FFFFFF;
}
progressbar.verification-progress-bar {
progress.verification-progress-bar {
height: 8dp;
margin: 2dp 0 0 0;
}
+1 -1
View File
@@ -41,7 +41,7 @@ Rml::String build_achievement_info_rml(const Achievement& a) {
if (a.isCounter) {
float fraction = a.goal > 0 ? float(a.progress) / float(a.goal) : 1.0f;
s += fmt::format(
R"(<progressbar value="{:.3f}" class="{}"/>)"
R"(<progress value="{:.3f}" class="{}"/>)"
R"(<span class="achievement-progress">{} / {}</span>)",
fraction,
a.unlocked ? "progress-done" : "progress-ongoing",
+1 -1
View File
@@ -278,7 +278,7 @@ public:
mFileName = append(content, "div");
mFileName->SetClass("verification-file", true);
mProgress = append(content, "progressbar");
mProgress = append(content, "progress");
mProgress->SetClass("progress-ongoing", true);
mProgress->SetClass("verification-progress-bar", true);
mProgress->SetAttribute("value", 0.f);
+11 -1
View File
@@ -212,6 +212,15 @@ bool TabBar::handle_nav_command(Rml::Event& event, NavCommand cmd) {
if (activeTab != -1) {
currentComponent = activeTab;
}
} else {
int activeTab = tab_containing(event.GetTargetElement());
if (activeTab != -1) {
currentComponent = activeTab;
} else if (mLastFocusedTabIndex >= 0 &&
mLastFocusedTabIndex < static_cast<int>(mTabs.size()))
{
currentComponent = mLastFocusedTabIndex;
}
}
int direction = isNext ? 1 : -1;
if (currentComponent == -1) {
@@ -221,8 +230,9 @@ bool TabBar::handle_nav_command(Rml::Event& event, NavCommand cmd) {
return false;
}
currentComponent = -1;
} else if (cmd == NavCommand::Next) {
currentComponent = -1;
} else {
// Next/Previous require a currently selected tab to navigate from
return false;
}
}