summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-03 18:12:47 +0000
committerDavid Robillard <d@drobilla.net>2007-10-03 18:12:47 +0000
commitc800f22fd0692b9c4ae62ae6c3fae7f8c3cb3070 (patch)
tree7a8602ec462aba0af0e5156a42a36e46faaf2ae4 /src
parentd1129d185f7b930a5c84e1a1a6aa69d6b0180d11 (diff)
downloadingen-c800f22fd0692b9c4ae62ae6c3fae7f8c3cb3070.tar.gz
ingen-c800f22fd0692b9c4ae62ae6c3fae7f8c3cb3070.tar.bz2
ingen-c800f22fd0692b9c4ae62ae6c3fae7f8c3cb3070.zip
Apply/tweak patch from larsl to apply matching style to embedded GUIs.
git-svn-id: http://svn.drobilla.net/lad/ingen@808 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/libs/gui/App.cpp21
-rw-r--r--src/libs/gui/NodeModule.cpp7
2 files changed, 27 insertions, 1 deletions
diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp
index dc3db30d..8c7c365c 100644
--- a/src/libs/gui/App.cpp
+++ b/src/libs/gui/App.cpp
@@ -110,10 +110,11 @@ App::run(int argc, char** argv,
if (!_instance)
_instance = new App(world);
- /* Load settings */
+ // Load configuration settings
_instance->configuration()->load_settings();
_instance->configuration()->apply_settings();
+ // Set default window icon
const Glib::ustring icon_path = PKGDATADIR "/ingen.svg";
try {
if (Glib::file_test(icon_path, Glib::FILE_TEST_EXISTS))
@@ -122,6 +123,24 @@ App::run(int argc, char** argv,
cerr << "Unable to load window icon " << icon_path << ": " << err.what() << endl;
}
+ // Set style for embedded node GUIs
+ const string rc_style =
+ "style \"ingen_embedded_node_gui_style\" {"
+ " bg[NORMAL] = \"#212222\""
+ " bg[ACTIVE] = \"#505050\""
+ " bg[PRELIGHT] = \"#525454\""
+ " bg[SELECTED] = \"#99A0A0\""
+ " bg[INSENSITIVE] = \"#F03030\""
+ " fg[NORMAL] = \"#FFFFFF\""
+ " fg[ACTIVE] = \"#FFFFFF\""
+ " fg[PRELIGHT] = \"#FFFFFF\""
+ " fg[SELECTED] = \"#FFFFFF\""
+ " fg[INSENSITIVE] = \"#FFFFFF\""
+ "}\n"
+ "widget \"*ingen_embedded_node_gui_container*\" style \"ingen_embedded_node_gui_style\"\n";
+
+ Gtk::RC::parse_string(rc_style);
+
App::instance().connect_window()->start(engine, interface);
main.run();
diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp
index 7e183377..e6c09e0c 100644
--- a/src/libs/gui/NodeModule.cpp
+++ b/src/libs/gui/NodeModule.cpp
@@ -135,6 +135,8 @@ NodeModule::embed_gui(bool embed)
//container = new Gtk::Alignment(); // transparent bg but uber slow
container = new Gtk::EventBox();
+ container->set_name("ingen_embedded_node_gui_container");
+ container->set_border_width(2);
container->add(*_gui);
container->show_all();
/*Gdk::Color color;
@@ -190,6 +192,11 @@ NodeModule::embed_gui(bool embed)
if ((*p)->is_control() && (*p)->is_output())
App::instance().engine()->disable_port_broadcasting((*p)->path());
}
+
+ if (embed && _gui_item)
+ set_base_color(0x212222FF);
+ else
+ set_default_base_color();
resize();
}