Skip to content

feat: center dimensions and add independent text color flag (-t) - #199

Open
2004sfm wants to merge 5 commits into
emersion:masterfrom
2004sfm:feature/center-dimensions-and-text-color
Open

feat: center dimensions and add independent text color flag (-t)#199
2004sfm wants to merge 5 commits into
emersion:masterfrom
2004sfm:feature/center-dimensions-and-text-color

Conversation

@2004sfm

@2004sfm 2004sfm commented Jul 19, 2026

Copy link
Copy Markdown

Problem:

When using -d , the text is drawn with a fixed offset outside the selection box, causing it to be cut off if the selection hits the right or bottom edges of the screen. Furthermore, it inherits the border color, which can cause contrast issues.

Solution:

  • Centered the text inside the selection box using cairo_text_extents so it's always fully visible regardless of screen edges.
  • Added a new -t flag to allow users to set an independent text color. If not provided, it gracefully falls back to the border color.

2004sfm added 5 commits July 19, 2026 02:07
This commit introduces two improvements for the dimensions display (-d):

1. Centers the dimensions text within the selection box using cairo_text_extents to prevent the text from being cut off at screen edges.

2. Introduces a new '-t' flag to allow setting an independent color for the dimensions text, falling back to the border color if not provided.
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.

1 participant