diff options
author | Timothy Pearson <[email protected]> | 2012-11-30 13:14:41 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-11-30 13:14:41 -0600 |
commit | beb8adf263fc48b76da0eccba506daa657a16fe3 (patch) | |
tree | 1b3e041f71a7950f09ccb67a2d59a3447e22081a /tdegtk/tdegtk-theme.cpp | |
parent | 791f39d38c9adba16dbe88528b4ad19c217ffb8c (diff) | |
download | gtk3-tqt-engine-beb8adf263fc48b76da0eccba506daa657a16fe3.tar.gz gtk3-tqt-engine-beb8adf263fc48b76da0eccba506daa657a16fe3.zip |
Set GTK event passthrough on startup
Fix menu item text highlight color
Diffstat (limited to 'tdegtk/tdegtk-theme.cpp')
-rw-r--r-- | tdegtk/tdegtk-theme.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tdegtk/tdegtk-theme.cpp b/tdegtk/tdegtk-theme.cpp index d46fe07..422aa15 100644 --- a/tdegtk/tdegtk-theme.cpp +++ b/tdegtk/tdegtk-theme.cpp @@ -86,6 +86,7 @@ extern "C" { #include <tqregexp.h> #include <tqfont.h> #include <tqpopupmenu.h> +#include <tqeventloop.h> #include <kapplication.h> #include <kcmdlineargs.h> @@ -129,6 +130,14 @@ G_MODULE_EXPORT GtkThemingEngine* create_engine(void) { KApplication::disableAutoDcopRegistration(); new KApplication(gdk_x11_get_default_xdisplay(), true, 0, 0, true); + // Propagate glib events to GTK as needed + if (tqApp) { + TQEventLoop* loop = tqApp->eventLoop(); + if (loop) { + loop->setSingleToolkitEventHandling(false); + } + } + initTDESettings(); // initialize icon sizes @@ -481,6 +490,17 @@ void writeGtkThemeControlFile(int forceRecreate) { // setColour("text", "insensitive", tqApp->palette().disabled().text()); // setColour("base", "insensitive", tqApp->palette().disabled().background()); + // Menu items + { + TQStringList objectTypes; + objectTypes.append(TQPOPUPMENU_OBJECT_NAME_STRING); + TQPalette objectPalette = tqApp->palette(objectTypes); + setColour("color", "hover:insensitive", objectPalette.color(TQPalette::Disabled, TQColorGroup::Text), "GtkMenu>GtkMenuItem"); +// setColour("color", "hover:normal", objectPalette.color(TQPalette::Active, TQColorGroup::HighlightedText), "GtkMenu>GtkMenuItem"); + setColour("color", "hover:active", objectPalette.color(TQPalette::Active, TQColorGroup::HighlightedText), "GtkMenu>GtkMenuItem"); + setColour("color", "hover", objectPalette.color(TQPalette::Active, TQColorGroup::HighlightedText), "GtkMenu>GtkMenuItem *"); + } + TQString iconSettingsString; iconSettingsString.append(TQString("gtk-menu=%1,%2").arg(IconSize(KIcon::Small)).arg(IconSize(KIcon::Small))); iconSettingsString.append(TQString(":gtk-button=%1,%2").arg(IconSize(KIcon::Small)).arg(IconSize(KIcon::Small))); |