Various corrections to makefiles, RPMs etc.
Corrected overoptimised window style and colour code. More best visual changes. Minor typos in docs. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,7 +92,9 @@ bool wxMask::Create( const wxBitmap& bitmap,
|
||||
unsigned char green = colour.Green();
|
||||
unsigned char blue = colour.Blue();
|
||||
|
||||
GdkVisual *visual = gdk_visual_get_system();
|
||||
GdkVisual *visual = gdk_window_get_visual( wxRootWindow->window );
|
||||
wxASSERT( visual );
|
||||
|
||||
int bpp = visual->depth;
|
||||
if ((bpp == 16) && (visual->red_mask != 0xf800)) bpp = 15;
|
||||
if (bpp == 15)
|
||||
@@ -243,9 +245,12 @@ wxBitmap::wxBitmap( int width, int height, int depth )
|
||||
{
|
||||
wxCHECK_RET( (width > 0) && (height > 0), wxT("invalid bitmap size") )
|
||||
|
||||
if (depth == -1) depth = gdk_window_get_visual( wxRootWindow->window )->depth;
|
||||
GdkVisual *visual = gdk_window_get_visual( wxRootWindow->window );
|
||||
wxASSERT( visual );
|
||||
|
||||
wxCHECK_RET( (depth == gdk_window_get_visual( wxRootWindow->window )->depth) ||
|
||||
if (depth == -1) depth = visual->depth;
|
||||
|
||||
wxCHECK_RET( (depth == visual->depth) ||
|
||||
(depth == 1), wxT("invalid bitmap depth") )
|
||||
|
||||
m_refData = new wxBitmapRefData();
|
||||
@@ -260,7 +265,7 @@ wxBitmap::wxBitmap( int width, int height, int depth )
|
||||
else
|
||||
{
|
||||
M_BMPDATA->m_pixmap = gdk_pixmap_new( wxRootWindow->window, width, height, depth );
|
||||
M_BMPDATA->m_bpp = gdk_window_get_visual( wxRootWindow->window )->depth;
|
||||
M_BMPDATA->m_bpp = visual->depth;
|
||||
}
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
@@ -270,6 +275,9 @@ bool wxBitmap::CreateFromXpm( const char **bits )
|
||||
{
|
||||
wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid bitmap data") )
|
||||
|
||||
GdkVisual *visual = gdk_window_get_visual( wxRootWindow->window );
|
||||
wxASSERT( visual );
|
||||
|
||||
m_refData = new wxBitmapRefData();
|
||||
|
||||
GdkBitmap *mask = (GdkBitmap*) NULL;
|
||||
@@ -286,7 +294,8 @@ bool wxBitmap::CreateFromXpm( const char **bits )
|
||||
|
||||
gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
|
||||
|
||||
M_BMPDATA->m_bpp = gdk_window_get_visual( wxRootWindow->window )->depth; // ?
|
||||
M_BMPDATA->m_bpp = visual->depth; // ?
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
|
||||
return TRUE;
|
||||
@@ -443,6 +452,9 @@ bool wxBitmap::LoadFile( const wxString &name, int type )
|
||||
|
||||
if (!wxFileExists(name)) return FALSE;
|
||||
|
||||
GdkVisual *visual = gdk_window_get_visual( wxRootWindow->window );
|
||||
wxASSERT( visual );
|
||||
|
||||
if (type == wxBITMAP_TYPE_XPM)
|
||||
{
|
||||
m_refData = new wxBitmapRefData();
|
||||
@@ -458,7 +470,8 @@ bool wxBitmap::LoadFile( const wxString &name, int type )
|
||||
}
|
||||
|
||||
gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
|
||||
M_BMPDATA->m_bpp = gdk_window_get_visual( wxRootWindow->window )->depth;
|
||||
|
||||
M_BMPDATA->m_bpp = visual->depth;
|
||||
}
|
||||
else // try if wxImage can load it
|
||||
{
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# This file was automatically generated by tmake at 21:13, 2000/01/28
|
||||
# This file was automatically generated by tmake at 17:23, 2000/02/01
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
|
||||
ALL_SOURCES = \
|
||||
generic/busyinfo.cpp \
|
||||
@@ -192,14 +192,14 @@ ALL_SOURCES = \
|
||||
gtk/wave.cpp \
|
||||
gtk/win_gtk.c \
|
||||
gtk/window.cpp \
|
||||
gtk/dialup.cpp \
|
||||
gtk/dir.cpp \
|
||||
gtk/fontenum.cpp \
|
||||
gtk/fontutil.cpp \
|
||||
gtk/gsocket.c \
|
||||
gtk/mimetype.cpp \
|
||||
gtk/threadpsx.cpp \
|
||||
gtk/utilsunx.cpp \
|
||||
unix/dialup.cpp \
|
||||
unix/dir.cpp \
|
||||
unix/fontenum.cpp \
|
||||
unix/fontutil.cpp \
|
||||
unix/gsocket.c \
|
||||
unix/mimetype.cpp \
|
||||
unix/threadpsx.cpp \
|
||||
unix/utilsunx.cpp \
|
||||
html/helpctrl.cpp \
|
||||
html/helpdata.cpp \
|
||||
html/helpfrm.cpp \
|
||||
@@ -317,6 +317,8 @@ ALL_HEADERS = \
|
||||
intl.h \
|
||||
ioswrap.h \
|
||||
ipcbase.h \
|
||||
isql.h \
|
||||
isqlext.h \
|
||||
joystick.h \
|
||||
layout.h \
|
||||
laywin.h \
|
||||
@@ -637,6 +639,7 @@ COMMONOBJS = \
|
||||
zstream.o
|
||||
|
||||
COMMONDEPS = \
|
||||
parser.d \
|
||||
appcmn.d \
|
||||
choiccmn.d \
|
||||
clipcmn.d \
|
||||
@@ -995,6 +998,3 @@ HTMLDEPS = \
|
||||
m_tables.d \
|
||||
winpars.d
|
||||
|
||||
IODBCOBJS = \
|
||||
|
||||
IODBCDEPS = \
|
||||
|
@@ -2977,12 +2977,10 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
|
||||
// but it couldn't get applied as the
|
||||
// widget hasn't been realized yet.
|
||||
m_delayedBackgroundColour = TRUE;
|
||||
|
||||
// pretend we have done something
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ((m_wxwindow) &&
|
||||
(m_wxwindow->window) &&
|
||||
(m_backgroundColour != wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE)))
|
||||
{
|
||||
/* wxMSW doesn't clear the window here. I don't do that either to
|
||||
@@ -3020,9 +3018,6 @@ bool wxWindow::SetForegroundColour( const wxColour &colour )
|
||||
// but it couldn't get applied as the
|
||||
// widget hasn't been realized yet.
|
||||
m_delayedForegroundColour = TRUE;
|
||||
|
||||
// pretend we have done something
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
ApplyWidgetStyle();
|
||||
@@ -3032,15 +3027,24 @@ bool wxWindow::SetForegroundColour( const wxColour &colour )
|
||||
|
||||
GtkStyle *wxWindow::GetWidgetStyle()
|
||||
{
|
||||
if (m_widgetStyle) return m_widgetStyle;
|
||||
if (m_widgetStyle)
|
||||
{
|
||||
GtkStyle *remake = gtk_style_copy( m_widgetStyle );
|
||||
remake->klass = m_widgetStyle->klass;
|
||||
|
||||
gtk_style_unref( m_widgetStyle );
|
||||
m_widgetStyle = remake;
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkStyle *def = gtk_rc_get_style( m_widget );
|
||||
|
||||
GtkStyle *def = gtk_rc_get_style( m_widget );
|
||||
if (!def)
|
||||
def = gtk_widget_get_default_style();
|
||||
|
||||
if (!def)
|
||||
def = gtk_widget_get_default_style();
|
||||
|
||||
m_widgetStyle = gtk_style_copy( def );
|
||||
m_widgetStyle->klass = def->klass;
|
||||
m_widgetStyle = gtk_style_copy( def );
|
||||
m_widgetStyle->klass = def->klass;
|
||||
}
|
||||
|
||||
return m_widgetStyle;
|
||||
}
|
||||
|
Reference in New Issue
Block a user