From c31367c7610ea7e0f1774bb938ac4a0d24f4cc76 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Mon, 20 Feb 2006 23:12:08 +0000 Subject: [PATCH] Selected comments are now highlighted in a different color Originally committed to SVN as r87. --- core/base_grid.cpp | 16 ++++++++++------ core/changelog.txt | 1 + core/options.cpp | 1 + 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/core/base_grid.cpp b/core/base_grid.cpp index 95d918ba7..c3609905d 100644 --- a/core/base_grid.cpp +++ b/core/base_grid.cpp @@ -282,15 +282,17 @@ void BaseGrid::DrawImage(wxDC &dc) { // Row colors std::vector rowColors; std::vector foreColors; - rowColors.push_back(wxBrush(wxColour(255,255,255))); // 0 = Standard + rowColors.push_back(wxBrush(wxColour(255,255,255))); // 0 = Standard foreColors.push_back(wxColour(0,0,0)); - rowColors.push_back(wxBrush(wxColour(165,207,231))); // 1 = Header + rowColors.push_back(wxBrush(wxColour(165,207,231))); // 1 = Header foreColors.push_back(wxColour(0,0,0)); - rowColors.push_back(wxBrush(Options.AsColour(_T("Grid selection background")))); // 2 = Selected + rowColors.push_back(wxBrush(Options.AsColour(_T("Grid selection background")))); // 2 = Selected foreColors.push_back(Options.AsColour(_T("Grid selection foreground"))); - rowColors.push_back(wxBrush(Options.AsColour(_T("Grid comment background")))); // 3 = Commented + rowColors.push_back(wxBrush(Options.AsColour(_T("Grid comment background")))); // 3 = Commented foreColors.push_back(Options.AsColour(_T("Grid selection foreground"))); - rowColors.push_back(wxBrush(Options.AsColour(_T("Grid inframe background")))); // 4 = Video Highlighted + rowColors.push_back(wxBrush(Options.AsColour(_T("Grid inframe background")))); // 4 = Video Highlighted + foreColors.push_back(Options.AsColour(_T("Grid selection foreground"))); + rowColors.push_back(wxBrush(Options.AsColour(_T("Grid selected comment background")))); // 5 = Commented & selected foreColors.push_back(Options.AsColour(_T("Grid selection foreground"))); // First grid row @@ -393,7 +395,9 @@ void BaseGrid::DrawImage(wxDC &dc) { // Set color curColor = 0; - if (IsInSelection(curRow,0)) curColor = 2; + bool inSel = IsInSelection(curRow,0); + if (inSel && curDiag->Comment) curColor = 5; + else if (inSel) curColor = 2; else if (curDiag->Comment) curColor = 3; else if (Options.AsBool(_T("Highlight subs in frame")) && IsDisplayed(curDiag)) curColor = 4; } diff --git a/core/changelog.txt b/core/changelog.txt index fd4cd6e78..2123061a7 100644 --- a/core/changelog.txt +++ b/core/changelog.txt @@ -35,6 +35,7 @@ Please visit http://aegisub.net to download latest version - Added a simple audio resync method for video playback (AMZ) - Audio timing will now apply to all selected lines, as well as active line (AMZ) - Rows colliding with the currently active one will now be highlighted in grid (AMZ) +- Selected comments are now highlighted in a different color (AMZ) = 1.09 beta - 2006.01.16 =========================== diff --git a/core/options.cpp b/core/options.cpp index 2460f568e..facda3153 100644 --- a/core/options.cpp +++ b/core/options.cpp @@ -110,6 +110,7 @@ void OptionsManager::LoadDefaults() { SetColour(_T("Grid selection background"),wxColour(206,255,231)); SetColour(_T("Grid selection foreground"),wxColour(0,0,0)); SetColour(_T("Grid comment background"),wxColour(216,222,245)); + SetColour(_T("Grid selected comment background"),wxColour(211,238,238)); SetColour(_T("Grid inframe background"),wxColour(255,253,234)); SetInt(_T("Grid hide overrides"),1); wchar_t temp = 0x2600;