A native macOS / windows / Linux database IDE built with Swift and AppKit. Connect to PostgreSQL, MySQL, SQLite, and Redis from a single app with a fast, keyboard-driven interface.
C++
style(mcp): highlight selected Activity row for visual feedback
DangHuynha463f792414d
diff --git a/windows/Gridex/MCPPage.cpp b/windows/Gridex/MCPPage.cppindex 58a28ee..08c6c7b 100644--- a/windows/Gridex/MCPPage.cpp+++ b/windows/Gridex/MCPPage.cpp@@ -746,6 +746,24 @@ namespace winrt::Gridex::implementationif (index < 0 || index >= static_cast<int>(cachedActivity_.size())) return;const auto& e = cachedActivity_[index];+ selectedActivityIndex_ = index;++ // Highlight the active row on the left table. Iterate the+ // row panel's Border children and swap Background — accent+ // tint on the selected row, transparent elsewhere. Cheap+ // because we only have up to 200 rows.+ if (auto rows = ActRowsPanel())+ {+ const auto sel = SolidColorBrush(ColorHelper::FromArgb(60, 130, 90, 220));+ const auto none = SolidColorBrush(ColorHelper::FromArgb(0, 0, 0, 0));+ auto kids = rows.Children();+ for (uint32_t i = 0; i < kids.Size(); ++i)+ {+ if (auto b = kids.GetAt(i).try_as<Border>())+ b.Background(static_cast<int>(i) == index ? sel : none);+ }+ }+panel.Children().Clear();auto addHeader = [&](winrt::hstring text) {diff --git a/windows/Gridex/MCPPage.h b/windows/Gridex/MCPPage.hindex 7be920b..19e8921 100644--- a/windows/Gridex/MCPPage.h+++ b/windows/Gridex/MCPPage.h@@ -72,6 +72,7 @@ namespace winrt::Gridex::implementation// Cache tailed audit entries so a click on a row can look// up the full record by index. Populated by RefreshActivityTab.std::vector<DBModels::MCPAuditEntry> cachedActivity_;+ int selectedActivityIndex_ = -1;};}