[gnome-games/wip/exalm/gtk4: 34/34] ui: Update size_allocate() arguments
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/gtk4: 34/34] ui: Update size_allocate() arguments
- Date: Sat, 9 Feb 2019 12:18:37 +0000 (UTC)
commit 83969b6cae28dfe5ad339a70ad850101a801cda3
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 1b5663ce..05744058 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]