title: How to make the widgets on the popup window widgets stay with the popup window when the root window is resized
body: <p>The widgets on my popup window do not resize when the root window resizes. The popup window and the labels on the popup window stay where they are. Does it have something to do with the size_hint and size of the popup window itself? It seems that the widgets(icons) are independent of the popup window.</p>
  <p>main file</p>
  <pre><code>from kivy.app import App
  from kivy.uix.screenmanager import Screen
  from kivy.uix.button import ButtonBehavior
  from kivy.uix.image import Image
  from kivy.properties import StringProperty, ObjectProperty,NumericProperty
  from kivy.uix.popup import Popup
  from kivy.uix.floatlayout import FloatLayout
  
  
  class MainScreen(Screen, FloatLayout):
      mantra_text = ObjectProperty(None)
  
      def printMantra(self):
          print(self.ids.mantra_text.text)
  
      def icon_popup(self):
          popup = Popup(title=&quot;Profile Icon&quot;, content=Popup_Content(), size_hint=(None, None), size=(300, 200))
          popup.open()
  
  
  class Popup_Content(FloatLayout):
      pass
  
  
  class ImageButton(ButtonBehavior, Image):
      pass
  
  
  class MainApp(App):
      def build(self):
          return MainScreen()
  
      def set_profile_icon(self, image):
          self.root.ids.profile_icon.source = image.source
          print(image)
          #print(self.root.ids.profile_icon)
  
  
  MainApp().run()
  
  </code></pre>
  <p>kivy file</p>
  <pre><code>#:import utils kivy.utils
  &lt;MainScreen&gt;
      Popup_Content:
          id: popup_content
  
      FloatLayout:
          canvas:
              Color:
                  rgb: utils.get_color_from_hex(&quot;#ffbb99&quot;)
              Rectangle:
                  pos: self.pos
                  size: self.size
  
          GridLayout:
              cols: 2
              pos_hint: {&quot;x&quot;:0.6, &quot;top&quot;:1}
              size_hint: 0.4,0.2
              spacing_horizontal: [0.9*root.width]
              Label:
                  text: &quot;Name&quot;
              ImageButton:
                  id: profile_icon
                  source: &quot;profile_icon&quot;
                  on_release: root.icon_popup()
  
          Label:
              text: mantra_text.text
              pos_hint: {&quot;x&quot;:0, &quot;top&quot;:0.8}
              size_hint: 1, 0.2
              text_size: self.size
              halign: &quot;center&quot;
              font_size: 25
          TextInput:
              id: mantra_text
              pos_hint: {&quot;x&quot;: 0.15, &quot;top&quot;:0.6}
              size_hint: 0.7, 0.1
              #text_size: self.size
  
          Label:
              text: &quot;Time&quot;
              pos_hint: {&quot;x&quot;:0.3, &quot;top&quot;:0.6}
              size_hint: 0.4, 0.2
              text_size: self.size
              halign: &quot;left&quot;
              font_size: 30
  
          Button:
              text: &quot;Time&quot;
              pos_hint: {&quot;x&quot;:0.3, &quot;top&quot;:0.5}
              size_hint: 0.4, 0.2
              on_release: root.printMantra()
  
  &lt;Popup_Content&gt;
  
      #profile_icon: profile_icon
      FloatLayout:
          GridLayout:
              cols: 5
              pos_hint: {&quot;x&quot;:0.95, &quot;y&quot;:1.6}
  
              ImageButton:
                  id: man_01
                  source: &quot;icons/male_icon_01.png&quot;
                  on_release: app.set_profile_icon(man_01)
              ImageButton:
                  id: man_02
                  source: &quot;icons/male_icon_02.png&quot;
                  on_release: app.set_profile_icon(man_02)
              ImageButton:
                  source: &quot;icons/male_icon_01.png&quot;
                  on_release: app.set_profile_icon()
              ImageButton:
                  source: &quot;icons/male_icon_01.png&quot;
                  on_release: app.set_profile_icon()
              ImageButton:
                  source: &quot;icons/male_icon_01.png&quot;
                  on_release: app.set_profile_icon()
              ImageButton:
                  id: female_01
                  source: &quot;icons/female_icon_01.png&quot;
                  on_release: app.set_profile_icon(female_01)
  
  
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ayFpX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ayFpX.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/Z92VB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z92VB.png" alt="enter image description here" /></a></p>