Skip to content

Commit

Permalink
widget tweaking for styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ouwou committed Feb 19, 2024
1 parent 0f5c452 commit 473ff6f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/channellist/classic/guildlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ GuildList::GuildList()
, m_menu_guild_settings("View _Settings", true)
, m_menu_guild_leave("_Leave", true)
, m_menu_guild_mark_as_read("Mark as _Read", true) {
get_style_context()->add_class("guild-list");
get_style_context()->add_class("classic-guild-list");
set_selection_mode(Gtk::SELECTION_NONE);
show_all_children();

Expand Down
2 changes: 1 addition & 1 deletion src/components/channellist/classic/guildlistfolderitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void GuildListFolderButton::SetGuilds(const std::vector<Snowflake> &guild_ids) {
}

GuildListFolderItem::GuildListFolderItem(const UserSettingsGuildFoldersEntry &folder) {
get_style_context()->add_class("classic-guild-folder");
get_style_context()->add_class("classic-guild-list-folder");

if (folder.Name.has_value()) {
set_tooltip_text(*folder.Name);
Expand Down
6 changes: 5 additions & 1 deletion src/components/channellist/classic/guildlistguilditem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

GuildListGuildItem::GuildListGuildItem(const GuildData &guild)
: ID(guild.ID) {
get_style_context()->add_class("classic-guild-list-guild");

m_image.property_pixbuf() = Abaddon::Get().GetImageManager().GetPlaceholder(48);
add(m_image);

add(m_box);
m_box.pack_start(m_image);
show_all_children();

set_tooltip_text(guild.Name);
Expand Down
1 change: 1 addition & 0 deletions src/components/channellist/classic/guildlistguilditem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ class GuildListGuildItem : public Gtk::EventBox {
void UpdateIcon();
void OnIconFetched(const Glib::RefPtr<Gdk::Pixbuf> &pb);

Gtk::Box m_box;
Gtk::Image m_image;
};

0 comments on commit 473ff6f

Please sign in to comment.