Switch the layout when the screen geometry changes
[beifahrer] / src / lift-list-window.vala
index 82e731e..4e82d9a 100644 (file)
@@ -112,7 +112,7 @@ public class LiftListWindow : StackableWindow {
                route_column.set_visible (!BeifahrerProgram.orientation.portrait);
 
                tree.row_activated.connect (this.on_row_activated);
-               BeifahrerProgram.orientation.changed.connect (this.on_orientation_changed);
+               Gdk.Screen.get_default ().size_changed.connect (this.on_orientation_changed);
        }
 
        public async void find_lifts (string city_from, int radius_from, string city_to, int radius_to, Date date, int tolerance = 0) {
@@ -177,7 +177,7 @@ public class LiftListWindow : StackableWindow {
                }
        }
 
-       private void on_orientation_changed () {
+       private void on_orientation_changed (Gdk.Screen screen) {
                route_column.set_visible (!BeifahrerProgram.orientation.portrait);
        }
 }