Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Addressed feedback
  • Loading branch information
Etienne Baudoux committed Mar 7, 2025
commit 0e724460805c7146c3269355e6e5d229edc39b88
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
xmlns:vsui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
MinWidth="200"
KeyDown="Adornment_KeyDown"
MouseDown="Adornment_ConsumeMouseEvent"
MouseUp="Adornment_ConsumeMouseEvent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ namespace Microsoft.CodeAnalysis.Editor.Implementation.InlineRename
/// </summary>
internal partial class RenameFlyout : InlineRenameAdornment
{
private const int DefaultMinWidth = 200;

private readonly RenameFlyoutViewModel _viewModel;
private readonly IEditorFormatMap _editorFormatMap;
private readonly IWpfTextView _textView;
Expand Down Expand Up @@ -148,10 +150,7 @@ private void PositionAdornment()
: desiredLeft;

MaxWidth = _textView.ViewportRight;
if (MinWidth > _textView.ViewportWidth)
{
MinWidth = _textView.ViewportWidth;
}
MinWidth = Math.Min(DefaultMinWidth, _textView.ViewportWidth);

Canvas.SetTop(this, Math.Max(0, top));
Canvas.SetLeft(this, Math.Max(0, left));
Expand Down
Loading