diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-07-19 03:07:27 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-07-19 03:07:27 -0400 |
commit | d20a822fdbd52c316e3b33a8dbf8c72e564a7986 (patch) | |
tree | 81f779da5f227fe70f3dc9dcc15b2e96fd1291dc /components | |
parent | 0250229e8184ea18b8799feb1cc3622d847adec3 (diff) | |
download | abaddon-portaudio-d20a822fdbd52c316e3b33a8dbf8c72e564a7986.tar.gz abaddon-portaudio-d20a822fdbd52c316e3b33a8dbf8c72e564a7986.zip |
tweak text channel rendering
Diffstat (limited to 'components')
-rw-r--r-- | components/channels.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/channels.cpp b/components/channels.cpp index 0208975..37e7625 100644 --- a/components/channels.cpp +++ b/components/channels.cpp @@ -220,7 +220,7 @@ void ChannelList::UpdateCreateChannel(Snowflake id) { } channel_row[m_columns.m_type] = RenderType::TextChannel; channel_row[m_columns.m_id] = channel->ID; - channel_row[m_columns.m_name] = Glib::Markup::escape_text(*channel->Name); + channel_row[m_columns.m_name] = "#" + Glib::Markup::escape_text(*channel->Name); if (orphan) channel_row[m_columns.m_sort] = *channel->Position + OrphanChannelSortOffset; else @@ -291,7 +291,7 @@ Gtk::TreeModel::iterator ChannelList::AddGuild(const GuildData &guild) { auto channel_row = *m_model->append(guild_row.children()); channel_row[m_columns.m_type] = RenderType::TextChannel; channel_row[m_columns.m_id] = channel.ID; - channel_row[m_columns.m_name] = Glib::Markup::escape_text(*channel.Name); + channel_row[m_columns.m_name] = "#" + Glib::Markup::escape_text(*channel.Name); channel_row[m_columns.m_sort] = *channel.Position + OrphanChannelSortOffset; } @@ -310,7 +310,7 @@ Gtk::TreeModel::iterator ChannelList::AddGuild(const GuildData &guild) { auto channel_row = *m_model->append(cat_row.children()); channel_row[m_columns.m_type] = RenderType::TextChannel; channel_row[m_columns.m_id] = channel.ID; - channel_row[m_columns.m_name] = Glib::Markup::escape_text(*channel.Name); + channel_row[m_columns.m_name] = "#" + Glib::Markup::escape_text(*channel.Name); channel_row[m_columns.m_sort] = *channel.Position; } } @@ -787,7 +787,7 @@ void CellRendererChannels::render_vfunc_channel(const Cairo::RefPtr<Cairo::Conte Gtk::Requisition minimum_size, natural_size; m_renderer_text.get_preferred_size(widget, minimum_size, natural_size); - const int text_x = background_area.get_x() + 5; + const int text_x = background_area.get_x() + 21; const int text_y = background_area.get_y() + background_area.get_height() / 2 - natural_size.height / 2; const int text_w = natural_size.width; const int text_h = natural_size.height; |