Age | Commit message (Collapse) | Author |
|
GroupBox's GetPreferredSize() is not great. I've simply copied the code from Panel, and used that. It uses LayoutEngine.GetPreferredSize(), which does things a lot better than the code this used.
|
|
Previously, if the Label wasn't quite high enough nothing would be drawn as the line didn't quite fit. It should draw the line anyway, clipped if necessary.
|
|
- Ignore key events with vkey == 0. They won't match a real key code so don't try. Besides, trying can cause segfaults on ChromeOS Linux mode.
- Check special-case keys (numpad) before looping to get them. No point leaving them for afterwards...
|
|
- Make the state of Control.CanSelect depend on whether the control is visible and enabled.
- When setting Control.Visible to false, if this control is focused, move the focus to the next control.
|
|
Fixes https://xamarin.github.io/bugzilla-archives/20/20233/bug.html
Previously, on Linux, setting Control.Region just set the clipping for painting, but didn't influence the visibility of other controls behind the one it was set on. This implements this correctly via X11 Shape extension.
|
|
Two small fixes to X11 keyboard handling here:
- For Xutf8LookupString, use the actual buffer size rather than the starting buffer size. Using the previous fixed size made the buffer overflow handing code immediately after the change pointless.
- For XLookupString, handle similar to Xutf8LookupString, getting a byte array. The old was sometimes causing problems where input on the numeric keypad didn't enter text. I believe using a StringBuilder similar to how it was _should_ work, but for some reason I could not get it to work reliably. So I changed it to this, which seems to work well for me. The only question I have is whether it should be Encoding.ASCII like I used, Encoding.Default, or another specific encoding.
|
|
This PR is needed for https://github.com/mono/uia2atk/pull/8
|
|
ComboBox.Items.RemoteAt() (#18069)
* [WinForms] Fix wrong behavior when calling ComboBox.Items.RemoteAt() with index equals to SelectedIndex
* [WinForms] Fix #10643 No event should be triggered when calling ComboBox.Items.RemoteAt()
Fixes #10643
|
|
Fixes #18019
|
|
Fixes #18020
|
|
was ignored. (#18025)
Fixes #12022
|
|
(#18002)
According to .Net documentation:
Exceptions
ArgumentOutOfRangeException
value is less than 1.
|
|
UseColumnTextForLinkValue is true (#17981)
* [WinForms] Fix #17980 Prevent from crashing when DataGridView is null.
Reproducer:
DataGridViewLinkColumn links = new DataGridViewLinkColumn();
links.UseColumnTextForLinkValue = true;
* [WinForms] Fix #17980 The field useColumnTextForLinkValue of DataGridViewLinkCell was not cloned.
* [WinForms] Fix #17980 the Text property was not set for every cell in the column when UseColumnTextForLinkValue is true
Fixes #17980
|
|
(#17974)
Fixes #9726
|
|
items expanded state update (#17731)
This PR is needed for the https://github.com/mono/uia2atk/pull/6 one.
|
|
Fixes #13777
|
|
Fixes #12337
|
|
The method InstalledInputLanguages() always returned InvariantCulture. Now, installed input languages are detected properly on Windows.
Reproducer:
`Console.WriteLine(InputLanguage.CurrentInputLanguage.Culture.TwoLetterISOLanguageName.ToUpper());`
Related issue: #13552
|
|
(#17755)
Fixes #16557
|
|
## Background
In Mono 5 and earlier, the active GTK or KDE theme would be sourced for system colors, allowing dark themes to be obeyed:
![image](https://user-images.githubusercontent.com/1559108/69486043-f3bf0500-0e0c-11ea-9b29-1654ba4e6d9a.png)
This allowed WinForms apps to blend in and look more like native apps.
## Problem
In Mono 6, this capability was lost (as noted in passing in #14325). WinForms apps now only look like this, regardless of the system color settings:
![image](https://user-images.githubusercontent.com/1559108/69486114-dccce280-0e0d-11ea-8107-fe1653b2d816.png)
This looks somewhat jarring and worse than previous Mono releases, for users with a dark system theme.
## Cause
During load of the system settings (in the static constructor of `X11DesktopColors`), `Theme.SetSystemColors` passes system color data to `System.Drawing.KnownColors.Update`, which populates them into `System.Drawing.KnownColors.ArgbValues`. In Mono 5 and earlier, this flowed through to the visible UI.
It seems that as of Mono 6, this table no longer affects the visible WinForms UI (although it is still being updated!). Instead, a same-but-different table in `System.Drawing.KnownColorTable` drives the system colors now. I was not able to identify the commit in which this change was made.
## Changes
Now `Theme.SetSystemColors` accesses `System.Drawing.KnownColorTable.s_colorTable` instead, and WinForms apps once again obey GTK and KDE themes:
![image](https://user-images.githubusercontent.com/1559108/69486043-f3bf0500-0e0c-11ea-9b29-1654ba4e6d9a.png)
Fixes KSP-CKAN/CKAN#2881.
|
|
|
|
(#17660)
[WinForms] Fix #10559 In MaskedTextBox wrong Lines value when Mask se…
<!--
Thank you for your Pull Request!
If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.
Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
|
|
[WinForms] Fix TabPage position when enabling MultiLine
Fixes #17546
|
|
Width was not handled when using List.View. (#17669)
|
|
(#17662)
* [WinForms] Fix #12249 scroll orientation was not defined in ScrollEventArgs of ScrollBar.cs
* [WinForms] Fix 12249 scroll orientation was not defined in ScrollEventArgs of DataGridView.cs
|
|
The default behavior on .NET Framework is _HotkeyPrefix.None_ when creating a _TabControl_ element (ampersands not escaped).
If an user wants to override this behavior, he has to declare a _DrawItemEventHandler_ (with _DrawMode = OwnerDrawFixed_).
Fixes #16206
|
|
* Fix issue #17190: SerializationException on ListViewItemCount
ListViewGroup doesn't (always) have a serialized member "ListViewItemCount".
This patch accounts for that and also adds support for the "ItemsCount"
property that upstream [1] seems to use.
Also items should be initialized regardless of the count, otherwise we get a NPE.
[1] https://github.com/dotnet/winforms/blob/master/src/System.Windows.Forms/src/System/Windows/Forms/ListViewGroup.cs#L144
|
|
when set to false (#16627)
|
|
The UIA event doesn't emited by means of insertion a new `TreeNode` to a `TreeNodeCollection` of the respective `TreeNode`.
|
|
https://bugzilla.xamarin.com/show_bug.cgi?id=14976
Credit goes to datnhanlz for noting that removing XChangeProperty(DisplayHandle, hwnd.whole_window, _XEMBED_INFO, _XEMBED_INFO, 32, PropertyMode.Replace, atoms, 2); would also fix the bug.
Note that the type of Atom is actually unsigned long (see usr/include/X11/X.h), however the code used a C# int for the atoms. As such the code worked without a problem on 32 bit linux, but broke on 64 bit linux.
I switched to using IntPtr instead to make the code also work on 64-bit.
|
|
custom Column Header (#15135)
|
|
Fix light on light ListViewGroup headers on dark theme
|
|
(#14681)
During XI integration we noticed that just using the verbatim commandline
-exclude or -notrait is not ideal since XI uses the nunit/xunit APIs to
pass that information and not the command line parser.
Instead we now write the exclude categories/traits as a newline-separated file.
|
|
Use example.com and example.org instead.
Fixes https://github.com/mono/mono/issues/14585
Note that not all of the things I replaced make an actual network request but I thought it'd be nice to be consistent.
|
|
(#13845)
* [WinForms] If DataGridViewCheckBoxCell not in threeState mode
EditingCellFormattedValue must return true or false, instead of
value of CheckState type
* [WinForms] DataGrid: fix type check in EditingCellFormattedValue setter.
When set bool value to EditingCellFormattedValue there will be exception.
Type equality must be done through IsAssignableFrom not direct
* [WinForms] DataGrid: Add test for EditingCellFormattedValue getter and setter.
|
|
|
|
|
|
When ImageIndex in TreeNode set to -2 must not displayed any image
|
|
If combobox already was disposed and we setting Text field there will be NullReferenceException. On .net winforms there no excetions.
|
|
Fixes #13150
|
|
Local variable must be assigned before use
|
|
SplitterMoved event subscription
|
|
They can be used with native line endings.
We now have a shared folder with the dotnet repos and they have CRLF normalization enabled.
This difference leads to conflicts while applying changes from the dotnet repos to mono.
|
|
EventArgs.Empty (#13283)
Fixes #13282
|
|
|
|
|
|
<!--
Thank you for your Pull Request!
If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.
Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
## Problem
`LinkLabels` ignore the text alignment for rendering the "hitbox" and the text color (= the `LinkArea`), and the focus rectangle. Also every text behind the end of this LinkArea/focus rectangle region is not painted at all.
This becomes visible if `AutoSize = false` and the `Size` is bigger than the text would need,
and if the text alignment is anything different than `TopLeft`.
## Cause
I think this is because the `piece.regions` are only translated regarding the padding, but neglecting the text alignment.
## Solution
Calculate the offset due to alignment and add it to the translation in `LinkLabel.CreateLinkPieces ()`
Fixes #12402
## One more problem:
~Right now, a very tiny bit at the end of the label is still cut off (see my zipped and attached comparison pictures). Maybe `GetBounds ()` returns a value little bit smaller than it should be.
Can someone help?~
Also, maybe I took the wrong approach to this issue, but I don't know the inner mechanisms of mono.
So feel free to either advise me to change something, or change it yourself(s) :)
|
|
This change implements disposing of the panels of a status bar.
|
|
|
|
layout
Fixes issue #8922. The flow layout code specifies `int.MaxValue` as width in `GetPreferredSize` call, which the table layout didn't handle properly and tried to use all the available space.
Relevant WinForms open source code that implements the same behavior:
https://github.com/dotnet/winforms/blob/master/src/System.Windows.Forms/src/System/Windows/Forms/Layout/FlowLayout.cs#L183-L188
https://github.com/dotnet/winforms/blob/master/src/System.Windows.Forms/src/System/Windows/Forms/Layout/TableLayout.cs#L700-L702
|