Use load_symbolic for gtk icon instead of load_icon.
This commit is contained in:
@ -15,11 +15,20 @@ bool DefaultGtkIconThemeWrapper::has_icon(const std::string& value) {
|
||||
return Gtk::IconTheme::get_default()->has_icon(value);
|
||||
}
|
||||
|
||||
Glib::RefPtr<Gdk::Pixbuf> DefaultGtkIconThemeWrapper::load_icon(const char* name, int tmp_size,
|
||||
Gtk::IconLookupFlags flags) {
|
||||
Glib::RefPtr<Gdk::Pixbuf> DefaultGtkIconThemeWrapper::load_icon(
|
||||
const char* name, int tmp_size, Gtk::IconLookupFlags flags,
|
||||
Glib::RefPtr<Gtk::StyleContext> style) {
|
||||
const std::lock_guard<std::mutex> lock(default_theme_mutex);
|
||||
|
||||
auto default_theme = Gtk::IconTheme::get_default();
|
||||
default_theme->rescan_if_needed();
|
||||
return default_theme->load_icon(name, tmp_size, flags);
|
||||
|
||||
auto icon_info = default_theme->lookup_icon(name, tmp_size, flags);
|
||||
|
||||
if (style.get() == nullptr) {
|
||||
return icon_info.load_icon();
|
||||
}
|
||||
|
||||
bool is_sym = false;
|
||||
return icon_info.load_symbolic(style, is_sym);
|
||||
}
|
||||
|
Reference in New Issue
Block a user