Add option to disable the Circle Counter outline - #4882
Open
bekirsoylu wants to merge 1 commit into
Open
Conversation
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
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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():antiContrastColor— this is what shows on dark draw colors (e.g. red)contrastColorand 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
drawCircleCounterOutlineoption plus a matching checkbox in Configuration > General, and documents it inflameshot.example.ini.When the option is off, the outer ellipse is skipped and the pen is set to
Qt::NoPenbefore the bubble is drawn, which removes both sources of the ring. The text pen is unaffected — it is reassigned tocontrastColorbeforedrawText()— 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-formatreports no changes to the modified regions.