コード例 #1
0
        public ThemedTabCloseButton()
        {
            var presenter = new VectorShapeButtonPresenter(new VectorShape {
                new VectorShape.Line(0.3f, 0.3f, 0.7f, 0.7f, Color4.White, 0.075f * 1.5f),
                new VectorShape.Line(0.3f, 0.7f, 0.7f, 0.3f, Color4.White, 0.0751f * 1.5f),
            });

            LayoutCell = new LayoutCell(Alignment.Center, stretchX: 0);
            Presenter  = presenter;
            MinMaxSize = Theme.Metrics.CloseButtonSize;
            DefaultAnimation.AnimationEngine = new AnimationEngineDelegate {
                OnRunAnimation = (animation, markerId, animationTimeCorrection) => {
                    presenter.SetState(markerId);
                    return(true);
                }
            };
        }
コード例 #2
0
ファイル: ThemedTabBar.cs プロジェクト: aologos/Citrus
        public ThemedTabCloseButton()
        {
            var presenter = new VectorShapeButtonPresenter(new VectorShape {
                new VectorShape.Line(0.3f, 0.3f, 0.7f, 0.7f, Color4.White, 0.075f * 1.5f),
                new VectorShape.Line(0.3f, 0.7f, 0.7f, 0.3f, Color4.White, 0.0751f * 1.5f),
            });

            fill       = new WidgetFlatFillPresenter(Theme.Colors.CloseButtonFocusBorderNormal);
            LayoutCell = new LayoutCell(Alignment.Center, stretchX: 0);
            MinMaxSize = Theme.Metrics.CloseButtonSize;
            DefaultAnimation.AnimationEngine = new AnimationEngineDelegate {
                OnRunAnimation = (animation, markerId, animationTimeCorrection) => {
                    presenter.SetState(markerId);
                    return(true);
                }
            };
            CompoundPresenter.Add(presenter);
            CompoundPresenter.Add(fill);
        }
コード例 #3
0
ファイル: HBoxLayout.cs プロジェクト: klenin/Citrus
 public HBoxLayout()
 {
     CellDefaults    = new LayoutCell();
     DebugRectangles = new List <Rectangle>();
 }
コード例 #4
0
 public VBoxLayout()
 {
     DefaultCell     = new LayoutCell();
     DebugRectangles = new List <Rectangle>();
 }