Exemple #1
0
    Launcher::Launcher(const App& app) :
        a(app),
        box(new Box(Gtk::ORIENTATION_HORIZONTAL))
    {
        Gdk::RGBA awkward_grey;
        awkward_grey.set_grey(0.5, 0.1);
        box->override_background_color(awkward_grey, Gtk::STATE_FLAG_NORMAL);

        Image* icon = Gtk::manage(icon_from_name(app.icon_name(), Gtk::ICON_SIZE_LARGE_TOOLBAR));

        icon->set_margin_end(20);
        Gtk::Label* name = Gtk::manage(new Label(app.name()));

        name->set_ellipsize(Pango::ELLIPSIZE_END);
        box->pack_start(*icon, false, false);
        box->pack_start(*name, false, false);
        box->show_all();
        box->set_tooltip_text(app.comment());
    }