Skip to content

Support multiple independent rulers #228

Description

@pascalpp

Summary

Allow users to create multiple independent rulers. Each ruler is a first-class measuring object with a horizontal wing and a vertical wing; either wing can be shown or hidden.

Today Free Ruler has one horizontal ruler and one vertical ruler, optionally grouped into a transient grouped window. In this feature, the grouped/L-shaped ruler becomes the primary object. Users can create multiple independent rulers instead of switching between grouped and separate modes.

Product Model

  • A ruler means one independent L-shaped ruler object with horizontal and vertical wings.
  • Each ruler owns its own settings, geometry, window state, and wing visibility.
  • New rulers should initially show both wings, unless a later UX pass finds a clearer creation affordance for horizontal-only or vertical-only rulers.
  • Cmd-W closes the active ruler and removes it from the autosaved ruler set.
  • H and V hotkeys toggle the active ruler's horizontal and vertical wing visibility.
  • To avoid invisible persisted rulers, wing toggles should not leave a ruler with no visible wings; Cmd-W is the removal path.
  • The old grouped/separate mode can go away. Users who want separated measurement regions can create additional rulers.
  • There is no ruler list or document manager in the first version. The visible set of rulers is transient and autosaved.

Settings Model

  • Ruler settings should be per-ruler, including unit, color, foreground opacity, background opacity, float behavior, shadow, zero corner, wing visibility, position, and size.
  • The main Preferences window becomes defaults for new rulers and should be titled/labeled accordingly, for example Defaults for New Rulers.
  • A new Ruler Settings surface edits the active ruler. Preferred direction: reuse the same settings content as Preferences and present it as a sheet attached to the ruler window.

Behavior

  • Launch restores the autosaved live ruler set from the last clean quit.
  • Fresh installs, or launches with no saved rulers, create one default ruler.
  • Closed rulers are forgotten and are not restored on next launch.
  • Creating a new ruler copies the current defaults into an independent ruler instance.
  • Menu actions and hotkeys apply to the frontmost/active ruler.
  • App-wide timer, mouse tick drawing, alignment, reset, and floating behavior continue to work with any number of rulers.

Child Issues

Child issues should be created and linked after this parent exists. Planned breakdown:

  • Phase 1: Define first-class ruler instance state
  • Phase 2: Add a multi-ruler manager and app lifecycle
  • Phase 3: Make grouped ruler windows the primary ruler UI
  • Phase 4: Split default preferences from per-ruler settings
  • Phase 5: Retarget commands, menus, and hotkeys to the active ruler
  • Phase 6: Autosave, restore, and migrate ruler sets
  • Phase 7: Verify multi-ruler integration, localization, and help

Acceptance Criteria

  • Users can create multiple independent rulers in one app session.
  • Each ruler can show horizontal only, vertical only, or both wings.
  • Each ruler has independent settings and geometry.
  • Closing a ruler forgets it; quitting and relaunching restores only the remaining live rulers.
  • The old grouped/separate preference is removed or fully retired from user-facing behavior.
  • Preferences configure defaults for new rulers; Ruler Settings configures the active ruler.
  • Core behavior is covered with focused unit tests and verified with manual integration QA.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions