Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Auto-comp list selection color
oBFusCATed:
They've told you that your patch is not correct, but don't know how to make it better.
Jens: Have you tried it? I have not, but also I'm not using Ubuntu.
Alpha:
Okay; this is the "correct" way of disabling the focus hack under wxGTK. (Unless, should the hack be removed completely for all systems?)
--- Code: ---Index: src/sdk/wxscintilla/src/PlatWX.cpp
===================================================================
--- src/sdk/wxscintilla/src/PlatWX.cpp (revision 8854)
+++ src/sdk/wxscintilla/src/PlatWX.cpp (working copy)
@@ -938,13 +938,21 @@
/* C::B end */
/* C::B begin */
+#ifdef __WXGTK__
+ lv = new wxSCIListBox(this, id, wxDefaultPosition, wxDefaultSize,
+#else
lv = new wxSCIListBox(parent, id, wxDefaultPosition, wxDefaultSize,
+#endif
wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_NO_HEADER | wxSIMPLE_BORDER);
/* C::B end */
lv->SetCursor(wxCursor(wxCURSOR_ARROW));
lv->InsertColumn(0, wxEmptyString);
lv->InsertColumn(1, wxEmptyString);
+/* C::B begin */
+ // this focus hack makes the selection unreadable for Ubuntu themes,
+ // so do not attempt under GTK
+#ifndef __WXGTK__
// NOTE: We need to fool the wxListView into thinking that it has the
// focus so it will use the normal selection colour and will look
// "right" to the user. But since the wxPopupWindow or its children
@@ -953,6 +961,8 @@
// then reparent it back to the popup.
lv->SetFocus();
lv->Reparent(this);
+#endif
+/* C::B end */
#ifdef __WXMSW__
lv->Show();
#endif
--- End code ---
Navigation
[0] Message Index
[*] Previous page
Go to full version