Skip to content

Better "highlighting" of the selected lines. #14

Closed
2 of 2 issues completed
Closed

Description

@hilsonp

When I select a line, it becomes white on blue background.
I therefore loose any highlighting set.
It is also a bit strong on the eyes.

Could you allow as an option to have the selection simply surrounced by a rectangle or drawing a line for the top and bottom lines of the "row".

Then, you may have a multi line selection which is why I think the "rectangle" approach might be nicer.

Thanks for taking over this project.

Activity

  1. zarunbal commented on Nov 28, 2017

    @zarunbal
    Collaborator

    I Label this as enhancement.

    The single line should be possible to achive but the multi line rectangle could be tricky (because its drawn line by line)

  2. hilsonp commented on Nov 30, 2017

    @hilsonp
    Author

    Doing it line by line would be really useful already.

  3. Hirogen commented on Sep 6, 2026

    @Hirogen
    Member

    Summary: Configure selected log content's appearance in the Highlights dialog, including a custom selection color and an optional outline around contiguous selected blocks.

    Current behavior:
    Selected cells receive a solid selection background. Text painting suppresses word-highlight backgrounds and converts black foreground text to white. Main and filtered log views share this behavior in LogWindow; bookmark content has a separate implementation in PaintHelper. No existing selection appearance control was found in the Highlights dialog, Settings dialog, or preferences model. No prior rejection knowledge base was present.

    Feasibility and verification:
    The application owns cell painting, so the feature does not require replacing the grid or refactoring highlight matching. A small shared selection-painting helper can coordinate styling and outline drawing across the renderers. This conclusion comes from source inspection, not an interactive rendering test. Full issue comment history could not be retrieved; recheck it before implementation if access is available.

    Maintainer decisions:

    • Put configuration in the Highlights dialog.
    • Make the change opt-in and require user confirmation.
    • Use one outline around each contiguous selected block, without internal outlines between selected rows.
    • Provide a checkbox so the user can switch the outline behavior.
    • Share selection painting to avoid duplicated logic.

    Proposed interpretation for review:

    • A global "Selection highlight" section in HighlightDialog, independent of the selected Highlight Group.
    • "Change selection highlight color..." opens a color picker. The chosen color supplies the filled selection background or the outline color, depending on the checkbox.
    • "Outline selected blocks" is unchecked by default. Checking it preserves normal highlight foregrounds, backgrounds, and text styles, adding only a selection outline.
    • The existing Highlights dialog OK button confirms and saves both controls; Cancel or closing the dialog discards pending changes. Accepting the color picker alone does not commit application settings.
    • No custom color by default: retain existing system/theme selection behavior. Provide a way to restore the default color.
    • Apply consistently to main, filtered, and bookmark log content. In cell-selection mode, outline connected selected cells; in full-row mode, outline adjacent selected rows in displayed order. Separate blocks receive separate outlines.

    Key interfaces:

    • HighlightDialog: owns an editable copy of selection appearance alongside its existing editable Highlight Groups.
    • LogTabWindow.ShowHighlightSettingsDialog: commits selection appearance only on OK, persists it, and notifies affected views.
    • Persisted configuration: optional custom selection color and an outline-enabled flag, with defaults preserving existing installations. UI placement is in Highlights even if storage uses the existing Preferences model, which already stores Highlight Groups.
    • LogWindow and PaintHelper: consume a shared selection-painting helper. Outline mode must bypass both solid selection fill and selection-specific text color/background overrides.
    • ILogPaintContextUI: pass the selection appearance to bookmark painting through a narrow interface or explicit argument; avoid introducing unrelated dependencies.

    Acceptance criteria:

    • Selection color and outline controls are available in the Highlights dialog, including when no log file is open.
    • Without opting in, existing selection behavior remains unchanged; settings files without the new fields retain those defaults.
    • OK applies and persists changes; Cancel and window close discard them. Settings survive application restart.
    • Filled mode uses the chosen selection color with readable foreground handling; outline mode preserves line and word highlight colors and styles, including control-character substitution styling.
    • A contiguous multi-row selection has one external outline and no internal horizontal selection borders. Disjoint blocks remain separate. Cell-selection mode follows the same external-boundary rule.
    • Selection remains identifiable with and without focus in light and dark modes.
    • Outlines update without stale borders when selection grows, shrinks, or moves, and render correctly with scrolling, clipped rows, reordered/hidden columns, and DPI scaling.
    • Main, filtered, and bookmark log content use the shared helper and preserve bookmark indicators.
    • Regression tests cover configuration defaults/round-trip, confirmation/cancellation, color policy, and block boundary decisions. Perform a Windows UI smoke check for actual rendering, scrolling, focus, and multi-selection.

    Out of scope:

    • Replacing the grid, rewriting all text painting, or changing highlight matching, rule order, triggers, or filtering.
    • Separate styling per Highlight Entry or Highlight Group.
    • Configurable line thickness, dashed styles, opacity, or a full theme editor.
  4. Hirogen commented on Sep 6, 2026

    @Hirogen
    Member

    Different Color for Selection
    grafik

    Color Selection in Highlight Settings Dialog
    grafik

    Outline
    grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementthis will make things better

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions