[gnome-games/wip/exalm/gtk4: 39/39] ui: Update size_allocate() arguments



commit 02c95a785e9f4bf444be85e9fbc4c51d29c52097
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sun Nov 25 14:52:09 2018 +0500

    ui: Update size_allocate() arguments
    
    Replace Gtk.Allocation argument with width and height.

 src/ui/application-window.vala   | 4 ++--
 src/ui/collection-icon-view.vala | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/ui/application-window.vala b/src/ui/application-window.vala
index 8b3c2b92..e6d70ab2 100644
--- a/src/ui/application-window.vala
+++ b/src/ui/application-window.vala
@@ -211,8 +211,8 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
                return result;
        }
 
-       public override void size_allocate (Gtk.Allocation allocation, int baseline) {
-               base.size_allocate (allocation, baseline);
+       public override void size_allocate (int width, int height, int baseline) {
+               base.size_allocate (width, height, baseline);
 
                if (window_size_update_timeout == -1 && !is_maximized)
                        window_size_update_timeout = Timeout.add (WINDOW_SIZE_UPDATE_DELAY_MILLISECONDS, 
store_window_size);
diff --git a/src/ui/collection-icon-view.vala b/src/ui/collection-icon-view.vala
index b3d2fb17..6563b929 100644
--- a/src/ui/collection-icon-view.vala
+++ b/src/ui/collection-icon-view.vala
@@ -246,12 +246,12 @@ private class Games.CollectionIconView : Gtk.Bin {
        }
 
        [GtkCallback]
-       private void on_size_allocate (Gtk.Allocation allocation) {
+       private void on_size_allocate (Gtk.Widget widget, int width, int height, int baseline) {
                // If the window's width is less than half the width of a 1920×1080
                // screen, display the game thumbnails at half the size to see more of
                // them rather than a few huge thumbnails, making Games more usable on
                // small screens.
-               if (allocation.width < 960)
+               if (width < 960)
                        get_style_context ().remove_class ("large");
                else
                        get_style_context ().add_class ("large");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]