From beb8adf263fc48b76da0eccba506daa657a16fe3 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 30 Nov 2012 13:14:41 -0600 Subject: Set GTK event passthrough on startup Fix menu item text highlight color --- tdegtk/tdegtk-theme.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tdegtk/tdegtk-theme.cpp') 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 #include #include +#include #include #include @@ -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))); -- cgit v1.2.1