use simpler color ctor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -252,9 +252,6 @@ wxVisualAttributes wxControl::GetDefaultAttributes() const
|
|||||||
UseGTKStyleBase());
|
UseGTKStyleBase());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define SHIFT (8*(sizeof(short int)-sizeof(char)))
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
|
wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
|
||||||
@@ -277,17 +274,11 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
|
|||||||
state = GTK_STATE_NORMAL;
|
state = GTK_STATE_NORMAL;
|
||||||
|
|
||||||
// get the style's colours
|
// get the style's colours
|
||||||
attr.colFg = wxColour(style->fg[state].red >> SHIFT,
|
attr.colFg = wxColour(style->fg[state]);
|
||||||
style->fg[state].green >> SHIFT,
|
|
||||||
style->fg[state].blue >> SHIFT);
|
|
||||||
if (useBase)
|
if (useBase)
|
||||||
attr.colBg = wxColour(style->base[state].red >> SHIFT,
|
attr.colBg = wxColour(style->base[state]);
|
||||||
style->base[state].green >> SHIFT,
|
|
||||||
style->base[state].blue >> SHIFT);
|
|
||||||
else
|
else
|
||||||
attr.colBg = wxColour(style->bg[state].red >> SHIFT,
|
attr.colBg = wxColour(style->bg[state]);
|
||||||
style->bg[state].green >> SHIFT,
|
|
||||||
style->bg[state].blue >> SHIFT);
|
|
||||||
|
|
||||||
// get the style's font
|
// get the style's font
|
||||||
if ( !style->font_desc )
|
if ( !style->font_desc )
|
||||||
|
Reference in New Issue
Block a user