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

maximizing in Win 10 #267

Closed
Perecli opened this issue Feb 13, 2016 · 46 comments
Closed

maximizing in Win 10 #267

Perecli opened this issue Feb 13, 2016 · 46 comments
Assignees
Labels
Milestone

Comments

@Perecli
Copy link

Perecli commented Feb 13, 2016

When maximizing the application window on most of the themes in Win 10, there is a back border on left, right, and bottom of window. Seems like a layout bug.

@batzen
Copy link
Member

batzen commented Feb 13, 2016

Which version are you using?
If you are not using the v4.0 preview, please try it.
If you are using the preview, please attach a screenshot here.

@Perecli
Copy link
Author

Perecli commented Feb 13, 2016

Where do I get the v4.0 preview? I just downloaded the ZIP from the Code Tab on Github. Is v4.0 preview included there or do I get it from a different spot?

@batzen
Copy link
Member

batzen commented Feb 13, 2016

You can grab the latest binaries from https://ci.appveyor.com/project/batzen/fluent-ribbon/build/artifacts

@batzen
Copy link
Member

batzen commented Feb 14, 2016

Can't see screenshots in your response. I guess it's because you answered by mail.

In which themes do you see the issue?
Which build of windows 10 are you using?
Do you have multiple monitors? If yes, which resolutions are your monitors set to?
Can you download the following zip file, execute the contained exe file, hit the export button and attach the file it created to this issue?
PropertyAnalyzer.zip
The tool creates a json file on your desktop.

@Perecli
Copy link
Author

Perecli commented Feb 16, 2016

Yes this version still has the problem. Notice the black border.
untitled

Also when maximized, border is there and some alignment issues. Placed against pink background so you can see it better.
untitled2

And another problem in both versions, the application menu opens outside the application.
untitled3

@Perecli
Copy link
Author

Perecli commented Feb 16, 2016

Which build of windows 10 are you using?

Build 14257

Do you have multiple monitors? If yes, which resolutions are your monitors set to?

Not on my Win 10 machine where the screenshots where taken. It is a Surface Pro 3. Running 2160 x 1440 res.

@batzen
Copy link
Member

batzen commented Feb 16, 2016

It is a Surface Pro 3. Running 2160 x 1440 res.

I guess that should be the information i needed.
Will try to reproduce the issue.

@batzen
Copy link
Member

batzen commented Feb 16, 2016

The file is missing from your response.
When you respond by mail github seems to discard any attachments.

@Perecli
Copy link
Author

Perecli commented Feb 16, 2016

Here is the file.
PropertyAnalyzer_12-35-02.zip

@batzen
Copy link
Member

batzen commented Feb 17, 2016

So to clarify this for me:
You encounter the issue in version 3.6 and in version 4.0?
Just want to make sure it didn't get worse in 4.0.

I was unable to reproduce this issue so far. Will continue to try.

@Perecli
Copy link
Author

Perecli commented Feb 17, 2016 via email

@batzen
Copy link
Member

batzen commented Feb 20, 2016

Could you run my tool in your VM and send me the json file?
Did you make any special modifications regarding your theme on windows 10? Some of the values my tool wrote out to the json file look really weird to me.
Which DPI settings are you using?

I am also unable to reproduce your issue regarding the application menu. The only way i get it to show outside the window is by moving the window close enough to the screen-edge and then open the menu. But that's just standard popup behavior...

Any details you can provide about the crash? A Stackstrace would help a lot.

@Perecli
Copy link
Author

Perecli commented Feb 20, 2016 via email

@batzen
Copy link
Member

batzen commented Feb 21, 2016

What i can tell so far:

  • Pure black border is because the GlassColor is set to #FF000000 on your machine. Which means it's pure black. On my machine, for example, it's set to #FF444D52. There is nothing i can do in this case. I don't even know how you managed to get a pure black as GlassColor. So to be honest i don't consider this a Fluent.Ribbon issue because it's just the color windows draws for the glass frame...
  • I don't know why the application menu is placed totally wrong on your machine. There is nothing special we do about it's placement. It's just a popup with Placement set to PlacementMode.Relative. Do you have any placement issues with other popups in the showcase application?
  • DPI settings: I can't even set it to 200%, 175% seems to be the maximum on my machine.

