Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Maximize and minimize window buttons incorrect rendering #4288

Closed
JekRock opened this issue Jan 18, 2020 · 7 comments · Fixed by #4845
Closed

Maximize and minimize window buttons incorrect rendering #4288

JekRock opened this issue Jan 18, 2020 · 7 comments · Fixed by #4845
Assignees
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@JekRock
Copy link

JekRock commented Jan 18, 2020

Environment

Windows build number: 10.0.18363.0
Windows Terminal version (if applicable):0.8.10091.0

Steps to reproduce

  1. Minimize the Windows Terminal window
  2. Open enough terminal tabs to fill tabs space without tabs being resized.
  3. Maximize the Windows Terminal window with the window maximize button.
  4. Minimize the Windows Terminal window with the window minimize button.
  5. Get an incorrect rendering of the minimize and maximize buttons.

On step 2 you will probably need to play with the Windows Terminal window size to reproduce the issue. For some window sizes, it renders normally and for some not. If you add too many terminal tabs the issue is not reproducible.

Expected behavior

Normal rendering of the window minimize and maximize buttons after minimizing the Windows Terminal window

Actual behavior

See attached screenshots.
image
image
image

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jan 18, 2020
@zadjii-msft
Copy link
Member

from #4310:

@DHowett-MSFT

What is your display scaling set to?

@JekRock

I've stumbled upon the same issue. It's described here
I have 2 displays. One with 100% scaling and one with 125%. The issue is reproducible on both displays

@zadjii-msft zadjii-msft added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Jan 21, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jan 21, 2020
@zadjii-msft zadjii-msft added this to the Terminal v0.10 milestone Jan 21, 2020
@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jan 23, 2020
@DHowett-MSFT
Copy link
Contributor

It looks like we're not placing the drag cutout in the right place. Might be part of #1625.

@DHowett-MSFT
Copy link
Contributor

v0.10 justification: it's experience-breaking.

@DHowett-MSFT
Copy link
Contributor

I'm going to call this a "bug class" and merge it with /dup #4166 - "we are not sizing the drag bar properly all the time"

@ghost
Copy link

ghost commented Mar 2, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Mar 2, 2020
@ghost ghost added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Mar 2, 2020
@beviu
Copy link
Contributor

beviu commented Mar 6, 2020

@zadjii-msft

This was marked duplicate of #4166 and #4166 was closed but I can still reproduce this bug on master (cc35c83) with your fix on my 100% dpi displays so I think it's a separate issue (maybe it was not a dup and it has nothing to do with DPI!).

steps:
test

  1. launch terminal, keep its original size (but note that my config has 0 padding, see below)
  2. resize it to remove one text column
  3. add 4 tabs
  4. maximize
  5. minimize
  6. try to hover min/max controls
my config

// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation

{
    "$schema": "https://aka.ms/terminal-profiles-schema",

    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",

    "profiles":
    [
        {
            // Make changes here to the powershell.exe profile
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false,
            "padding": "0"
        },
        {
            // Make changes here to the cmd.exe profile
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "cmd",
            "commandline": "cmd.exe",
            "hidden": false,
            "padding": "0"
        }
    ],

    // Add custom color schemes to this array
    "schemes": [],

    // Add any keybinding overrides to this array.
    // To unbind a default keybinding, set the command to "unbound"
    "keybindings": [],

    "showTabsInTitlebar": true
}

(On the GIF i was actually running my branch to get rid of HRGN so that's why the controls didn't completely disappear like in the image from the issue but you can ignore this)

@zadjii-msft
Copy link
Member

zadjii-msft commented Mar 9, 2020

Okay yea I can re-activate this one and make sure this gets fixed too.

Thanks for the diligence @greg904!


EDIT: Wow I got this to happen immediately. My repro was way easier:
<notes to self>

  1. Use the "mode" profile I currently have as default, and "initialCols": 80. The "mode" bit probably isn't relevant.
  2. Open a second tab
  3. Maximize
  4. Restore

and that's it.

@zadjii-msft zadjii-msft reopened this Mar 9, 2020
@zadjii-msft zadjii-msft self-assigned this Mar 9, 2020
@zadjii-msft zadjii-msft removed the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Mar 9, 2020
@ghost ghost added the In-PR This issue has a related PR label Mar 9, 2020
DHowett-MSFT pushed a commit that referenced this issue Mar 9, 2020
## Summary of the Pull Request

Add a `SizeChanged` handler to the titlebar content UI element. It's possible that this element's size will change after the dragbar's. When that happens, the drag bar won't send another `SizeChanged` event, because the dragbar's _size_ didn't change, only it's position.

## References

We originally duped this issue to #4166, but after #4829 fixed that issue, this one persisted. They're all related, and _look_ like dupes, but they weren't.

## PR Checklist
* [x] Closes #4288
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

## Validation Steps Performed

I had a solid 100% repro that doesn't repro anymore.

I've maximized, restored, resized, and generally played with the window a bunch.
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Mar 9, 2020
carlos-zamora pushed a commit that referenced this issue Mar 9, 2020
## Summary of the Pull Request

Add a `SizeChanged` handler to the titlebar content UI element. It's possible that this element's size will change after the dragbar's. When that happens, the drag bar won't send another `SizeChanged` event, because the dragbar's _size_ didn't change, only it's position.

## References

We originally duped this issue to #4166, but after #4829 fixed that issue, this one persisted. They're all related, and _look_ like dupes, but they weren't.

## PR Checklist
* [x] Closes #4288
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

## Validation Steps Performed

I had a solid 100% repro that doesn't repro anymore.

I've maximized, restored, resized, and generally played with the window a bunch.
carlos-zamora pushed a commit that referenced this issue Mar 10, 2020
## Summary of the Pull Request

Add a `SizeChanged` handler to the titlebar content UI element. It's possible that this element's size will change after the dragbar's. When that happens, the drag bar won't send another `SizeChanged` event, because the dragbar's _size_ didn't change, only it's position.

## References

We originally duped this issue to #4166, but after #4829 fixed that issue, this one persisted. They're all related, and _look_ like dupes, but they weren't.

## PR Checklist
* [x] Closes #4288
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

## Validation Steps Performed

I had a solid 100% repro that doesn't repro anymore.

I've maximized, restored, resized, and generally played with the window a bunch.
carlos-zamora pushed a commit that referenced this issue Mar 10, 2020
## Summary of the Pull Request

Add a `SizeChanged` handler to the titlebar content UI element. It's possible that this element's size will change after the dragbar's. When that happens, the drag bar won't send another `SizeChanged` event, because the dragbar's _size_ didn't change, only it's position.

## References

We originally duped this issue to #4166, but after #4829 fixed that issue, this one persisted. They're all related, and _look_ like dupes, but they weren't.

## PR Checklist
* [x] Closes #4288
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

## Validation Steps Performed

I had a solid 100% repro that doesn't repro anymore.

I've maximized, restored, resized, and generally played with the window a bunch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants