Re: Some new to gtkmm questions



John Taber wrote:

1) themes - is there a way to specify themes at the start of the program? My dialogs look pretty plain or ugly right now and it would be nice to see something like plastik

Your program should be picking-up your theme from your environment, same as other GTK apps. You should focus on configuring your theme, i.e. with Desktop > Preferences > Theme if you're using Gnome, not sure what tools are available if you aren't.

Regardless, forcing a particular theme in your code will make you unpopular - users expect, rightly so, that all GTK applications have a common look-and-feel of their choosing.

2) splash screen - I have a splashscreen class that runs fine by itself but how do I specify it in "main.cpp" so that after it disappears, main runs the main layout dialog. my main now looks like:
int main(....)
Gtk::Main kit(...)
SplashDialog *splash = new SplashDialog();
splash->show();
delete splash;
MainDialog mainDlg;
Gtk::Main::run(mainDlg);
run(mainDlg)

You are deleting your splash as soon as it is created, it never becomes visible because there is no event loop running to make it visible. You probably want to call

	splash->run();

with this the splashscreen never appears - do I somehow need to set it modal ?

3) displaying images - what is the best method for displaying images? Obviously button has a method to display a pixbuf. But what if it isn't a button ? Do I need to use a drawarea and render the pixbuf ? Is there a simpler way like using a label widget?

Use the Gtk::Image widget to display pixbufs.

Cheers,
Tim



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