I don't know what i can do to reproduce all the issues.
Things i tried so far without success:

  • Changing DPI settings
  • Running the showcase application in Windows Simulator

Could you try to set "Show color on Start, taskbar, action center and title bar" to on and check if the black glass frame is gone?

@Perecli
Copy link
Author

Perecli commented Feb 21, 2016

I don’t know what glass color is since Win 10 has no aero glass anymore and doesn’t even have a way to change colors. The only color that can be set is the accent color. You can set the taskbar, start menu, and notification bar slightly transparent and you can have that transparency match your accent color but that’s it. The default IS black, for the taskbar, start menu, and notification bar. I did not change it. Here are my settings in Personalization/Colors:

Automatically pick an accent color from my background – Off
Chose your accent color: second row, forth from the right
Show color on Start, taskbar, action center, and title bar – Off
Make Start, taskbar, and action center transparent – On

I am noticing different behavior on my preview machine "Red Stone" than on the official final "Threshold" release. Looks like Red Stone changed a little in yesterdays release. Rather than dealing with the preview builds which seems fluid, let's deal with the Threshold release which is stable and everyone is using right now. Here are more screen shots with the official Threshold release (windows 8 theme only):

Active window:
threshhold active
Notice overly large borders on left, bottom, right. Color is correct.

Not-active window:
threshhold not-active
Again overly large borders on left, bottom, right but this time color is wrong (white) at bottom. It should be gray all around 1px thick.

Maximized window is correct in Threshold. Only Red Stone has a problem with that which will probably be fixed in final release.

As far as DPI, I did not change it. On the Redstone machine I changed the size slider in Settings/System/Display to 200%. On the Threshold machine I left the default 100%.

@Perecli
Copy link
Author

Perecli commented Feb 21, 2016

Regarding application menu wrong placement. Yes all other apps open the menu properly. Tested on Threshold too with same results. Word pad and other apps work fine. Did you test with Win8 theme and also did you select "Use application menu"? It only happens if you select that setting. Also sometimes the menu doesn't stick. Press File button and menu appears. Release File button and menu goes away. It behaves like this less often.

@batzen
Copy link
Member

batzen commented Feb 21, 2016

Ok, now i get the problem on windows 10 regarding borders. I was just confused because they were purely black. I will try to adjust the glass frame thickness and remove those borders.

You opened the issue with problems on maximized windows, i guess that's not the case on threshold?

So the only remaining problem seems to be the application menu appearing at the wrong position.
I did not talk about other apps, but other popups in the showcase application. One of those is location in the "Galleries" tab.

@Perecli
Copy link
Author

Perecli commented Feb 21, 2016

But why do you have to adjust the borders yourself? Aren't you relying on an OS theme/service for that? I have an old ribbon control that was created before Windows 8 was even announced and it works perfectly in Win 8 and 10. See:
untitled2
The reason I want to switch to yours is because it has the newer themes and further development on mine ended many years ago.

Did test in Galleries tab. Clicked button shown by the arrow and got this:
untitled
Also notice that application menu opened fine on my current ribbon on same machine.

@batzen
Copy link
Member

batzen commented Feb 21, 2016

  1. Those border are drawn by windows and that's the problem. They messed these things up, for third party apps using a custom chrome, in win 10 pretty badly.
    Because everything looked fine on win 8, i have to workaround these issues for win 10. As microsoft also prevents me from getting the current version of the OS reliably, i have to remove those borders completely.
    You don't wanna know how messed up the win32 api regarding window management/positioning/chromes etc. is. Just try to use the WindowChrome class or the microsoft provided ribbon, which are both part of .NET, yourself.
  2. I never experienced the menu issue you have and i am still unable to reproduce it. Do you have any further ideas on how to reproduce? I got no surface pro 3 to test it.
    I will try to create a mini application to gather some information regarding your issue. Just give me a few days.
  3. Telling me what your "old" library was doing right, does not help solving these issues.
  4. Maybe you should just use the office 2013 theme which does exactly what your "old" library did (in terms of the window chrome): Draw everything itself (including window command buttons).

