プロジェクト

全般

プロフィール

提案 #1525 » 0002-replace-closeup-mui.patch

Izumi Tsutsui, 2021-11-27 02:24

差分を表示:

core/mui/cairo_inner_tl.rb
83 83
    options[:before_post_hook] = ->(this) {
84 84
      get_ancestor(Gtk::Window).set_focus(self) unless self.destroyed? }
85 85
    pb = Gtk::PostBox.new(**options).show_all
86
    postbox.closeup(pb)
86
    postbox.pack_start(pb, expand: false)
87 87
    pb.on_delete(&block) if block
88 88
    get_ancestor(Gtk::Window).set_focus(pb.post)
89 89
    pb end
core/mui/cairo_timeline.rb
34 34
    super(:vertical)
35 35
    @tl = InnerTL.new
36 36
    @tl.imaginary = imaginary
37
    closeup(postbox).pack_start(init_tl)
37
    pack_start(postbox, expand: false).pack_start(init_tl)
38 38
  end
39 39

  
40 40
  def init_tl
......
56 56
      false }
57 57

  
58 58
    init_remover
59
    @shell = (Gtk::Box.new :horizontal).pack_start(@tl).closeup(scrollbar) end
59
    @shell = (Gtk::Box.new :horizontal).pack_start(@tl).pack_start(scrollbar, expand: false) end
60 60

  
61 61
  # TLに含まれているMessageを順番に走査する。最新のものから順番に。
62 62
  def each(index=1)
core/mui/gtk_crud.rb
140 140
    column_schemer.flatten.each_with_index{ |scheme, index|
141 141
      case scheme[:widget]
142 142
      when :message_picker
143
        widget.closeup(Mtk.message_picker(lambda{ |new|
143
        widget.pack_start(Mtk.message_picker(lambda{ |new|
144 144
                                            if(new.nil?)
145 145
                                              results[index].freeze_ifn
146 146
                                            else
147
                                              results[index] = new.freeze_ifn end }))
147
                                              results[index] = new.freeze_ifn
148
                                            end
149
                                          }), expand: false)
148 150
      when nil
149 151
        ;
150 152
      else
151
        widget.closeup(Mtk.__send__((scheme[:widget] or :input), lambda{ |new|
153
        widget.pack_start(widget, Mtk.__send__((scheme[:widget] or :input), lambda{ |new|
152 154
                                   if(new.nil?)
153 155
                                     results[index].freeze_ifn
154 156
                                   else
155
                                     results[index] = new.freeze_ifn end },
156
                                 scheme[:label], *(scheme[:args].to_a or []))) end }
157
                                     results[index] = new.freeze_ifn
158
                                   end
159
                                 },
160
                                 scheme[:label], *(scheme[:args].to_a or [])), expand: false)
161
      end
162
    }
157 163
    { :widget => widget,
158 164
      :result => lambda{
159
        results } } end
165
        results
166
      }
167
    }
168
  end
160 169

  
161 170
end
core/mui/gtk_form_dsl.rb
651 651
    container.pack_start(Gtk::Label.new(title), expand: false, fill: true, padding: 0)
652 652
    container.pack_start(Gtk::Alignment.new(1.0, 0.5, 0, 0).add(keyconfig), expand: true, fill: true, padding: 0)
653 653
    keyconfig.change_hook = ->(modify) { self[config] = modify }
654
    closeup(container)
654
    pack_start(container, expand: false)
655 655
    container
656 656
  end
657 657

  
core/mui/gtk_mtk.rb
162 162
    keyconfig = Gtk::KeyConfig.new(title, proc.call(nil))
163 163
    container = Gtk::Box.new(:horizontal, 0)
164 164
    container.pack_start(Gtk::Label.new(title), expand: false, fill: true, padding: 0)
165
    container.closeup(keyconfig.right)
165
    container.pack_start(keyconfig.right, expand: false)
166 166
    keyconfig.change_hook = proc
167 167
    return container
168 168
  end
......
216 216
    button end
217 217

  
218 218
  def fontselect(key, label)
219
    Gtk::Box.new(:horizontal, 0).add(Gtk::Label.new(label).left).closeup(_fontselect(key, label))
219
    Gtk::Box.new(:horizontal, 0).add(Gtk::Label.new(label).left).pack_start(_fontselect(key, label), expand: false)
220 220
  end
221 221
  deprecate :fontselect, :none, 2020, 8
222 222

  
223 223
  def colorselect(key, label)
224
    Gtk::Box.new(:horizontal, 0).add(Gtk::Label.new(label).left).closeup(_colorselect(key, label))
224
    Gtk::Box.new(:horizontal, 0).add(Gtk::Label.new(label).left).pack_start(_colorselect(key, label), expand: false)
225 225
  end
226 226
  deprecate :colorselect, :none, 2020, 8
227 227

  
228 228
  def fontcolorselect(font, color, label)
229
    self.fontselect(font, label).closeup(_colorselect(color, label))
229
    self.fontselect(font, label).pack_start(_colorselect(color, label), expand: false)
230 230
  end
231 231
  deprecate :fontcolorselect, :none, 2020, 8
232 232

  
(2-2/4)