Use spaces to match Ooui
This commit is contained in:
parent
e3627b5b90
commit
a887133288
|
@ -4,6 +4,13 @@
|
|||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType></DebugType>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.Forms" Version="2.4.0.38779" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace Ooui.Forms.Renderers
|
|||
if (Element == null || Control == null)
|
||||
return;
|
||||
|
||||
var uiControl = Control as Ooui.Element;
|
||||
var uiControl = Control as Ooui.FormControl;
|
||||
if (uiControl == null)
|
||||
return;
|
||||
uiControl.IsDisabled = !Element.IsEnabled;
|
||||
|
|
|
@ -19,8 +19,9 @@ namespace Ooui.Forms
|
|||
{
|
||||
readonly ConcurrentDictionary<string, object> values =
|
||||
new ConcurrentDictionary<string, object> ();
|
||||
|
||||
#pragma warning disable 67
|
||||
public event EventHandler<ResourcesChangedEventArgs> ValuesChanged;
|
||||
#pragma warning restore 67
|
||||
|
||||
public bool TryGetValue (string key, out object value)
|
||||
{
|
||||
|
|
|
@ -144,10 +144,11 @@ namespace Ooui.Forms
|
|||
float newY = visualParent == null ? y : Math.Max (0, (float)(visualParent.Height - y - view.Height));
|
||||
var target = new Rectangle (x, newY, width, height);
|
||||
|
||||
uiview.Style.Position = "absolute";
|
||||
uiview.Style.Left = x;
|
||||
uiview.Style.Top = newY;
|
||||
uiview.Style.Width = width;
|
||||
uiview.Style.Height = height;
|
||||
uiview.Style.Right = x + width;
|
||||
uiview.Style.Bottom = newY + height;
|
||||
}
|
||||
else if (width <= 0 || height <= 0) {
|
||||
return;
|
||||
|
|
1
Ooui.sln
1
Ooui.sln
|
@ -79,6 +79,7 @@ Global
|
|||
$1.FileWidth = 128
|
||||
$1.NoTabsAfterNonTabs = True
|
||||
$1.scope = text/x-csharp
|
||||
$1.TabsToSpaces = True
|
||||
$0.CSharpFormattingPolicy = $2
|
||||
$2.scope = text/x-csharp
|
||||
$2.NewLinesForBracesInProperties = False
|
||||
|
|
|
@ -25,12 +25,6 @@ namespace Ooui
|
|||
set => SetProperty (ref hidden, value, "hidden");
|
||||
}
|
||||
|
||||
bool disabled = false;
|
||||
public bool IsDisabled {
|
||||
get => disabled;
|
||||
set => SetProperty (ref disabled, value, "disabled");
|
||||
}
|
||||
|
||||
public event TargetEventHandler Clicked {
|
||||
add => AddEventListener ("click", value);
|
||||
remove => RemoveEventListener ("click", value);
|
||||
|
|
|
@ -272,6 +272,11 @@ namespace Ooui
|
|||
}
|
||||
}
|
||||
|
||||
public Value Position {
|
||||
get => this["position"];
|
||||
set => this["position"] = value;
|
||||
}
|
||||
|
||||
public Value Right {
|
||||
get => this["right"];
|
||||
set => this["right"] = value;
|
||||
|
@ -307,8 +312,7 @@ namespace Ooui
|
|||
set => this["width"] = value;
|
||||
}
|
||||
|
||||
public Value this [string propertyName]
|
||||
{
|
||||
public Value this[string propertyName] {
|
||||
get {
|
||||
lock (properties) {
|
||||
Value p;
|
||||
|
|
Loading…
Reference in New Issue