Fix some bugs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -46,6 +46,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog)
|
|||||||
|
|
||||||
#include "wx/msgdlg.h"
|
#include "wx/msgdlg.h"
|
||||||
|
|
||||||
|
//color isn't working in carbon impl
|
||||||
|
#define ISCOLORWORKING 0
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -65,7 +68,9 @@ pascal OSStatus wxFontDialogEventHandler( EventHandlerCallRef inHandlerCallRef,
|
|||||||
FMFontFamily fontfamily;
|
FMFontFamily fontfamily;
|
||||||
FMFontStyle fontstyle;
|
FMFontStyle fontstyle;
|
||||||
FMFontSize fontsize;
|
FMFontSize fontsize;
|
||||||
|
#if ISCOLORWORKING
|
||||||
RGBColor fontcolor;
|
RGBColor fontcolor;
|
||||||
|
#endif
|
||||||
|
|
||||||
status = GetEventParameter (event, kEventParamFMFontFamily,
|
status = GetEventParameter (event, kEventParamFMFontFamily,
|
||||||
typeFMFontFamily, NULL,
|
typeFMFontFamily, NULL,
|
||||||
@@ -86,19 +91,23 @@ pascal OSStatus wxFontDialogEventHandler( EventHandlerCallRef inHandlerCallRef,
|
|||||||
|
|
||||||
check_noerr (status);
|
check_noerr (status);
|
||||||
|
|
||||||
|
#if ISCOLORWORKING
|
||||||
status = GetEventParameter (event, kEventParamFontColor,
|
status = GetEventParameter (event, kEventParamFontColor,
|
||||||
typeRGBColor, NULL,
|
typeRGBColor, NULL,
|
||||||
sizeof( RGBColor ), NULL, &fontcolor);
|
sizeof( RGBColor ), NULL, &fontcolor);
|
||||||
check_noerr (status);
|
check_noerr (status);
|
||||||
|
#endif
|
||||||
|
|
||||||
//now do the conversion to the wx font data
|
//now do the conversion to the wx font data
|
||||||
wxFontData theFontData;
|
wxFontData theFontData;
|
||||||
wxFont theFont;
|
wxFont theFont;
|
||||||
|
|
||||||
|
#if ISCOLORWORKING
|
||||||
//set color
|
//set color
|
||||||
wxColour theColor;
|
wxColour theColor;
|
||||||
theColor.Set(&(WXCOLORREF&)fontcolor);
|
theColor.Set(&(WXCOLORREF&)fontcolor);
|
||||||
theFontData.SetColour(theColor);
|
theFontData.SetColour(theColor);
|
||||||
|
#endif
|
||||||
|
|
||||||
//set size
|
//set size
|
||||||
theFont.SetPointSize(fontsize);
|
theFont.SetPointSize(fontsize);
|
||||||
@@ -234,7 +243,7 @@ int wxFontDialog::ShowModal()
|
|||||||
while(FPIsFontPanelVisible())
|
while(FPIsFontPanelVisible())
|
||||||
{
|
{
|
||||||
//yeild so we can get events
|
//yeild so we can get events
|
||||||
::wxSafeYield(m_dialogParent, false);
|
wxTheApp->Yield(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user