Skip to content

fix paint arrow up/down directions flipped#19242

Merged
TurboGit merged 3 commits intomasterfrom
paint-arrow-up-down
Sep 1, 2025
Merged

fix paint arrow up/down directions flipped#19242
TurboGit merged 3 commits intomasterfrom
paint-arrow-up-down

Conversation

@zisoft
Copy link
Collaborator

@zisoft zisoft commented Aug 23, 2025

In dtgtk_cairo_paint_arrow() the vertical orientation is flipped:

  • CPF_DIRECTION_DOWN draws an up-arrow
  • CPF_DIRECTION_UP draws a down-arrow

See the histogram where CPF_DIRECTION_DOWN is used to draw an UP-arrow:

Bildschirmfoto 2025-08-23 um 19 45 54

In `dtgtk_cairo_paint_arrow()` the vertical orientation is flipped:

- `CPF_DIRECTION_DOWN` draws an up-arrow
- `CPF_DIRECTION_UP` draws a down-arrow
@dterrahe
Copy link
Contributor

dterrahe commented Aug 24, 2025

The whole rotation thing can be simplified as well, as I've done here dterrahe@e9e6f58
No need to use cos/sin just to get +1/0/-1

EDIT: of course then you'd have to adjust the drawing (cairo_line_to) rather than reversing the meaning of rotation here.

@zisoft
Copy link
Collaborator Author

zisoft commented Aug 25, 2025

I just looked for the flipped arrows, didn't look for the code itself.

Your solution looks good, why not merge it?

@dterrahe
Copy link
Contributor

why not merge it?

Not a priority. I'd rather see #19118 merged since that is at much higher risk of bit rot.

But since you were looking at the same file I thought you might be interested in running with it.

@zisoft zisoft added the wip pull request in making, tests and feedback needed label Aug 25, 2025
@zisoft zisoft removed the wip pull request in making, tests and feedback needed label Aug 25, 2025
@zisoft
Copy link
Collaborator Author

zisoft commented Aug 25, 2025

Looks good. I cherry-picked your commit and adjusted the arrow directions in the histogram. They now match their names.

@TurboGit TurboGit added this to the 5.4 milestone Sep 1, 2025
@TurboGit TurboGit added bugfix pull request fixing a bug scope: UI user interface and interactions scope: codebase making darktable source code easier to manage labels Sep 1, 2025
Copy link
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TurboGit TurboGit merged commit 5f92c42 into master Sep 1, 2025
7 checks passed
@TurboGit TurboGit deleted the paint-arrow-up-down branch September 1, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix pull request fixing a bug scope: codebase making darktable source code easier to manage scope: UI user interface and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants