Skip to content

Optimizing painting#432

Merged
Hirogen merged 6 commits intoDevelopmentfrom
optimizing_painting
Jun 30, 2025
Merged

Optimizing painting#432
Hirogen merged 6 commits intoDevelopmentfrom
optimizing_painting

Conversation

@Hirogen
Copy link
Copy Markdown
Collaborator

@Hirogen Hirogen commented Jun 23, 2025

This just removes duplicated code from CellPainting, but i needs the #424 to be merged first, as it includes all the changes from this one, as a prerequisite

@Hirogen Hirogen requested a review from Copilot June 23, 2025 14:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the painting logic in PaintHelper to remove duplicated code and centralize color/brush selection, and cleans up unused renderer classes and project file entries.

  • Refactored PaintHelper.CellPainting signature and moved repeated background/selection logic into new helper methods (GetBackColorFromHighlightEntry, GetBrushForFocusedControl, etc.).
  • Deleted redundant ToolStrip renderer and separator extension classes now covered by unified drawing logic.
  • Cleaned up .csproj to remove duplicate resource includes.

Reviewed Changes

Copilot reviewed 29 out of 43 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/LogExpert.UI/LogExpert.UI.csproj Removed obsolete <EmbeddedResource> and <Compile> items.
src/LogExpert.UI/Entities/PaintHelper.cs Centralized cell-paint logic, added helper methods.
src/LogExpert.UI/Extensions/Forms/*.cs Deleted duplicated custom renderer/separator classes.
src/LogExpert.UI/Dialogs/HighlightDialog.cs Updated item drawing to use PaintHelper color helpers.
src/LogExpert.UI/Dialogs/BookmarkWindow.cs Wired new CellPainting signature; renamed fields/events.
src/LogExpert.UI/Controls/LogWindow/* Updated calls to CellPainting with new parameters.
src/LogExpert.UI/Controls/ColorComboBox.cs Converted manual Items.Add calls to collection literal.
src/LogExpert.Core/Interface/ILogWindow.cs Added new GetLogLineWithWait method; cleaned up signatures.
src/LogExpert.Core/EventArguments/BookmarkEventArgs.cs Fixed class declaration syntax and namespace imports.
src/LogExpert.Core/Entities/SearchParams.cs Adjusted namespace to LogExpert.Entities.
src/LogExpert.Core/Config/Settings.cs Adjusted namespace import for SearchParams.
src/ColumnizerLib/Extensions/LogLineExtensions.cs Fixed namespace and TODO comment.
global.json Bumped SDK from 9.0.101 to 9.0.301.
.github/workflows/test_dotnet.yml Updated .NET version from 8.0.x to 9.0.x.
Files not reviewed (5)
  • src/LogExpert.UI/Controls/LogWindow/LogWindow.designer.cs: Language not supported
  • src/LogExpert.UI/Controls/LogWindow/PatternWindow.Designer.cs: Language not supported
  • src/LogExpert.UI/Controls/LogWindow/TimeSpreadigControl.Designer.cs: Language not supported
  • src/LogExpert.UI/Dialogs/BookmarkWindow.Designer.cs: Language not supported
  • src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.designer.cs: Language not supported
Comments suppressed due to low confidence (1)

src/LogExpert.UI/Entities/PaintHelper.cs:523

  • Initializing mergedList as an array literal [] will make it a fixed-size array, causing Add calls to throw. Use a mutable list, e.g., var mergedList = new List<HighlightMatchEntry>();.
        IList<HighlightMatchEntry> mergedList = [];

Hirogen and others added 4 commits June 23, 2025 16:44
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Conflicts:
#	src/LogExpert.UI/Entities/PaintHelper.cs
@Hirogen Hirogen merged commit fc898d9 into Development Jun 30, 2025
1 check passed
@Hirogen Hirogen deleted the optimizing_painting branch June 30, 2025 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants