mirror of
https://gitee.com/chinware/atomui.git
synced 2024-11-29 18:38:16 +08:00
修复 Collapse bug
This commit is contained in:
parent
c6e207fcef
commit
2e2539e276
@ -19,7 +19,7 @@ public partial class CollapseShowCase : UserControl
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = this;
|
||||
ExpandButtonPosGroup.OptionCheckedChanged += HandleExpandButtonPosOptionCheckedChanged;
|
||||
//ExpandButtonPosGroup.OptionCheckedChanged += HandleExpandButtonPosOptionCheckedChanged;
|
||||
}
|
||||
|
||||
private void HandleExpandButtonPosOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
|
||||
|
@ -276,8 +276,8 @@ internal class AlertTheme : BaseControlTheme
|
||||
Name = CloseBtnPart,
|
||||
};
|
||||
|
||||
TokenResourceBinder.CreateTokenBinding(closeBtn, IconButton.WidthProperty, GlobalTokenResourceKey.IconSizeSM);
|
||||
TokenResourceBinder.CreateTokenBinding(closeBtn, IconButton.HeightProperty, GlobalTokenResourceKey.IconSizeSM);
|
||||
TokenResourceBinder.CreateTokenBinding(closeBtn, IconButton.IconWidthProperty, GlobalTokenResourceKey.IconSizeSM);
|
||||
TokenResourceBinder.CreateTokenBinding(closeBtn, IconButton.IconHeightProperty, GlobalTokenResourceKey.IconSizeSM);
|
||||
TokenResourceBinder.CreateTokenBinding(closeBtn, IconButton.MarginProperty, AlertTokenResourceKey.ExtraElementMargin);
|
||||
|
||||
CreateTemplateParentBinding(closeBtn, IconButton.IsVisibleProperty, Alert.IsClosableProperty);
|
||||
|
@ -45,7 +45,7 @@ internal class IconButtonTheme : BaseControlTheme
|
||||
{
|
||||
{
|
||||
var contentStyle = new Style(selector => selector.Nesting().Template().Name(IconContentPart));
|
||||
contentStyle.Add(ContentPresenter.BackgroundProperty, GlobalTokenResourceKey.ColorBgContainer);
|
||||
contentStyle.Add(ContentPresenter.BackgroundProperty, GlobalTokenResourceKey.ColorTransparent);
|
||||
Add(contentStyle);
|
||||
}
|
||||
var enableHoverBgStyle = new Style(selector => selector.Nesting().PropertyEquals(IconButton.IsEnableHoverEffectProperty, true).Class(StdPseudoClass.PointerOver));
|
||||
|
@ -1,5 +1,7 @@
|
||||
using AtomUI.Theme;
|
||||
using AtomUI.Data;
|
||||
using AtomUI.Theme;
|
||||
using AtomUI.Theme.Styling;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Presenters;
|
||||
using Avalonia.Controls.Templates;
|
||||
@ -23,7 +25,7 @@ internal class CollapseTheme : BaseControlTheme
|
||||
var frameDecorator = new Border()
|
||||
{
|
||||
Name = FrameDecoratorPart,
|
||||
ClipToBounds = true
|
||||
ClipToBounds = true,
|
||||
};
|
||||
var itemsPresenter = new ItemsPresenter()
|
||||
{
|
||||
|
@ -136,8 +136,8 @@ public class Expander : AvaloniaExpander
|
||||
o => o.MotionDuration,
|
||||
(o, v) => o.MotionDuration = v);
|
||||
|
||||
internal static readonly DirectProperty<Collapse, Thickness> EffectiveBorderThicknessProperty =
|
||||
AvaloniaProperty.RegisterDirect<Collapse, Thickness>(nameof(EffectiveBorderThickness),
|
||||
internal static readonly DirectProperty<Expander, Thickness> EffectiveBorderThicknessProperty =
|
||||
AvaloniaProperty.RegisterDirect<Expander, Thickness>(nameof(EffectiveBorderThickness),
|
||||
o => o.EffectiveBorderThickness,
|
||||
(o, v) => o.EffectiveBorderThickness = v);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user