From 8314c75b2a7b7a43d9ffdcc49f2bc36ada1ccd76 Mon Sep 17 00:00:00 2001
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Date: Sat, 27 Nov 2021 01:28:33 +0900
Subject: [PATCH 2/3] =?UTF-8?q?core/mui=20=E4=BB=A5=E4=B8=8B=E3=81=AE=20cl?=
 =?UTF-8?q?oseup()=20=E3=82=92=E7=BD=AE=E3=81=8D=E6=8F=9B=E3=81=88=20refs?=
 =?UTF-8?q?=20#1525?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 core/mui/cairo_inner_tl.rb |  2 +-
 core/mui/cairo_timeline.rb |  4 ++--
 core/mui/gtk_crud.rb       | 21 +++++++++++++++------
 core/mui/gtk_form_dsl.rb   |  2 +-
 core/mui/gtk_mtk.rb        |  8 ++++----
 5 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/core/mui/cairo_inner_tl.rb b/core/mui/cairo_inner_tl.rb
index 5b3176ab..e67ba5fb 100644
--- a/core/mui/cairo_inner_tl.rb
+++ b/core/mui/cairo_inner_tl.rb
@@ -83,7 +83,7 @@ class Gtk::TimeLine::InnerTL < Gtk::CompatListView
     options[:before_post_hook] = ->(this) {
       get_ancestor(Gtk::Window).set_focus(self) unless self.destroyed? }
     pb = Gtk::PostBox.new(**options).show_all
-    postbox.closeup(pb)
+    postbox.pack_start(pb, expand: false)
     pb.on_delete(&block) if block
     get_ancestor(Gtk::Window).set_focus(pb.post)
     pb end
diff --git a/core/mui/cairo_timeline.rb b/core/mui/cairo_timeline.rb
index 9f95e50e..03ede126 100644
--- a/core/mui/cairo_timeline.rb
+++ b/core/mui/cairo_timeline.rb
@@ -34,7 +34,7 @@ class Gtk::TimeLine < Gtk::Box
     super(:vertical)
     @tl = InnerTL.new
     @tl.imaginary = imaginary
-    closeup(postbox).pack_start(init_tl)
+    pack_start(postbox, expand: false).pack_start(init_tl)
   end
 
   def init_tl
@@ -56,7 +56,7 @@ class Gtk::TimeLine < Gtk::Box
       false }
 
     init_remover
-    @shell = (Gtk::Box.new :horizontal).pack_start(@tl).closeup(scrollbar) end
+    @shell = (Gtk::Box.new :horizontal).pack_start(@tl).pack_start(scrollbar, expand: false) end
 
   # TLに含まれているMessageを順番に走査する。最新のものから順番に。
   def each(index=1)
diff --git a/core/mui/gtk_crud.rb b/core/mui/gtk_crud.rb
index ef0e5c8b..240f9976 100644
--- a/core/mui/gtk_crud.rb
+++ b/core/mui/gtk_crud.rb
@@ -140,22 +140,31 @@ class Gtk::CRUD < Gtk::CompatListView
     column_schemer.flatten.each_with_index{ |scheme, index|
       case scheme[:widget]
       when :message_picker
-        widget.closeup(Mtk.message_picker(lambda{ |new|
+        widget.pack_start(Mtk.message_picker(lambda{ |new|
                                             if(new.nil?)
                                               results[index].freeze_ifn
                                             else
-                                              results[index] = new.freeze_ifn end }))
+                                              results[index] = new.freeze_ifn
+                                            end
+                                          }), expand: false)
       when nil
         ;
       else
-        widget.closeup(Mtk.__send__((scheme[:widget] or :input), lambda{ |new|
+        widget.pack_start(widget, Mtk.__send__((scheme[:widget] or :input), lambda{ |new|
                                    if(new.nil?)
                                      results[index].freeze_ifn
                                    else
-                                     results[index] = new.freeze_ifn end },
-                                 scheme[:label], *(scheme[:args].to_a or []))) end }
+                                     results[index] = new.freeze_ifn
+                                   end
+                                 },
+                                 scheme[:label], *(scheme[:args].to_a or [])), expand: false)
+      end
+    }
     { :widget => widget,
       :result => lambda{
-        results } } end
+        results
+      }
+    }
+  end
 
 end
diff --git a/core/mui/gtk_form_dsl.rb b/core/mui/gtk_form_dsl.rb
index ed325245..e776dafe 100644
--- a/core/mui/gtk_form_dsl.rb
+++ b/core/mui/gtk_form_dsl.rb
@@ -651,7 +651,7 @@ module Gtk::FormDSL
     container.pack_start(Gtk::Label.new(title), expand: false, fill: true, padding: 0)
     container.pack_start(Gtk::Alignment.new(1.0, 0.5, 0, 0).add(keyconfig), expand: true, fill: true, padding: 0)
     keyconfig.change_hook = ->(modify) { self[config] = modify }
-    closeup(container)
+    pack_start(container, expand: false)
     container
   end
 
diff --git a/core/mui/gtk_mtk.rb b/core/mui/gtk_mtk.rb
index 737825c6..44977fc2 100644
--- a/core/mui/gtk_mtk.rb
+++ b/core/mui/gtk_mtk.rb
@@ -162,7 +162,7 @@ module Mtk
     keyconfig = Gtk::KeyConfig.new(title, proc.call(nil))
     container = Gtk::Box.new(:horizontal, 0)
     container.pack_start(Gtk::Label.new(title), expand: false, fill: true, padding: 0)
-    container.closeup(keyconfig.right)
+    container.pack_start(keyconfig.right, expand: false)
     keyconfig.change_hook = proc
     return container
   end
@@ -216,17 +216,17 @@ module Mtk
     button end
 
   def fontselect(key, label)
-    Gtk::Box.new(:horizontal, 0).add(Gtk::Label.new(label).left).closeup(_fontselect(key, label))
+    Gtk::Box.new(:horizontal, 0).add(Gtk::Label.new(label).left).pack_start(_fontselect(key, label), expand: false)
   end
   deprecate :fontselect, :none, 2020, 8
 
   def colorselect(key, label)
-    Gtk::Box.new(:horizontal, 0).add(Gtk::Label.new(label).left).closeup(_colorselect(key, label))
+    Gtk::Box.new(:horizontal, 0).add(Gtk::Label.new(label).left).pack_start(_colorselect(key, label), expand: false)
   end
   deprecate :colorselect, :none, 2020, 8
 
   def fontcolorselect(font, color, label)
-    self.fontselect(font, label).closeup(_colorselect(color, label))
+    self.fontselect(font, label).pack_start(_colorselect(color, label), expand: false)
   end
   deprecate :fontcolorselect, :none, 2020, 8
 
-- 
2.33.0