@Perecli
Copy link
Author

Perecli commented Feb 22, 2016

  1. I don't doubt that things are really messed up win the Win32 API and I don't envy your great work. That's way I am not doing it. Proof of this is how disjointed and bipolar if not muti-polar the UI in Windows 10 has become. There is absolutely no consistency and just looking at context menus in the OS alone, I counted over 5 different ones.
  2. The tests where done on a VM machine in VMWare on the last official version of Windows 10 Threshold. I no longer test on my Surface Pro since that is a pre-release Red Stone machine and it is not fair to expect that to work properly. We'll deal with that when Red Stone is released.
  3. I know it doesn't help directly. I was just hoping that would instigate some thought about your implementation and maybe give you some clue about maybe rethinking the approach if that's even possible.
  4. I really don't like the way Office 2013 looks especially the button hover overs. And that theme has the same problem with the application menu. In fact all the themes have that problem. So I'll just wait until you fix the borders and hopefully figure out the app menu issue.

I figured out how to reproduce the problem where the application menu will not stick. This is the other problem I was talking about where when you release the click on the File tab the application menu disappears. So it is only showing if you hold down the mouse button. To reproduce, move the window outside the right side of the monitor any amount. It could even be very little. As soon as you do that, even if you put the window back so it is fully visible, from that point on the app menu will not stick.

@batzen
Copy link
Member

batzen commented Feb 22, 2016

  1. That's exactly what i am talking about. In addition to that microsoft just stopped fixing bugs in WPF.
  2. That's fair. I will, as soon as i got the time, test it on red stone myself.
  3. The office 2013 theme is done using that approach regarding window drawing.
  4. That's something i considered to change. Thus providing more color schemes based on the office 2013 theme. But i got no time get it done... The office 2010 and windows 8 themes just require too much maintenance. Maybe i will just drop those two in favor of different color schemes for the office 2013 theme. As soon as version 4.0 of this library is released i will ask the community and act based on their response.

Regarding your application menu issue:
I wrote a small sample application.
Clicking on the first button should show a popup placed exactly as in this screenshot:
popup-relative

Please execute the attached application and tell me what it looks like, screenshot preferred, on your machine.
PopupTests.zip

@Perecli
Copy link
Author

Perecli commented Feb 23, 2016

These don't look right. I took these on my Win 7 machine but I got the same results in Win 10 on my VM and Win 10 on Surface Pro 3.
untitled
untitled4
untitled2
untitled3
untitled5

@batzen
Copy link
Member

batzen commented Feb 23, 2016

That's exactly what i expected...
It's no ribbon bug but i will try to create a workaround. Will send you a new version of my test tool in the next few days.

@punker76
Copy link
Member

@Perecli
Copy link
Author

Perecli commented Feb 23, 2016

My Win 7 machine which made the screenshots above is a desktop computer without touch. I also tested on Win 10 in a VM hosted on my desktop PC, and on my Win 10 Surface Pro tablet. They all exhibit the same problem (menu sticking out the left).

Went into my Tablet PC settings and it was already set for Right-handed. Besides all other ribbon controls don't behave like this. If it was a left-handed problem should all other ribbons open to the left too?

@batzen
Copy link
Member

batzen commented Feb 23, 2016

The problem boils down to your machine having set SystemParameters.MenuDropAlignment to true.
As I said, I will fix this issue by using a custom popup placement which ignores this setting.

@batzen batzen added this to the 4.0.0 milestone Feb 23, 2016
@batzen batzen self-assigned this Feb 23, 2016
@Perecli
Copy link
Author

Perecli commented Feb 23, 2016

The fix is good news but my curiosity is asking, who set this setting, and why has it been set on all my machines (the six I have at home and the two at work including all the VMs with mixed operating systems)? What special voodoo do I posses that puts a spell on all my machines?

batzen added a commit that referenced this issue Feb 24, 2016
@batzen
Copy link
Member

batzen commented Feb 25, 2016

@Bortxx Maybe this is interesting for you regarding the latest insider build for windows 10.

From their changelog:

Fixed an issue where the window borders on apps would change from accent color to black after every upgrade to a new build.

@Perecli
Copy link
Author

