Use QPlatformTheme for the context to translate the color dialog buttons
QDialogButtonBox does not have translations, it queries QPlatformTheme for button texts. So in order to ensure that the buttons added to QColorDialog natively are translated it should be set to use QPlatformTheme instead. Change-Id: I67d0e509398aa81f9de9b8785544c1e23bb596d9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>bb10
parent
45eba73492
commit
6e928460bc
|
|
@ -52,7 +52,7 @@ static NSButton *macCreateButton(const char *text, NSView *superview)
|
|||
[button setButtonType:NSMomentaryLightButton];
|
||||
[button setBezelStyle:NSRoundedBezelStyle];
|
||||
[button setTitle:(NSString*)(CFStringRef)QCFString(
|
||||
qt_mac_removeMnemonics(QCoreApplication::translate("QDialogButtonBox", text)))];
|
||||
qt_mac_removeMnemonics(QCoreApplication::translate("QPlatformTheme", text)))];
|
||||
[[button cell] setFont:[NSFont systemFontOfSize:
|
||||
[NSFont systemFontSizeForControlSize:NSRegularControlSize]]];
|
||||
[superview addSubview:button];
|
||||
|
|
|
|||
Loading…
Reference in New Issue