FIX: [STUDIO-1486] set drawsBackground false for NSTextField

Change-Id: I46d6a2812d27e30cf56c037e33bb97d3d063a5b5
This commit is contained in:
chunmao.guo 2022-11-30 17:55:30 +08:00 committed by Lane.Wei
parent b60cabef28
commit 11ea1e36ea
2 changed files with 21 additions and 3 deletions

View file

@ -1163,7 +1163,6 @@ void Sidebar::msw_rescale()
void Sidebar::sys_color_changed()
{
#ifdef _WIN32
wxWindowUpdateLocker noUpdates(this);
#if 0
@ -1192,7 +1191,6 @@ void Sidebar::sys_color_changed()
p->frequently_changed_parameters->sys_color_changed();
#endif
p->object_settings->sys_color_changed();
#endif
//BBS: remove print related combos
#if 0

View file

@ -104,7 +104,7 @@ void openFolderForFile(wxString const & file)
@end
/* textColor for NSTextField */
@implementation NSTextField (NSTextField_Extended)
@implementation NSTextField (textColor)
- (void)setTextColor2:(NSColor *)textColor
{
@ -129,6 +129,26 @@ void openFolderForFile(wxString const & file)
@end
/* drawsBackground for NSTextField */
@implementation NSTextField (drawsBackground)
- (instancetype)initWithFrame2:(NSRect)frameRect
{
[self initWithFrame2:frameRect];
self.drawsBackground = false;
return self;
}
+ (void) load
{
Method initWithFrame = class_getInstanceMethod([NSTextField class], @selector(initWithFrame:));
Method initWithFrame2 = class_getInstanceMethod([NSTextField class], @selector(initWithFrame2:));
method_exchangeImplementations(initWithFrame, initWithFrame2);
}
@end
/* textColor for NSButton */
@implementation NSButton (NSButton_Extended)