Skip to content

Fix #22767: Ensure that the buttons are spaced to the size of the toolbar window, which is always visible. #22806

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

dan-masek
Copy link
Contributor

@dan-masek dan-masek commented Nov 15, 2022

resolves #22767

This fixes some of the problems -- when toolbars are created in one go, and some go outside the window bounds (when main client are becomes nothing), they will get sized correctly.

However, with WINDOW_NORMAL, some wonkiness still remains and blank buttons tend to appear once in a while (this might be due to the spacers).

Ideally, the trackbars should automatically resize to fit the width of the main window, when said window is resized (either manually when in NORMAL mode, or by code). This might however break some existing code that relies on current behaviour to place multiple trackbars on single row. Any opinions?

Copy link
Contributor

@AleksandrPanov AleksandrPanov left a comment

Choose a reason for hiding this comment

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

Checked, the problem is reproduced, PR fixes the problem. Issue affects to 3.4, need to make a fix in 3.4

before fix:
1

after fix:
2

@AleksandrPanov AleksandrPanov added the pr: needs rebase Rebase patch (and squash fixup commits) on the top of target branch label Nov 17, 2022
@alalek
Copy link
Member

alalek commented Nov 17, 2022

This patch should go into 3.4 branch first.
We will merge changes from 3.4 into 4.x regularly (weekly/bi-weekly).

Please:

  • change "base" branch of this PR: 4.x => 3.4 (use "Edit" button near PR title)
  • rebase your commits from 4.x onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/4.x
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

Note: no needs to re-open PR, apply changes "inplace".

@dan-masek
Copy link
Contributor Author

Sounds good. I'm on the road for couple more days, I'll have a look at it over the weekend.

@dan-masek dan-masek changed the base branch from 4.x to 3.4 November 20, 2022 19:23
…he toolbar window, which is always visible. (rebased to 3.x)
Copy link
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Thank you 👍

@opencv-pushbot opencv-pushbot merged commit 2a5da50 into opencv:3.4 Nov 21, 2022
@alalek alalek mentioned this pull request Dec 3, 2022
@alalek alalek mentioned this pull request Jan 8, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrectly sized and rendered trackbars (in some cases) in WinAPI HighGUI backend
5 participants