Skip to content

Commit

Permalink
Merge pull request #232 from fabulous-dev/remove-unnecessary-inlining
Browse files Browse the repository at this point in the history
Remove unnecessary inlining
  • Loading branch information
edgarfgp authored Mar 30, 2024
2 parents 4f4b565 + 376c4da commit 13ac04f
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions samples/Gallery/Common.fs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ module HamburgerMenuExtBuilders =

type Fabulous.Avalonia.View with

static member inline HamburgerMenu() =
static member HamburgerMenu() =
CollectionBuilder<'msg, IFabHamburgerMenu, IFabTabItem>(HamburgerMenuExt.WidgetKey, ItemsControl.Items)

type HamburgerMenuModifiers =
Expand Down Expand Up @@ -130,7 +130,7 @@ module FabItemsControl =
module FabItemsControlBuilders =
type Fabulous.Avalonia.View with

static member inline ItemsControl<'msg, 'itemData, 'itemMarker when 'itemMarker :> IFabControl>
static member ItemsControl<'msg, 'itemData, 'itemMarker when 'itemMarker :> IFabControl>
(
items: seq<'itemData>,
template: 'itemData -> WidgetBuilder<'msg, 'itemMarker>
Expand All @@ -145,7 +145,7 @@ open type Fabulous.Avalonia.View
module CommonBuilders =
type Fabulous.Avalonia.View with

static member inline CustomNotification(title: string, message: string, yesCommand: 'msg, noCommand: 'msg) =
static member CustomNotification(title: string, message: string, yesCommand: 'msg, noCommand: 'msg) =
Border(
Grid(coldefs = [ Auto; Star ], rowdefs = [ Auto ]) {
(Panel() {
Expand Down
2 changes: 1 addition & 1 deletion samples/Gallery/Pages/CompositionPage.fs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module CompositionPageControlBuilders =

type Fabulous.Avalonia.View with

static member inline CompositionPageControl<'msg>() =
static member CompositionPageControl<'msg>() =
WidgetBuilder<'msg, IFabCompositionPage>(CompositionPageControl.WidgetKey, AttributesBundle(StackList.empty(), ValueNone, ValueNone))

module CompositionPage =
Expand Down
2 changes: 1 addition & 1 deletion samples/Gallery/Pages/OpenGLPage.fs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ module OpenGlPageControl =
module OpenGLWidgetBuilders =
type Fabulous.Avalonia.View with

static member inline OpenGlPageControl<'msg>(yaw: float, pitch: float, roll: float, disco: float) =
static member OpenGlPageControl<'msg>(yaw: float, pitch: float, roll: float, disco: float) =
WidgetBuilder<'msg, IFabOpenGlPageControl>(OpenGlPageControl.WidgetKey, OpenGlPageControl.Data.WithValue(struct (yaw, pitch, roll, disco)))

type OpenGLWidgetModifiers =
Expand Down
2 changes: 1 addition & 1 deletion samples/RenderDemo/Animations/CustomSkiaPage.fs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ module CustomSkiaBuilders =

type Fabulous.Avalonia.View with

static member inline CustomSkiaControl<'msg>() =
static member CustomSkiaControl<'msg>() =
WidgetBuilder<'msg, IFabCustomSkiaControl>(CustomSkiaControl.WidgetKey, AttributesBundle(StackList.empty(), ValueNone, ValueNone))

module CustomSkiaPage =
Expand Down
2 changes: 1 addition & 1 deletion samples/RenderDemo/Common.fs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ open type Fabulous.Avalonia.View
module CommonBuilders =
type Fabulous.Avalonia.View with

static member inline CustomNotification(title: string, message: string, yesCommand: 'msg, noCommand: 'msg) =
static member CustomNotification(title: string, message: string, yesCommand: 'msg, noCommand: 'msg) =
Border(
Grid(coldefs = [ Auto; Star ], rowdefs = [ Auto ]) {
(Panel() {
Expand Down
2 changes: 1 addition & 1 deletion samples/RenderDemo/FormattedTextPage.fs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ module FormattedTextBuilders =

type Fabulous.Avalonia.View with

static member inline FormattedText<'msg>() =
static member FormattedText<'msg>() =
WidgetBuilder<'msg, IFabFormattedTextControl>(FormattedText.WidgetKey, AttributesBundle(StackList.empty(), ValueNone, ValueNone))

module FormattedTextPage =
Expand Down
4 changes: 2 additions & 2 deletions samples/RenderDemo/GlyphRunPage.fs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ module GlyphRunControlBuilders =

type Fabulous.Avalonia.View with

static member inline GlyphRun<'msg>() =
static member GlyphRun<'msg>() =
WidgetBuilder<'msg, IFabGlyphRunControl>(GlyphRun.WidgetKey, AttributesBundle(StackList.empty(), ValueNone, ValueNone))

type IFabGlyphRunGeometryControl =
Expand All @@ -135,7 +135,7 @@ module GlyphRunGeometryControlBuilders =

type Fabulous.Avalonia.View with

static member inline GlyphRunGeometry<'msg>() =
static member GlyphRunGeometry<'msg>() =
WidgetBuilder<'msg, IFabGlyphRunGeometryControl>(GlyphRunGeometry.WidgetKey, AttributesBundle(StackList.empty(), ValueNone, ValueNone))


Expand Down
2 changes: 1 addition & 1 deletion samples/RenderDemo/PathMeasurementPage.fs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module PathMeasurementBuilders =

type Fabulous.Avalonia.View with

static member inline PathMeasurement<'msg>() =
static member PathMeasurement<'msg>() =
WidgetBuilder<'msg, IFabPathMeasurement>(PathMeasurement.WidgetKey, AttributesBundle(StackList.empty(), ValueNone, ValueNone))

module PathMeasurementPage =
Expand Down
2 changes: 1 addition & 1 deletion samples/RenderDemo/RenderTargetBitmapPage.fs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module RenderTargetBitmapBuilders =

type Fabulous.Avalonia.View with

static member inline RenderTargetBitmap<'msg>() =
static member RenderTargetBitmap<'msg>() =
WidgetBuilder<'msg, IFabRenderTargetBitmap>(RenderTargetBitmap.WidgetKey, AttributesBundle(StackList.empty(), ValueNone, ValueNone))

module RenderTargetBitmapPage =
Expand Down
2 changes: 1 addition & 1 deletion samples/RenderDemo/TextFormatterPage.fs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module TextFormatterBuilders =

type Fabulous.Avalonia.View with

static member inline TextFormatter<'msg>() =
static member TextFormatter<'msg>() =
WidgetBuilder<'msg, IFabTextFormatterControl>(TextFormatter.WidgetKey, AttributesBundle(StackList.empty(), ValueNone, ValueNone))

module TextFormatterPage =
Expand Down
2 changes: 1 addition & 1 deletion samples/RenderDemo/Widgets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module HamburgerMenuBuilders =

type Fabulous.Avalonia.View with

static member inline HamburgerMenu() =
static member HamburgerMenu() =
CollectionBuilder<'msg, IFabHamburgerMenu, IFabTabItem>(HamburgerMenu.WidgetKey, ItemsControl.Items)


Expand Down
2 changes: 1 addition & 1 deletion samples/RenderDemo/WriteableBitmapPage.fs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module WriteableBitmapBuilders =

type Fabulous.Avalonia.View with

static member inline WriteableBitmap<'msg>() =
static member WriteableBitmap<'msg>() =
WidgetBuilder<'msg, IFabWriteableBitmap>(WriteableBitmap.WidgetKey, AttributesBundle(StackList.empty(), ValueNone, ValueNone))

module WriteableBitmapPage =
Expand Down
6 changes: 3 additions & 3 deletions src/Fabulous.Avalonia/Component.fs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ module Component =
module ComponentBuilders =
type Fabulous.Avalonia.View with

static member inline Component<'msg, 'marker>() = ComponentBuilder<'msg>()
static member Component<'msg, 'marker>() = ComponentBuilder<'msg>()

static member inline Component<'msg, 'model, 'marker, 'parentMsg>(program: Program<unit, 'model, 'msg>) =
static member Component<'msg, 'model, 'marker, 'parentMsg>(program: Program<unit, 'model, 'msg>) =
MvuComponentBuilder<unit, 'msg, 'model, 'marker, 'parentMsg>(program, ())

static member inline Component<'arg, 'msg, 'model, 'marker, 'parentMsg>(program: Program<'arg, 'model, 'msg>, arg: 'arg) =
static member Component<'arg, 'msg, 'model, 'marker, 'parentMsg>(program: Program<'arg, 'model, 'msg>, arg: 'arg) =
MvuComponentBuilder<'arg, 'msg, 'model, 'marker, 'parentMsg>(program, arg)

0 comments on commit 13ac04f

Please sign in to comment.