Browse Source
Merge branch 'master' into bugfix/6668-fix-datagrid-headers-scrolling
pull/6748/head
Max Katz
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with
60 additions and
8 deletions
-
samples/ControlCatalog/Pages/TextBoxPage.xaml
-
src/Avalonia.Controls/Border.cs
-
src/Avalonia.Controls/Button.cs
-
src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs
-
src/Avalonia.Controls/Primitives/Popup.cs
-
src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs
-
src/Avalonia.Controls/ProgressBar.cs
-
src/Avalonia.Controls/Remote/RemoteWidget.cs
-
src/Avalonia.Controls/TextBox.cs
-
src/Avalonia.Themes.Default/OverlayPopupHost.xaml
-
src/Avalonia.Themes.Default/PopupRoot.xaml
-
src/Avalonia.Themes.Fluent/Controls/OverlayPopupHost.xaml
-
src/Avalonia.Themes.Fluent/Controls/PopupRoot.xaml
-
src/Avalonia.X11/X11IconLoader.cs
|
|
|
@ -11,7 +11,15 @@ |
|
|
|
HorizontalAlignment="Center" |
|
|
|
Spacing="16"> |
|
|
|
<StackPanel Orientation="Vertical" Spacing="8"> |
|
|
|
<TextBox Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit." Width="200" /> |
|
|
|
<TextBox Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit." Width="200" |
|
|
|
FontFamily="Comic Sans MS" |
|
|
|
Foreground="Blue"> |
|
|
|
<TextBox.ContextFlyout> |
|
|
|
<Flyout> |
|
|
|
<TextBlock>Custom context flyout</TextBlock> |
|
|
|
</Flyout> |
|
|
|
</TextBox.ContextFlyout> |
|
|
|
</TextBox> |
|
|
|
<TextBox Width="200" Watermark="ReadOnly" IsReadOnly="True" Text="This is read only"/> |
|
|
|
<TextBox Width="200" Watermark="Numeric Watermark" x:Name="numericWatermark"/> |
|
|
|
<TextBox Width="200" |
|
|
|
|
|
|
|
@ -8,7 +8,9 @@ namespace Avalonia.Controls |
|
|
|
/// <summary>
|
|
|
|
/// A control which decorates a child with a border and background.
|
|
|
|
/// </summary>
|
|
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
|
|
public partial class Border : Decorator, IVisualWithRoundRectClip |
|
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="Background"/> property.
|
|
|
|
|
|
|
|
@ -358,6 +358,13 @@ namespace Avalonia.Controls |
|
|
|
IsPressed = false; |
|
|
|
} |
|
|
|
|
|
|
|
protected override void OnLostFocus(RoutedEventArgs e) |
|
|
|
{ |
|
|
|
base.OnLostFocus(e); |
|
|
|
|
|
|
|
IsPressed = false; |
|
|
|
} |
|
|
|
|
|
|
|
protected override void OnPropertyChanged<T>(AvaloniaPropertyChangedEventArgs<T> change) |
|
|
|
{ |
|
|
|
base.OnPropertyChanged(change); |
|
|
|
|
|
|
|
@ -332,7 +332,9 @@ namespace Avalonia.Controls |
|
|
|
/// </summary>
|
|
|
|
static NumericUpDown() |
|
|
|
{ |
|
|
|
#pragma warning disable CS0612 // Type or member is obsolete
|
|
|
|
CultureInfoProperty.Changed.Subscribe(OnCultureInfoChanged); |
|
|
|
#pragma warning restore CS0612 // Type or member is obsolete
|
|
|
|
NumberFormatProperty.Changed.Subscribe(OnNumberFormatChanged); |
|
|
|
FormatStringProperty.Changed.Subscribe(FormatStringChanged); |
|
|
|
IncrementProperty.Changed.Subscribe(IncrementChanged); |
|
|
|
|
|
|
|
@ -20,7 +20,9 @@ namespace Avalonia.Controls.Primitives |
|
|
|
/// <summary>
|
|
|
|
/// Displays a popup window.
|
|
|
|
/// </summary>
|
|
|
|
#pragma warning disable CS0612 // Type or member is obsolete
|
|
|
|
public class Popup : Control, IVisualTreeHost, IPopupHostProvider |
|
|
|
#pragma warning restore CS0612 // Type or member is obsolete
|
|
|
|
{ |
|
|
|
public static readonly StyledProperty<bool> WindowManagerAddShadowHintProperty = |
|
|
|
AvaloniaProperty.Register<PopupRoot, bool>(nameof(WindowManagerAddShadowHint), false); |
|
|
|
|
|
|
|
@ -447,8 +447,10 @@ namespace Avalonia.Controls.Primitives.PopupPositioning |
|
|
|
PopupPositionerConstraintAdjustment constraintAdjustment, Rect? rect) |
|
|
|
{ |
|
|
|
// We need a better way for tracking the last pointer position
|
|
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
|
|
var pointer = topLevel.PointToClient(topLevel.PlatformImpl.MouseDevice.Position); |
|
|
|
|
|
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
|
|
|
|
positionerParameters.Offset = offset; |
|
|
|
positionerParameters.ConstraintAdjustment = constraintAdjustment; |
|
|
|
if (placement == PlacementMode.Pointer) |
|
|
|
|
|
|
|
@ -218,9 +218,12 @@ namespace Avalonia.Controls |
|
|
|
TemplateProperties.Container2AnimationStartPosition = barIndicatorWidth2 * -1.5; // Position at -150%
|
|
|
|
TemplateProperties.Container2AnimationEndPosition = barIndicatorWidth2 * 1.66; // Position at 166%
|
|
|
|
|
|
|
|
|
|
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
|
|
// Remove these properties when we switch to fluent as default and removed the old one.
|
|
|
|
IndeterminateStartingOffset = -dim; |
|
|
|
IndeterminateEndingOffset = dim; |
|
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
|
|
|
|
var padding = Padding; |
|
|
|
var rectangle = new RectangleGeometry( |
|
|
|
|
|
|
|
@ -77,8 +77,10 @@ namespace Avalonia.Controls.Remote |
|
|
|
_bitmap.PixelSize.Height != _lastFrame.Height) |
|
|
|
{ |
|
|
|
_bitmap?.Dispose(); |
|
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
|
|
_bitmap = new WriteableBitmap(new PixelSize(_lastFrame.Width, _lastFrame.Height), |
|
|
|
new Vector(96, 96), fmt); |
|
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
} |
|
|
|
using (var l = _bitmap.Lock()) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -991,7 +991,9 @@ namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
var point = e.GetPosition(_presenter); |
|
|
|
var index = CaretIndex = _presenter.GetCaretIndex(point); |
|
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
|
|
switch (e.ClickCount) |
|
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
{ |
|
|
|
case 1: |
|
|
|
SelectionStart = SelectionEnd = index; |
|
|
|
|
|
|
|
@ -1,5 +1,11 @@ |
|
|
|
<Style xmlns="https://github.com/avaloniaui" Selector="OverlayPopupHost"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}"/> |
|
|
|
<Style xmlns="https://github.com/avaloniaui" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
Selector="OverlayPopupHost"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}"/> |
|
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSizeNormal}"/> |
|
|
|
<Setter Property="FontFamily" Value="{x:Static FontFamily.Default}" /> |
|
|
|
<Setter Property="FontWeight" Value="400" /> |
|
|
|
<Setter Property="FontStyle" Value="Normal" /> |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
<Panel> |
|
|
|
|
|
|
|
@ -1,5 +1,11 @@ |
|
|
|
<Style xmlns="https://github.com/avaloniaui" Selector="PopupRoot"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}"/> |
|
|
|
<Style xmlns="https://github.com/avaloniaui" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
Selector="PopupRoot"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}"/> |
|
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSizeNormal}"/> |
|
|
|
<Setter Property="FontFamily" Value="{x:Static FontFamily.Default}" /> |
|
|
|
<Setter Property="FontWeight" Value="400" /> |
|
|
|
<Setter Property="FontStyle" Value="Normal" /> |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
<Panel> |
|
|
|
|
|
|
|
@ -1,5 +1,9 @@ |
|
|
|
<Style xmlns="https://github.com/avaloniaui" Selector="OverlayPopupHost"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource SystemControlBackgroundAltHighBrush}"/> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/> |
|
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}"/> |
|
|
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" /> |
|
|
|
<Setter Property="FontWeight" Value="400" /> |
|
|
|
<Setter Property="FontStyle" Value="Normal" /> |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
<Panel> |
|
|
|
|
|
|
|
@ -2,7 +2,11 @@ |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
|
|
|
<Style Selector="PopupRoot"> |
|
|
|
<Setter Property="TransparencyLevelHint" Value="Transparent" /> |
|
|
|
<Setter Property="Background" Value="{x:Null}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/> |
|
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}"/> |
|
|
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" /> |
|
|
|
<Setter Property="FontWeight" Value="400" /> |
|
|
|
<Setter Property="FontStyle" Value="Normal" /> |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
<Panel> |
|
|
|
|
|
|
|
@ -77,7 +77,9 @@ namespace Avalonia.X11 |
|
|
|
public void Save(Stream outputStream) |
|
|
|
{ |
|
|
|
using (var wr = |
|
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
|
|
new WriteableBitmap(new PixelSize(_width, _height), new Vector(96, 96), PixelFormat.Bgra8888)) |
|
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
{ |
|
|
|
using (var fb = wr.Lock()) |
|
|
|
{ |
|
|
|
|