[gnome-games/wip/exalm/issue98-330: 2/4] game-icon-view: Remove 'size' property



commit 72534a62cd8d28c5d6466c5ebfecd6438f735518
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sun Sep 23 14:41:23 2018 +0500

    game-icon-view: Remove 'size' property
    
    Since thumbnails are now sized automatically, and labels take the whole
    width, only set width-request for the whole widget.

 src/ui/collection-icon-view.vala |  4 ++--
 src/ui/game-icon-view.vala       | 12 ------------
 2 files changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/src/ui/collection-icon-view.vala b/src/ui/collection-icon-view.vala
index fbce6496..17c8cc59 100644
--- a/src/ui/collection-icon-view.vala
+++ b/src/ui/collection-icon-view.vala
@@ -215,7 +215,7 @@ private class Games.CollectionIconView : Gtk.Bin {
                var child = new Gtk.FlowBoxChild ();
 
                game_view.visible = true;
-               game_view.size = game_view_size;
+               game_view.width_request = game_view_size;
                child.visible = true;
 
                child.add (game_view);
@@ -295,7 +295,7 @@ private class Games.CollectionIconView : Gtk.Bin {
 
                        assert (game_view != null);
 
-                       game_view.size = size;
+                       game_view.width_request = size;
                });
        }
 }
diff --git a/src/ui/game-icon-view.vala b/src/ui/game-icon-view.vala
index d138f1b4..cb52731e 100644
--- a/src/ui/game-icon-view.vala
+++ b/src/ui/game-icon-view.vala
@@ -20,24 +20,12 @@ private class Games.GameIconView : Gtk.Box {
                }
        }
 
-       public int size {
-               set {
-                       thumbnail.width_request = value;
-                       thumbnail.height_request = value;
-                       title.width_request = value;
-                       subtitle.width_request = value;
-               }
-       }
-
        [GtkChild]
        private GameThumbnail thumbnail;
        [GtkChild]
        private Gtk.Label title;
-       [GtkChild]
-       private Gtk.Label subtitle;
 
        public GameIconView (Game game) {
                this.game = game;
-               this.size = 256;
        }
 }


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