mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[glass] Shorten SmartDashboard window names (#3096)
Instead of "/SmartDashboard/name" they now default to "name (SmartDashboard)". This allows for smaller windows while preserving the name without requiring user customization.
This commit is contained in:
@@ -153,6 +153,10 @@ void NetworkTablesProvider::Show(ViewEntry* entry, Window* window) {
|
||||
if (!window) {
|
||||
return;
|
||||
}
|
||||
if (wpi::StringRef{entry->name}.startswith("/SmartDashboard/")) {
|
||||
window->SetDefaultName(wpi::StringRef{entry->name}.drop_front(16) +
|
||||
" (SmartDashboard)");
|
||||
}
|
||||
entry->window = window;
|
||||
|
||||
// create view
|
||||
|
||||
Reference in New Issue
Block a user