widget tweaking for styling

This commit is contained in:
ouwou
2024-02-19 02:24:57 -05:00
parent 0f5c4524c0
commit 473ff6f777
4 changed files with 8 additions and 3 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -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);

View File

@@ -14,5 +14,6 @@ private:
void UpdateIcon();
void OnIconFetched(const Glib::RefPtr<Gdk::Pixbuf> &pb);
Gtk::Box m_box;
Gtk::Image m_image;
};