環境対応 #1162 » pango-deprecated.diff
core/mui/cairo_miracle_painter.rb | ||
---|---|---|
layout = context.create_pango_layout
|
||
layout.width = pos.main_text.width * Pango::SCALE
|
||
layout.attributes = attr_list if attr_list
|
||
layout.wrap = Pango::WRAP_CHAR
|
||
layout.wrap = Pango::WrapMode::CHAR
|
||
color = Plugin.filtering(:message_font_color, message, nil).last
|
||
color = BLACK if not(color and color.is_a? Array and 3 == color.size)
|
||
font = Plugin.filtering(:message_font, message, nil).last
|
||
... | ... | |
font = Plugin.filtering(:message_header_right_font, message, nil).last
|
||
layout.font_description = Pango::FontDescription.new(font) if font
|
||
layout.text = text
|
||
layout.alignment = Pango::ALIGN_RIGHT
|
||
layout.alignment = Pango::Alignment::RIGHT
|
||
layout end
|
||
def timestamp_label
|
core/mui/cairo_sub_parts_message_base.rb | ||
---|---|---|
layout.attributes = attr_list if attr_list
|
||
layout.font_description = font if font
|
||
layout.text = text
|
||
layout.alignment = Pango::ALIGN_RIGHT
|
||
layout.alignment = Pango::Alignment::RIGHT
|
||
layout end end
|
||
def render_header(message, context, base_y)
|
||
... | ... | |
layout = context.create_pango_layout
|
||
layout.width = (width - icon_width - margin*3 - edge*2) * Pango::SCALE
|
||
layout.attributes = attr_list
|
||
layout.wrap = Pango::WRAP_CHAR
|
||
layout.wrap = Pango::WrapMode::CHAR
|
||
layout.font_description = default_font
|
||
layout.text = text
|
||
layout end
|
core/mui/cairo_sub_parts_voter.rb | ||
---|---|---|
def pl_count(context = dummy_context)
|
||
layout = context.create_pango_layout
|
||
layout.wrap = Pango::WRAP_CHAR
|
||
layout.wrap = Pango::WrapMode::CHAR
|
||
layout.font_description = Pango::FontDescription.new(UserConfig[:mumble_basic_font])
|
||
layout.text = "#{get_vote_count}"
|
||
layout
|
core/plugin/direct_message/dmlistview.rb | ||
---|---|---|
Delayer.new{
|
||
if not destroyed?
|
||
renderer.set_property "wrap-width", 10
|
||
renderer.set_property "wrap-mode", Pango::WRAP_CHAR end }
|
||
renderer.set_property "wrap-mode", Pango::WrapMode::CHAR end }
|
||
renderer } },
|
||
{:type => Integer},
|
||
{:type => Object},
|
core/plugin/display_requirements/display_requirements.rb | ||
---|---|---|
def render_user(context, user)
|
||
render_icon(context, user)
|
||
layout = context.create_pango_layout
|
||
layout.wrap = Pango::WRAP_CHAR
|
||
layout.wrap = Pango::WrapMode::CHAR
|
||
layout.font_description = Pango::FontDescription.new(UserConfig[:mumble_basic_font])
|
||
layout.text = "#{user[:name]}"
|
||
context.set_source_rgb(*(UserConfig[:mumble_basic_color] || [0,0,0]).map{ |c| c.to_f / 65536 })
|