disabled user customization in MacOSX toolbars

This commit is contained in:
Luis Ángel San Martín 2014-11-07 23:02:29 +01:00
parent 83d0f2f7c2
commit f1626034ed

View File

@ -158,8 +158,8 @@ YACReaderMacOSXToolbar::YACReaderMacOSXToolbar(QObject *parent)
{ {
//setup native toolbar //setup native toolbar
nativeToolBar= nativeToolbar(); nativeToolBar= nativeToolbar();
[nativeToolBar setSizeMode:NSToolbarSizeModeSmall];
[nativeToolBar setDisplayMode:NSToolbarDisplayModeIconOnly]; [nativeToolBar setDisplayMode:NSToolbarDisplayModeIconOnly];
[nativeToolBar setAllowsUserCustomization:NO];
delegate = [[MyToolbarDelegate alloc] init]; delegate = [[MyToolbarDelegate alloc] init];
((MyToolbarDelegate *)delegate)->mytoolbar = this; ((MyToolbarDelegate *)delegate)->mytoolbar = this;
@ -171,10 +171,16 @@ YACReaderMacOSXToolbar::YACReaderMacOSXToolbar(QObject *parent)
{ {
yosemite = true; yosemite = true;
[nswindow setTitleVisibility:1]; [nswindow setTitleVisibility:1];
[nativeToolBar setSizeMode:NSToolbarSizeModeSmall]; //TODO figure out how to load specific images in Yosemite
}else }else
{
[nativeToolBar setSizeMode:NSToolbarSizeModeSmall];
yosemite = false; yosemite = false;
}
#else #else
yosemite = false; yosemite = false;
[nativeToolBar setAutosavesConfiguration:YES]; //TODO this doesn't work
[nativeToolBar setSizeMode:NSToolbarSizeModeSmall];
#endif #endif
} }