Re: Titles in Gtk::Dialogs



When I run your program on my Ubuntu 13.10 system, the look of the dialog box is very different from the one in the attachment to https://mail.gnome.org/archives/gtkmm-list/2014-April/msg00003.html. The title is written only once, in the titlebar. In my case there's another irritating difference from previous versions of gtk+/gtkmm: There's no close button (small button with a cross) in the titlebar.

I found the gtk+ bug report https://bugzilla.gnome.org/show_bug.cgi?id=727414, also complaining about double titles in dialog boxes.

Kjell

2014-04-03 10:03, Glus Xof skrev:
Hi guys,

Substitute my last code for this new one,

---
#include <gtkmm.h>

class DialogTest
:    public Gtk::Dialog
{
public:
    DialogTest();
    virtual ~DialogTest();

private:
    Gtk::Box vbox;
    Gtk::Label label;
};

DialogTest::DialogTest()
:    vbox (Gtk::ORIENTATION_VERTICAL, 5),
    label ("Label")
{
    set_title ("Dialog Title");
    set_deletable (false);

    set_border_width (5);

    vbox.pack_start (label, true, true);

    get_content_area()->pack_start (vbox);

    add_button ("Close", Gtk::RESPONSE_CLOSE);

    show_all();

    run();

    hide();
}

DialogTest::~DialogTest()
{
}

int main (int argc, char *argv[])
{
    Glib::RefPtr<Gtk::Application>
DialogTestApp = Gtk::Application::create (argc, argv, "dialogtest.app");

    DialogTest dialogtest;

    return 0;
}
---

Glus




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]