From cdf068a42c966e2e9d22aa72baca5a2b23863de6 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 10 Mar 2007 04:46:18 +0000 Subject: [PATCH] use simpler color ctor git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/control.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index f940e07bdb..7af2a52fc8 100644 --- a/src/gtk/control.cpp +++ b/src/gtk/control.cpp @@ -252,9 +252,6 @@ wxVisualAttributes wxControl::GetDefaultAttributes() const UseGTKStyleBase()); } - -#define SHIFT (8*(sizeof(short int)-sizeof(char))) - // static wxVisualAttributes wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget, @@ -277,17 +274,11 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget, state = GTK_STATE_NORMAL; // get the style's colours - attr.colFg = wxColour(style->fg[state].red >> SHIFT, - style->fg[state].green >> SHIFT, - style->fg[state].blue >> SHIFT); + attr.colFg = wxColour(style->fg[state]); if (useBase) - attr.colBg = wxColour(style->base[state].red >> SHIFT, - style->base[state].green >> SHIFT, - style->base[state].blue >> SHIFT); + attr.colBg = wxColour(style->base[state]); else - attr.colBg = wxColour(style->bg[state].red >> SHIFT, - style->bg[state].green >> SHIFT, - style->bg[state].blue >> SHIFT); + attr.colBg = wxColour(style->bg[state]); // get the style's font if ( !style->font_desc ) -- 2.45.2