Perecli commented Feb 25, 2016

Yes, I read that yesterday and thought about our problem. This reinforces why we should not test on Red Stone. So it looks like they fixed the color problem but the border thickness issue is still there, even in Threshold so that should be fixed.

@batzen
Copy link
Member

batzen commented Feb 25, 2016

I am still working on the border problem. Removing those causes re-sizing of the window very difficult.

batzen added a commit that referenced this issue Feb 29, 2016
- Windows 8 (non DWM) window now looks more like Office 2013 to better align with Windows 10 styling
- Window borders are nearly removed completely (as mentioned in #267)
@batzen
Copy link
Member

batzen commented Feb 29, 2016

@Bortxx could you test the changes i just made?

@Perecli
Copy link
Author

Perecli commented Feb 29, 2016

Border is good. App menu opens correctly. One problem mentioned above is still there though. The app menu sometimes closes on the mouse up event immediately after mouse goes down on the File tab, causing the app menu to disappear as fast as it appeared.

Did more tests on this to find out when this happens and now I can reproduce it 100%. It always occurs when the app menu opens is such a position making the mouse up event occur on a menu item within the app menu. For example, put the window in the bottom right corner.
untitled
Then left click on the File tab and don't release the click. Notice now the mouse is over the 6 menu item.
untitled
When the mouse is released the app menu goes away. If you do it quick as most users would do, the app menu shows for only a split second then disappears.

Now notice how other ribboned Windows apps position their app menu in such situations and probably why this problem does not exist for them.
untitled
The mouse remains on the File tab thus no problems.

@Perecli
Copy link
Author

Perecli commented Feb 29, 2016

Also noticed this build 357 broke the top border on the Office 2013 theme in Win 7.
untitled
Border is missing.

In Win 10, with same theme, a more subtle inconsistency border problem of a different kind:
untitled

@batzen
Copy link
Member

batzen commented Feb 29, 2016

Will have a look at the remaining menu issue.

The top border isn't broken. All other borders are broken. The border of the window are supposed to have the theme color in the office 2013 theme.

@batzen
Copy link
Member

batzen commented Feb 29, 2016

As there is no way to remove the border drawn by windows itself, without introducing a myriad of new issues, i will remove the theme color border...

@Perecli
Copy link
Author

Perecli commented Mar 1, 2016

Broken might have been the wrong word. How about "missing". You can't deny the top border is missing in Win 7. It was there in the last version. Now its completely gone in the Office 2013 theme. Also missing in Win 10 but it is easier to miss there because it is only 1px thick. That's why I magnified the screenshot so you can clearly see it gone.

@batzen
Copy link
Member

batzen commented Mar 1, 2016

Broken is the only correct word here ;-)
It just that windows is getting in my way again...

@batzen
Copy link
Member

batzen commented Mar 1, 2016

@Bortxx Could you have a look?
Borders and application menu should be fixed now.

@Perecli
Copy link
Author

Perecli commented Mar 1, 2016

Looks good. If I were to be picky, the convention throughout Windows is horizontal shift takes priority over vertical flip. In this screenshot a horizontal shift to the left would have solved the problem but instead a vertical shift occurred.
untitled_cr

@batzen
Copy link
Member

batzen commented Mar 4, 2016

Should work correctly now.

@Perecli
Copy link
Author

Perecli commented Mar 5, 2016

Yes that's good now. Thank you.
Found another problem.

  1. Open File menu.
  2. Scroll down the list
  3. Click on the right arrow of the New button
    The positioning of the list very high because it seems based on the top origin of the scrolled list.
    untitled

@batzen
Copy link
Member

batzen commented Mar 6, 2016

Fixed

@Perecli
Copy link
Author

Perecli commented Mar 6, 2016

Tested and looks good.

@batzen
Copy link
Member

batzen commented Mar 7, 2016

So this issue can, finally, be closed? ;-)

@Perecli
Copy link
Author

Perecli commented Mar 7, 2016

This was actually several issues. All issues I have brought up here can be closed. Thanks for being patient.

@batzen
Copy link
Member

batzen commented Mar 7, 2016

You're welcome. ;-)

@batzen batzen closed this as completed Mar 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants