Skip to content

Add option to disable the Circle Counter outline - #4882

Open
bekirsoylu wants to merge 1 commit into
flameshot-org:masterfrom
bekirsoylu:circle-counter-outline-option
Open

Add option to disable the Circle Counter outline#4882
bekirsoylu wants to merge 1 commit into
flameshot-org:masterfrom
bekirsoylu:circle-counter-outline-option

Conversation

@bekirsoylu

Copy link
Copy Markdown

Closes #3580

Problem

The Circle Counter bubble is always drawn with a contrasting ring around it, and there is currently no way to turn it off.

The ring appears black for both light and dark draw colors, but by two different mechanisms in CircleCountTool::process():

  • an outer ellipse is filled with antiContrastColor — this is what shows on dark draw colors (e.g. red)
  • the pen is set to contrastColor and strokes both ellipses — this is what shows on light draw colors (e.g. green)

So disabling only one of the two would still leave a dark border for half the palette.

Change

Adds a drawCircleCounterOutline option plus a matching checkbox in Configuration > General, and documents it in flameshot.example.ini.

When the option is off, the outer ellipse is skipped and the pen is set to Qt::NoPen before the bubble is drawn, which removes both sources of the ring. The text pen is unaffected — it is reassigned to contrastColor before drawText() — so the number keeps its automatic contrast color.

Default behaviour

The option defaults to true, so the rendering is byte-for-byte unchanged for existing users, and nothing is written to the config file unless the option is actually toggled.

Notes

This was previously raised in #3008, where the response was that the ring is intended design and could be made customizable via a feature request. #3580 is that request; this PR implements it.

Testing

Built and run on Windows 11 (MSVC 19.44, Qt 6.9.3, CMake 4.4). Verified that the checkbox is checked by default, that toggling it persists to flameshot.ini, and that counter bubbles render without the ring for both dark and light draw colors. clang-format reports no changes to the modified regions.

The counter bubble is always drawn with a contrasting ring. An outer
ellipse is filled with the anti-contrast color and the pen strokes both
ellipses with the contrast color, so the ring reads as black either way:
on dark draw colors it comes from the outer ellipse's fill, and on light
ones from the pen. There was no way to turn it off.

Add a `drawCircleCounterOutline` option together with a checkbox in
Configuration > General. It defaults to true, so the existing appearance
is unchanged.

Closes flameshot-org#3580
@mmahmoudian

Copy link
Copy Markdown
Member

LGTM

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.

options of not draw the outline of the Circle Counter

2 participants