[gnome-games/wip/exalm/gtk4: 13/31] display-box: Stop using GtkEventBox



commit 2cdb065b815e85c3160c3040ae92757b2e79cd7b
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sun Jul 29 00:42:39 2018 +0500

    display-box: Stop using GtkEventBox
    
    Just use GtkBin instead.

 data/ui/display-box.ui  | 7 +++----
 src/ui/display-box.vala | 4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/data/ui/display-box.ui b/data/ui/display-box.ui
index dbef4a0c..0c42f288 100644
--- a/data/ui/display-box.ui
+++ b/data/ui/display-box.ui
@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="3.16"/>
-  <template class="GamesDisplayBox" parent="GtkEventBox">
+  <template class="GamesDisplayBox" parent="GtkBin">
     <property name="visible">True</property>
-    <property name="events">GDK_POINTER_MOTION_MASK</property>
     <signal name="notify::is-fullscreen" handler="on_fullscreen_changed"/>
     <child>
       <object class="GtkEventControllerMotion">
@@ -19,7 +18,6 @@
             <property name="valign">start</property>
             <property name="hexpand">True</property>
             <property name="transition-type">slide-down</property>
-            <property name="events">GDK_POINTER_MOTION_MASK</property>
             <signal name="notify::is-fullscreen" handler="on_fullscreen_changed"/>
             <child>
               <object class="GtkEventControllerMotion">
@@ -47,8 +45,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkEventBox" id="display_bin">
+              <object class="GtkFrame" id="display_bin">
                 <property name="visible">True</property>
+                <property name="shadow-type">none</property>
               </object>
               <packing>
                 <property name="name">display</property>
diff --git a/src/ui/display-box.vala b/src/ui/display-box.vala
index 746c2d1a..b7b562a4 100644
--- a/src/ui/display-box.vala
+++ b/src/ui/display-box.vala
@@ -1,7 +1,7 @@
 // This file is part of GNOME Games. License: GPL-3.0+.
 
 [GtkTemplate (ui = "/org/gnome/Games/ui/display-box.ui")]
-private class Games.DisplayBox : Gtk.EventBox {
+private class Games.DisplayBox : Gtk.Bin {
        private const uint INACTIVITY_TIME_MILLISECONDS = 2000;
 
        public signal void back ();
@@ -36,7 +36,7 @@ private class Games.DisplayBox : Gtk.EventBox {
        [GtkChild]
        private ErrorDisplay error_display;
        [GtkChild]
-       private Gtk.EventBox display_bin;
+       private Gtk.Bin display_bin;
        [GtkChild]
        private Gtk.Revealer fullscreen_header_bar_revealer;
        [GtkChild]


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