fix for wxSYS_COLOUR_LISTBOX colour detection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: settings.cpp
|
// Name: gtk/settings.cpp
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
// Copyright: (c) 1998 Robert Roebling
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -106,9 +106,13 @@ static bool GetColourFromGTKWidget(GtkWidgetType type, GtkStateType state,
|
|||||||
bool ok;
|
bool ok;
|
||||||
if ( def )
|
if ( def )
|
||||||
{
|
{
|
||||||
red = def->bg[state].red;
|
// ok, it's a hack: we really should have different functions to
|
||||||
green = def->bg[state].green;
|
// access GtkStyle::bg and ::base but as we only use base for listbox
|
||||||
blue = def->bg[state].blue;
|
// for now, this code works too
|
||||||
|
GdkColor *col = type == GTK_BUTTON ? def->bg : def->base;
|
||||||
|
red = col[state].red;
|
||||||
|
green = col[state].green;
|
||||||
|
blue = col[state].blue;
|
||||||
|
|
||||||
ok = TRUE;
|
ok = TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: settings.cpp
|
// Name: gtk/settings.cpp
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
// Copyright: (c) 1998 Robert Roebling
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -106,9 +106,13 @@ static bool GetColourFromGTKWidget(GtkWidgetType type, GtkStateType state,
|
|||||||
bool ok;
|
bool ok;
|
||||||
if ( def )
|
if ( def )
|
||||||
{
|
{
|
||||||
red = def->bg[state].red;
|
// ok, it's a hack: we really should have different functions to
|
||||||
green = def->bg[state].green;
|
// access GtkStyle::bg and ::base but as we only use base for listbox
|
||||||
blue = def->bg[state].blue;
|
// for now, this code works too
|
||||||
|
GdkColor *col = type == GTK_BUTTON ? def->bg : def->base;
|
||||||
|
red = col[state].red;
|
||||||
|
green = col[state].green;
|
||||||
|
blue = col[state].blue;
|
||||||
|
|
||||||
ok = TRUE;
|
ok = TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user