forwarding style changes to documentViews, see #14578
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
572f4ad212
commit
49746f2306
@ -2372,14 +2372,33 @@ void wxWidgetCocoaImpl::SetControlSize( wxWindowVariant variant )
|
|||||||
if ([cell respondsToSelector:@selector(setControlSize:)])
|
if ([cell respondsToSelector:@selector(setControlSize:)])
|
||||||
[cell setControlSize:size];
|
[cell setControlSize:size];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we need to propagate this to inner views as well
|
||||||
|
if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
|
||||||
|
{
|
||||||
|
NSView* targetView = [(NSScrollView*) m_osxView documentView];
|
||||||
|
|
||||||
|
if ( [targetView respondsToSelector:@selector(setControlSize:)] )
|
||||||
|
[targetView setControlSize:size];
|
||||||
|
else if ([targetView respondsToSelector:@selector(cell)])
|
||||||
|
{
|
||||||
|
id cell = [(id)targetView cell];
|
||||||
|
if ([cell respondsToSelector:@selector(setControlSize:)])
|
||||||
|
[cell setControlSize:size];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWidgetCocoaImpl::SetFont(wxFont const& font, wxColour const&col, long, bool)
|
void wxWidgetCocoaImpl::SetFont(wxFont const& font, wxColour const&col, long, bool)
|
||||||
{
|
{
|
||||||
if ([m_osxView respondsToSelector:@selector(setFont:)])
|
NSView* targetView = m_osxView;
|
||||||
[m_osxView setFont: font.OSXGetNSFont()];
|
if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
|
||||||
if ([m_osxView respondsToSelector:@selector(setTextColor:)])
|
targetView = [(NSScrollView*) m_osxView documentView];
|
||||||
[m_osxView setTextColor:[NSColor colorWithCalibratedRed:(CGFloat) (col.Red() / 255.0)
|
|
||||||
|
if ([targetView respondsToSelector:@selector(setFont:)])
|
||||||
|
[targetView setFont: font.OSXGetNSFont()];
|
||||||
|
if ([targetView respondsToSelector:@selector(setTextColor:)])
|
||||||
|
[targetView setTextColor:[NSColor colorWithCalibratedRed:(CGFloat) (col.Red() / 255.0)
|
||||||
green:(CGFloat) (col.Green() / 255.0)
|
green:(CGFloat) (col.Green() / 255.0)
|
||||||
blue:(CGFloat) (col.Blue() / 255.0)
|
blue:(CGFloat) (col.Blue() / 255.0)
|
||||||
alpha:(CGFloat) (col.Alpha() / 255.0)]];
|
alpha:(CGFloat) (col.Alpha() / 255.0)]];
|
||||||
|
Loading…
Reference in New Issue
Block a user