Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample.Gtk: build SourceGen separately #21

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Commits on Mar 8, 2023

  1. GitHubCI: add

    We changed the dotnet version to 6.0.300 to ultimately use
    GtkSharp pre-built packages instead of cloning the repo.
    
    Co-authored-by: webwarrior-ws <reg@webwarrior.ws>
    Co-authored-by: Parham Saremi <parhaamsaremi@gmail.com>
    3 people authored and knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    72f48c4 View commit details
    Browse the repository at this point in the history
  2. Controls.Sample.Gtk: fix build

    Error:
    /home/runner/work/maui/maui/src/Controls/samples/Controls.Sample.Gtk/SimpleSampleApp/SimpleSampleGtkApplication.cs(28,5):
    error CS0117: 'Box' does not contain a definition for 'Fill'
    aarani authored and knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    7a1e1b4 View commit details
    Browse the repository at this point in the history
  3. GitHubCI: remove label-partner-issues (lytico#3)

    It was throwing some error in our PRs CI, and this
    seems Microsoft-specific.
    parhamsaremi authored and knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    c32cd0c View commit details
    Browse the repository at this point in the history
  4. Compatibility/Gtk: add FontNamedSizeService gtk

    FontNamedSizeService is needed when using `Fontsize=Large` or
    `Fontsize=Small` in Xaml files. Without this service, we get
    runtime errors when trying to parse Xaml files that have
    Fontsize attribute in them.
    parhamsaremi authored and knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    fc9f862 View commit details
    Browse the repository at this point in the history
  5. Platform/Gtk: set MainWindow for size

    These changes are necessary for having access to MainWindow
    in MauiGtkApplication. Initially, this field was always null
    and was never set. We needed access to MainWindow to do
    manual operations like resize on it because the applications
    might want to specify custom size of the window.
    
    Co-authored-by: webwarrior-ws <reg@webwarrior.ws>
    2 people authored and knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    32ec214 View commit details
    Browse the repository at this point in the history
  6. Platform/Gtk: remove debug borders from Layouts

    When TRACE_ALLOCATION constant is defined, some debug borders
    with width and heights is shown for layouts. By disabling them,
    the debug values are removed from the final output.
    parhamsaremi authored and knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    0d20a97 View commit details
    Browse the repository at this point in the history
  7. Core: fix Label line break mode in Gtk

    Made label widget in Gtk respect LineBreakMode and MaxLines
    properties, the way it does on other platforms. By doing this
    labels won't crop text with dashes in any part of the word and
    they keep the words complete.
    These properties were added to ILabel interface, as it is in
    MAUI main branch.
    webwarrior-ws authored and knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    8be2f14 View commit details
    Browse the repository at this point in the history
  8. Platform/Gtk: workaround for layout rsize problem

    Layout size is messed up after window looses or gains focus.
    Which is fixed by not returning the cached value.
    
    Co-authored-by: webwarrior-ws <reg@webwarrior.ws>
    2 people authored and knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    52c094b View commit details
    Browse the repository at this point in the history
  9. Connectivity: port code from DotNetEssentials

    Implement Connectivity for Gtk platform by porting code from
    nblockchain/DotNetEssentials.
    webwarrior-ws authored and knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    b9f1794 View commit details
    Browse the repository at this point in the history
  10. Core: implemented NavigationViewHandler for Gtk

    Implemented NavigationViewHandler for Gtk.
    Made changes so that NavigationViewHandler is used for
    NavigationPage in Gtk, instead of generic Page handler.
    It is incomplete at the moment. Processing of navigation
    events works, but toolbar is not implemented.
    
    Co-authored-by: Parham <parhaamsaremi@gmail.com>
    2 people authored and knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    502cc8a View commit details
    Browse the repository at this point in the history
  11. GitHubCI,src: move format check from daily to push

    In order to have this new CI fragment pass we've had to
    update many C# files.
    knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    a2efebe View commit details
    Browse the repository at this point in the history
  12. Core(Gtk): implement AlertManager (lytico#4)

    Implement AlertManager for Gtk.
    Implementation is not complete; alert dialogs and action sheets
    are implemented, progress bar prompts are not. Also title bar
    is not shown.
    webwarrior-ws authored and knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    1b58dd2 View commit details
    Browse the repository at this point in the history
  13. Core(Gtk): implement visibility in layouts

    Layouts in Gtk now react to change in Visibility property.
    webwarrior-ws authored and knocte committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    c0ab5fb View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2023

  1. GitHubCI: use slnf instead of csproj

    This way we know exactly all the projects that are being
    compiled.
    parhamsaremi authored and knocte committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    be2239b View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2023

  1. Core(Gtk): implement date picker

    Made date picker work, ported from [1].
    
    But it gives errors in console and can crash[2] if opened/closed
    many times.
    
    [1] https://github.com/xamarin/Xamarin.Forms/blob/5.0.0/Xamarin.Forms.Platform.GTK/Controls/DatePicker.cs
    [2] (TODO: file a bug in GtkSharp repo):
    
    ```
    (GWallet.Frontend.Maui:110296): GLib-GObject-CRITICAL **: 12:14:36.625: g_object_remove_toggle_ref: assertion 'G_IS_OBJECT (object)' failed
    
    (GWallet.Frontend.Maui:110296): GLib-GObject-CRITICAL **: 12:14:36.627: g_object_remove_toggle_ref: assertion 'G_IS_OBJECT (object)' failed
    Marshaling button-press-event signal
    Exception in Gtk# callback delegate
      Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
    GLib.MissingIntPtrCtorException: Unable to construct instance of type Microsoft.Maui.Platform.DatePickerWindow from native object handle. Instance of managed subclass may have been prematurely disposed.
       at GLib.ObjectManager.CreateObject(IntPtr raw)
       at GLib.Object.GetObject(IntPtr o, Boolean owned_ref)
       at GLib.Value.get_Val()
       at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
       at GLib.ExceptionManager.RaiseUnhandledException(Exception e, Boolean is_terminal)
       at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
       at GLib.Application.Run(String program_name, String[] args)
       at GLib.Application.Run()
       at Microsoft.Maui.MauiGtkApplication.Launch(EventArgs args) in /home/ubuntu/geewallet-build/geewallet/dependencies/maui/src/Core/src/Platform/Gtk/MauiGtkApplication.cs:line 127
       at Microsoft.Maui.MauiGtkApplication.Run(String[] args) in /home/ubuntu/geewallet-build/geewallet/dependencies/maui/src/Core/src/Platform/Gtk/MauiGtkApplication.cs:line 40
       at GWallet.Frontend.Maui.Program.main(String[] _args) in /home/ubuntu/geewallet-build/geewallet/src/GWallet.Frontend.Maui/Platforms/Gtk/Program.fs:line 14
    ```
    
    Co-authored-by: Parham <parhaamsaremi@gmail.com>
    2 people authored and knocte committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    33aa7d6 View commit details
    Browse the repository at this point in the history
  2. Core(Gtk): fix DatePickerWindow crash

    Fix potential exception if DatePicker is used
    many times quickly:
    
    ```
        (GWallet.Frontend.Maui:110296): GLib-GObject-CRITICAL **: 12:14:36.625: g_object_remove_toggle_ref: assertion 'G_IS_OBJECT (object)' failed
    
        (GWallet.Frontend.Maui:110296): GLib-GObject-CRITICAL **: 12:14:36.627: g_object_remove_toggle_ref: assertion 'G_IS_OBJECT (object)' failed
        Marshaling button-press-event signal
        Exception in Gtk# callback delegate
          Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
        GLib.MissingIntPtrCtorException: Unable to construct instance of type Microsoft.Maui.Platform.DatePickerWindow from native object handle. Instance of managed subclass may have been prematurely disposed.
           at GLib.ObjectManager.CreateObject(IntPtr raw)
           at GLib.Object.GetObject(IntPtr o, Boolean owned_ref)
           at GLib.Value.get_Val()
           at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
           at GLib.ExceptionManager.RaiseUnhandledException(Exception e, Boolean is_terminal)
           at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
           at GLib.Application.Run(String program_name, String[] args)
           at GLib.Application.Run()
           at Microsoft.Maui.MauiGtkApplication.Launch(EventArgs args) in /home/ubuntu/geewallet-build/geewallet/dependencies/maui/src/Core/src/Platform/Gtk/MauiGtkApplication.cs:line 127
           at Microsoft.Maui.MauiGtkApplication.Run(String[] args) in /home/ubuntu/geewallet-build/geewallet/dependencies/maui/src/Core/src/Platform/Gtk/MauiGtkApplication.cs:line 40
           at GWallet.Frontend.Maui.Program.main(String[] _args) in /home/ubuntu/geewallet-build/geewallet/src/GWallet.Frontend.Maui/Platforms/Gtk/Program.fs:line 14
    ```
    
    By using Hide instead of Destroy.
    parhamsaremi authored and knocte committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    7ff3c3a View commit details
    Browse the repository at this point in the history
  3. Core(Gtk): fix calendar position

    Fix position of calendar pop-up when opened more than one time.
    webwarrior-ws authored and knocte committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    1dcf7a9 View commit details
    Browse the repository at this point in the history
  4. Core(Gtk): no excessive OnDateTimeChanged events

    Avoid excessive firing of OnDateTimeChanged events when
    creating DatePickerWindow.
    webwarrior-ws authored and knocte committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    a1efe23 View commit details
    Browse the repository at this point in the history
  5. Core(Gtk): update calendar properties

    Update calendar properties SelectedDate, MinimumDate,
    MaximumDate when opening calendar popup when it is already
    created but hidden.
    webwarrior-ws authored and knocte committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    fe92c90 View commit details
    Browse the repository at this point in the history
  6. Core(Gtk): fix datePicker window position

    DatePicker window location was wrong when we didn't use
    x11 GdkBackend. This problem was fixed by setting the
    TransientFor property.
    
    Co-authored-by: webwarrior-ws <reg@webwarrior.ws>
    2 people authored and knocte committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    0032339 View commit details
    Browse the repository at this point in the history
  7. Core(GTK): fix obsolete method calls in datepicker

    Replace deprecated methods.
    Used Entry icon instead of defining a new button for datepicker
    arrow.
    
    Co-authored-by: webwarrior-ws <reg@webwarrior.ws>
    2 people authored and knocte committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    8c3d7c2 View commit details
    Browse the repository at this point in the history
  8. Merge PR lytico#7 from wip/datePicker

    Core(Gtk): implement date picker
    knocte committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    0bc11bb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    97d580e View commit details
    Browse the repository at this point in the history
  10. Core(Gtk): fix setting of style

    Fix setting of style in widgets in certain cases (when widget's CSS path
    contains spaces).
    webwarrior-ws committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    f59dd7a View commit details
    Browse the repository at this point in the history
  11. Merge PR lytico#10 from webwarrior-ws/fix-button-colors

    Core(Gtk): fix button colors.
    knocte committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    791aad0 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2023

  1. Controls.Hosting(GTK): mappings for Frame (lytico#11)

    Add mappers for BorderColor and CornerRadius for Frame elements
    so they can now have borders.
    parhamsaremi committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    6079541 View commit details
    Browse the repository at this point in the history
  2. Core(Gtk): fix fill in shapes

    Fix fill in solid shapes like Ellipse or Rectangle.
    webwarrior-ws authored and knocte committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    7abe8de View commit details
    Browse the repository at this point in the history
  3. Core(Gtk): enable drawing of Path elements

    Path elements are now being drawn.
    webwarrior-ws authored and knocte committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    33f9edc View commit details
    Browse the repository at this point in the history
  4. Core(Gtk): add OnSetImageSource for ImageHandler

    Previously, Image class didn't work in maui code and after
    setting the image nothing would appear.
    parhamsaremi committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    148b52c View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2023

  1. Core(Gtk): fix Visibility bug in WidgetExtenstion

    When visibility for image or label (or other views) was set to
    false, they stayed visible in the application.
    parhamsaremi committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    1610d50 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2023

  1. Essentials(Gtk): implement Launcher (lytico#15)

    Ported Launcher code from DotNetEssentials.
    webwarrior-ws committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    8d082ed View commit details
    Browse the repository at this point in the history
  2. Core,Controls(Gtk): implement tap/click gestures (lytico#14)

    Implement tap/click gestures for Gtk.
    Note that due to the way Gtk works only certain widgets can
    respond to click events.
    I changed ContentView to inherit from EventBox, so many
    elements have this capability, including all layouts.
    Still many widgets such as label for which adding tap gesture
    recognizer will have no effect.
    See
    https://discourse.gnome.org/t/gtk-widget-mouse-down-event-does-not-seem-to-work/1699.
    webwarrior-ws committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    6521d27 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2023

  1. Core(Gtk): fix image resize

    Implement WidthRequest and HeightRequest mappings for Image.
    parhamsaremi committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    6bb9424 View commit details
    Browse the repository at this point in the history
  2. Merge PR lytico#13 from parhamsaremi/fix-image-problems-rebased

    Fix image problems for GTK.
    knocte committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    bd1471b View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2023

  1. Sample.Gtk: build SourceGen separately

    Build Controls.SourceGen.csproj before building
    Microsoft.Maui.Gtk.slnf. We have to do this since
    sometimes when building the Sample.Gtk project, the error
    below is shown. It's a random error that happens when
    building the Microsoft.Maui.Gtk.slnf but it doesn't happen
    in each build attempt.
    
    ```
    CSC : error CS0006: Metadata file '/home/runner/work/maui/maui/.nuspec/Microsoft.Maui.Controls.SourceGen.dll' could not be found [/home/runner/work/maui/maui/src/Controls/samples/Controls.Sample.Gtk/Controls.Sample.Gtk.csproj]
        0 Warning(s)
        1 Error(s)
    ```
    parhamsaremi committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    5a5c95c View commit details
    Browse the repository at this point in the history