Closed d47081 closed 23 hours ago
what do you mean gio/native
Hello. Mb bro means class Gtk.IconTheme.
Gtk.Image have all necessary icon functions except of one - checking if some icon name does exist in icon theme\current icon theme. It's function called gtk_icon_theme_has_icon.
ah ok, i got
As i see, it can be coded, yes! I'll do this week
Started the class with useful methods https://github.com/scorninpc/php-gtk3/commit/d91cf4e6c95d05bbc787ed7cd730a748bda2a24b
I done a simple example
<?php
Gtk::init();
$win = new GtkWindow();
$win->set_default_size(300, 200);
$win->connect("destroy", function() { Gtk::main_quit(); });
$button = \GtkButton::new_with_label("OK");
$win->add($button);
$button->connect("clicked", function($button) use ($win) {
// $screen = GdkScreen::get_default();
// $theme = GtkIconTheme::get_for_screen($screen);
$theme = GtkIconTheme::get_default();
var_dump($theme->list_icons());
$exists = $theme->has_icon("notes");
var_dump($exists);
$no_exists = $theme->has_icon("new");
var_dump($no_exists);
});
$win->show_all();
Gtk::main();
``
Any features about gio / native icons not implemented yet?