Project

General

Profile

環境対応 #1162 » pango-deprecated.diff

Akira Ouchi, 2018-02-06 00:49

View differences:

core/mui/cairo_miracle_painter.rb
297 297
    layout = context.create_pango_layout
298 298
    layout.width = pos.main_text.width * Pango::SCALE
299 299
    layout.attributes = attr_list if attr_list
300
    layout.wrap = Pango::WRAP_CHAR
300
    layout.wrap = Pango::WrapMode::CHAR
301 301
    color = Plugin.filtering(:message_font_color, message, nil).last
302 302
    color = BLACK if not(color and color.is_a? Array and 3 == color.size)
303 303
    font = Plugin.filtering(:message_font, message, nil).last
......
337 337
    font = Plugin.filtering(:message_header_right_font, message, nil).last
338 338
    layout.font_description = Pango::FontDescription.new(font) if font
339 339
    layout.text = text
340
    layout.alignment = Pango::ALIGN_RIGHT
340
    layout.alignment = Pango::Alignment::RIGHT
341 341
    layout end
342 342

  
343 343
  def timestamp_label
core/mui/cairo_sub_parts_message_base.rb
280 280
      layout.attributes = attr_list if attr_list
281 281
      layout.font_description = font if font
282 282
      layout.text = text
283
      layout.alignment = Pango::ALIGN_RIGHT
283
      layout.alignment = Pango::Alignment::RIGHT
284 284
      layout end end
285 285

  
286 286
  def render_header(message, context, base_y)
......
321 321
    layout = context.create_pango_layout
322 322
    layout.width = (width - icon_width - margin*3 - edge*2) * Pango::SCALE
323 323
    layout.attributes = attr_list
324
    layout.wrap = Pango::WRAP_CHAR
324
    layout.wrap = Pango::WrapMode::CHAR
325 325
    layout.font_description = default_font
326 326
    layout.text = text
327 327
    layout end
core/mui/cairo_sub_parts_voter.rb
166 166

  
167 167
  def pl_count(context = dummy_context)
168 168
    layout = context.create_pango_layout
169
    layout.wrap = Pango::WRAP_CHAR
169
    layout.wrap = Pango::WrapMode::CHAR
170 170
    layout.font_description = Pango::FontDescription.new(UserConfig[:mumble_basic_font])
171 171
    layout.text = "#{get_vote_count}"
172 172
    layout
core/plugin/direct_message/dmlistview.rb
36 36
           Delayer.new{
37 37
             if not destroyed?
38 38
               renderer.set_property "wrap-width", 10
39
               renderer.set_property "wrap-mode", Pango::WRAP_CHAR end }
39
               renderer.set_property "wrap-mode", Pango::WrapMode::CHAR end }
40 40
           renderer } },
41 41
       {:type => Integer},
42 42
       {:type => Object},
core/plugin/display_requirements/display_requirements.rb
196 196
  def render_user(context, user)
197 197
    render_icon(context, user)
198 198
    layout = context.create_pango_layout
199
    layout.wrap = Pango::WRAP_CHAR
199
    layout.wrap = Pango::WrapMode::CHAR
200 200
    layout.font_description = Pango::FontDescription.new(UserConfig[:mumble_basic_font])
201 201
    layout.text = "#{user[:name]}"
202 202
    context.set_source_rgb(*(UserConfig[:mumble_basic_color] || [0,0,0]).map{ |c| c.to_f / 65536 })
    (1-1/1)