Opened 2 months ago

Closed 2 months ago

#16255 closed defect (fixed)

wxSystemSettings::GetColour() returns transparent black

Reported by: pmjobin Owned by: pcor
Priority: normal Milestone:
Component: wxGTK Version: 3.0.0
Keywords: Cc:
Blocked By: Blocking:
Patch: no

Description

wxSystemSettings::GetColour() returns transparent black for some system colours. Tested using wxGTK3 available in stock Fedora 20 repo.

Test program:

#define DISPLAY_COLOUR(c)\
{\
	wxColour colour(wxSystemSettings::GetColour(c));\
	printf("%s = (%d, %d, %d, %d)\n", #c, colour.Red(), colour.Green(), colour.Blue(), colour.Alpha());\
}

void displayColour()
{
	DISPLAY_COLOUR(wxSYS_COLOUR_SCROLLBAR);
	DISPLAY_COLOUR(wxSYS_COLOUR_DESKTOP);
	DISPLAY_COLOUR(wxSYS_COLOUR_ACTIVECAPTION);
	DISPLAY_COLOUR(wxSYS_COLOUR_INACTIVECAPTION);
	DISPLAY_COLOUR(wxSYS_COLOUR_MENU);
	DISPLAY_COLOUR(wxSYS_COLOUR_WINDOW);
	DISPLAY_COLOUR(wxSYS_COLOUR_WINDOWFRAME);
	DISPLAY_COLOUR(wxSYS_COLOUR_MENUTEXT);
	DISPLAY_COLOUR(wxSYS_COLOUR_WINDOWTEXT);
	DISPLAY_COLOUR(wxSYS_COLOUR_CAPTIONTEXT);
	DISPLAY_COLOUR(wxSYS_COLOUR_ACTIVEBORDER);
	DISPLAY_COLOUR(wxSYS_COLOUR_INACTIVEBORDER);
	DISPLAY_COLOUR(wxSYS_COLOUR_APPWORKSPACE);
	DISPLAY_COLOUR(wxSYS_COLOUR_HIGHLIGHT);
	DISPLAY_COLOUR(wxSYS_COLOUR_HIGHLIGHTTEXT);
	DISPLAY_COLOUR(wxSYS_COLOUR_BTNFACE);
	DISPLAY_COLOUR(wxSYS_COLOUR_BTNSHADOW);
	DISPLAY_COLOUR(wxSYS_COLOUR_GRAYTEXT);
	DISPLAY_COLOUR(wxSYS_COLOUR_BTNTEXT);
	DISPLAY_COLOUR(wxSYS_COLOUR_INACTIVECAPTIONTEXT);
	DISPLAY_COLOUR(wxSYS_COLOUR_BTNHIGHLIGHT);
	DISPLAY_COLOUR(wxSYS_COLOUR_3DDKSHADOW);
	DISPLAY_COLOUR(wxSYS_COLOUR_3DLIGHT);
	DISPLAY_COLOUR(wxSYS_COLOUR_INFOTEXT);
	DISPLAY_COLOUR(wxSYS_COLOUR_INFOBK);
	DISPLAY_COLOUR(wxSYS_COLOUR_LISTBOX);
	DISPLAY_COLOUR(wxSYS_COLOUR_HOTLIGHT);
	DISPLAY_COLOUR(wxSYS_COLOUR_GRADIENTACTIVECAPTION);
	DISPLAY_COLOUR(wxSYS_COLOUR_GRADIENTINACTIVECAPTION);
	DISPLAY_COLOUR(wxSYS_COLOUR_MENUHILIGHT);
	DISPLAY_COLOUR(wxSYS_COLOUR_MENUBAR);
	DISPLAY_COLOUR(wxSYS_COLOUR_LISTBOXTEXT);
	DISPLAY_COLOUR(wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT);
}

Output:

wxSYS_COLOUR_SCROLLBAR = (0, 0, 0, 0)
wxSYS_COLOUR_DESKTOP = (0, 0, 0, 0)
wxSYS_COLOUR_ACTIVECAPTION = (74, 144, 217, 255)
wxSYS_COLOUR_INACTIVECAPTION = (0, 0, 0, 0)
wxSYS_COLOUR_MENU = (0, 0, 0, 0)
wxSYS_COLOUR_WINDOW = (0, 0, 0, 0)
wxSYS_COLOUR_WINDOWFRAME = (0, 0, 0, 0)
wxSYS_COLOUR_MENUTEXT = (46, 52, 54, 255)
wxSYS_COLOUR_WINDOWTEXT = (46, 52, 54, 255)
wxSYS_COLOUR_CAPTIONTEXT = (255, 255, 255, 255)
wxSYS_COLOUR_ACTIVEBORDER = (0, 0, 0, 0)
wxSYS_COLOUR_INACTIVEBORDER = (0, 0, 0, 0)
wxSYS_COLOUR_APPWORKSPACE = (0, 0, 0, 0)
wxSYS_COLOUR_HIGHLIGHT = (74, 144, 217, 255)
wxSYS_COLOUR_HIGHLIGHTTEXT = (255, 255, 255, 255)
wxSYS_COLOUR_BTNFACE = (0, 0, 0, 0)
wxSYS_COLOUR_BTNSHADOW = (0, 0, 0, 0)
wxSYS_COLOUR_GRAYTEXT = (167, 171, 167, 255)
wxSYS_COLOUR_BTNTEXT = (46, 52, 54, 255)
wxSYS_COLOUR_INACTIVECAPTIONTEXT = (167, 171, 167, 255)
wxSYS_COLOUR_BTNHIGHLIGHT = (74, 144, 217, 255)
wxSYS_COLOUR_3DDKSHADOW = (0, 0, 0, 255)
wxSYS_COLOUR_3DLIGHT = (0, 0, 0, 0)
wxSYS_COLOUR_INFOTEXT = (46, 52, 54, 255)
wxSYS_COLOUR_INFOBK = (237, 237, 237, 255)
wxSYS_COLOUR_LISTBOX = (255, 255, 255, 255)
wxSYS_COLOUR_HOTLIGHT = (46, 52, 54, 255)
wxSYS_COLOUR_GRADIENTACTIVECAPTION = (0, 0, 0, 255)
wxSYS_COLOUR_GRADIENTINACTIVECAPTION = (0, 0, 0, 255)
wxSYS_COLOUR_MENUHILIGHT = (74, 144, 217, 255)
wxSYS_COLOUR_MENUBAR = (0, 0, 0, 0)
wxSYS_COLOUR_LISTBOXTEXT = (46, 52, 54, 255)
wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT = (255, 255, 255, 255)

Change History (2)

comment:1 Changed 2 months ago by pcor

  • Owner set to pcor
  • Status changed from new to accepted

comment:2 Changed 2 months ago by PC

  • Resolution set to fixed
  • Status changed from accepted to closed

In 76564:

Fix wxSystemSettings::GetColour() returning transparent colors with GTK3, closes #16255

Note: See TracTickets for help on using tickets.