aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/TabView.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2017-05-27 18:35:01 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2017-05-27 18:35:01 +0200
commit4d1f3264dc4b4ddc211164712e0d2d654a913bb7 (patch)
tree30655ea8f740eaf115a06c2ebfaaad29a7bcb39e /src/GraphicObjects/TabView.cs
parent8d385b053423c16e18d02467bdd54be17c3b42aa (diff)
c native GraphicObject implementation, work in progressTestKMS
Diffstat (limited to 'src/GraphicObjects/TabView.cs')
-rw-r--r--src/GraphicObjects/TabView.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/GraphicObjects/TabView.cs b/src/GraphicObjects/TabView.cs
index ecf38f10..93338fc2 100644
--- a/src/GraphicObjects/TabView.cs
+++ b/src/GraphicObjects/TabView.cs
@@ -115,7 +115,7 @@ namespace Crow
SelectedTab = selectedTab;
}
public override bool ArrangeChildren { get { return true; } }
- public override bool UpdateLayout (LayoutingType layoutType)
+ unsafe public override bool UpdateLayout (LayoutingType layoutType)
{
RegisteredLayoutings &= (~layoutType);
@@ -129,11 +129,11 @@ namespace Crow
if (Orientation == Orientation.Horizontal) {
if (ti.TabTitle.RegisteredLayoutings.HasFlag (LayoutingType.Width))
return false;
- curOffset += ti.TabTitle.Slot.Width + Spacing;
+ curOffset += ti.TabTitle.nativeHnd->Slot.Width + Spacing;
} else {
if (ti.TabTitle.RegisteredLayoutings.HasFlag (LayoutingType.Height))
return false;
- curOffset += ti.TabTitle.Slot.Height + Spacing;
+ curOffset += ti.TabTitle.nativeHnd->Slot.Height + Spacing;
}
}
@@ -146,9 +146,9 @@ namespace Crow
return base.UpdateLayout(layoutType);
}
- protected override void onDraw (Context gr)
+ unsafe protected override void onDraw (Context gr)
{
- Rectangle rBack = new Rectangle (Slot.Size);
+ Rectangle rBack = new Rectangle (nativeHnd->Slot.Size);
Background.SetAsSource (gr, rBack);
CairoHelpers.CairoRectangle(gr,rBack, CornerRadius);
@@ -185,7 +185,7 @@ namespace Crow
if (SelectedTab > Children.Count - 1)
return;
- if (((Children[SelectedTab] as TabItem).Content.Parent as GraphicObject).MouseIsIn(e.Position))
+ if ((Children[SelectedTab] as TabItem).Content.Parent.MouseIsIn(e.Position))
{
Children[SelectedTab].checkHoverWidget (e);
return;