Issue 2990: workaround for
style->get_background_color(Gtk::STATE_FLAG_SELECTED) which is not handled properly by Gtk3
This commit is contained in:
parent
9cac516219
commit
72acf67304
@ -39,40 +39,11 @@ void setExpandAlignProperties(Gtk::Widget *widget, bool hExpand, bool vExpand, e
|
|||||||
|
|
||||||
guint add_idle (GSourceFunc function, gpointer data);
|
guint add_idle (GSourceFunc function, gpointer data);
|
||||||
|
|
||||||
/**
|
// TODO: The documentation says gdk_threads_enter and gdk_threads_leave should be replaced
|
||||||
* @brief Lock GTK for critical section.
|
// by g_main_context_invoke(), g_idle_add() and related functions, but this will require more extensive changes.
|
||||||
*
|
// We silence those warnings until then so that we notice the others.
|
||||||
* Will unlock on destruction. To use:
|
#pragma GCC diagnostic push
|
||||||
*
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
* <code>
|
|
||||||
* {
|
|
||||||
* GThreadLock lock;
|
|
||||||
* // critical code
|
|
||||||
* }
|
|
||||||
* </code>
|
|
||||||
*
|
|
||||||
* This is a replacement for the former gdk_threads_enter / gdk_threads_leave pair that has been deprecated.
|
|
||||||
* It does the same, but there may be a speed penalty, hopefully negligible.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* This, doesn't work. But we have to find a replacement for gdk_threads_enter and gdk_threads_leave that are deprecated and will be removed.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
class GThreadLock
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Glib::Threads::Mutex operation;
|
|
||||||
Glib::Threads::Cond operationCond;
|
|
||||||
Glib::Threads::Mutex GUI;
|
|
||||||
Glib::Threads::Cond GUICond;
|
|
||||||
bool sameThread;
|
|
||||||
|
|
||||||
GThreadLock();
|
|
||||||
~GThreadLock();
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Lock GTK for critical section.
|
* @brief Lock GTK for critical section.
|
||||||
@ -117,6 +88,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Glue box to control visibility of the MyExpender's content ; also handle the frame around it
|
* @brief Glue box to control visibility of the MyExpender's content ; also handle the frame around it
|
||||||
@ -496,6 +468,7 @@ private:
|
|||||||
int refCount;
|
int refCount;
|
||||||
public:
|
public:
|
||||||
RefCount() : refCount(1) {}
|
RefCount() : refCount(1) {}
|
||||||
|
virtual ~RefCount() {}
|
||||||
|
|
||||||
void reference()
|
void reference()
|
||||||
{
|
{
|
||||||
|
@ -92,7 +92,9 @@ void ThumbBrowserEntryBase::updateBackBuffer ()
|
|||||||
Gdk::RGBA textn = style->get_color(Gtk::STATE_FLAG_NORMAL);
|
Gdk::RGBA textn = style->get_color(Gtk::STATE_FLAG_NORMAL);
|
||||||
Gdk::RGBA texts = style->get_color(Gtk::STATE_FLAG_SELECTED);
|
Gdk::RGBA texts = style->get_color(Gtk::STATE_FLAG_SELECTED);
|
||||||
Gdk::RGBA bgn = style->get_background_color(Gtk::STATE_FLAG_NORMAL);
|
Gdk::RGBA bgn = style->get_background_color(Gtk::STATE_FLAG_NORMAL);
|
||||||
Gdk::RGBA bgs = style->get_background_color(Gtk::STATE_FLAG_SELECTED);
|
//Gdk::RGBA bgs = style->get_background_color(Gtk::STATE_FLAG_SELECTED);
|
||||||
|
Gdk::RGBA bgs;
|
||||||
|
bgs.set_rgba(0.3372549, 0.3372549, 0.3372549);
|
||||||
|
|
||||||
// clear area, draw frames and background
|
// clear area, draw frames and background
|
||||||
style->render_background(cc, 0., 0., exp_width, exp_height);
|
style->render_background(cc, 0., 0., exp_width, exp_height);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user