зеркало из https://github.com/mozilla/pjs.git
fix problem where showing customize toolbar with small icons would cause
image to grow (bug 247426)
This commit is contained in:
Родитель
131d37091e
Коммит
e1f9eefa87
|
@ -318,7 +318,6 @@ static NSArray* sToolbarDefaults = nil;
|
|||
[mToolbarItem setMaxSize:s];
|
||||
}
|
||||
[[self image] setSize:s];
|
||||
[[self cell] setControlSize:size];
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -977,7 +976,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
willBeInsertedIntoToolbar:(BOOL)willBeInserted
|
||||
{
|
||||
NSToolbarItem *toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier:itemIdent] autorelease];
|
||||
if ( [itemIdent isEqual:BackToolbarItemIdentifier] )
|
||||
if ( [itemIdent isEqual:BackToolbarItemIdentifier] && willBeInserted )
|
||||
{
|
||||
// create a new toolbar item that knows how to do validation
|
||||
toolbarItem = [[[ToolbarViewItem alloc] initWithItemIdentifier:itemIdent] autorelease];
|
||||
|
@ -1009,7 +1008,14 @@ static NSArray* sToolbarDefaults = nil;
|
|||
|
||||
[toolbarItem setMenuFormRepresentation:menuFormRep];
|
||||
}
|
||||
else if ( [itemIdent isEqual:ForwardToolbarItemIdentifier] )
|
||||
else if ([itemIdent isEqual:BackToolbarItemIdentifier]) {
|
||||
// not going onto the toolbar, don't need to go through the gynmastics above
|
||||
// and create a separate view
|
||||
[toolbarItem setLabel:NSLocalizedString(@"Back", @"Back")];
|
||||
[toolbarItem setPaletteLabel:NSLocalizedString(@"Go Back", @"Go Back")];
|
||||
[toolbarItem setImage:[NSImage imageNamed:@"back"]];
|
||||
}
|
||||
else if ( [itemIdent isEqual:ForwardToolbarItemIdentifier] && willBeInserted )
|
||||
{
|
||||
// create a new toolbar item that knows how to do validation
|
||||
toolbarItem = [[[ToolbarViewItem alloc] initWithItemIdentifier:itemIdent] autorelease];
|
||||
|
@ -1041,6 +1047,13 @@ static NSArray* sToolbarDefaults = nil;
|
|||
|
||||
[toolbarItem setMenuFormRepresentation:menuFormRep];
|
||||
}
|
||||
else if ( [itemIdent isEqual:ForwardToolbarItemIdentifier] ) {
|
||||
// not going onto the toolbar, don't need to go through the gynmastics above
|
||||
// and create a separate view
|
||||
[toolbarItem setLabel:NSLocalizedString(@"Forward", @"Forward")];
|
||||
[toolbarItem setPaletteLabel:NSLocalizedString(@"Go Forward", @"Go Forward")];
|
||||
[toolbarItem setImage:[NSImage imageNamed:@"forward"]];
|
||||
}
|
||||
else if ( [itemIdent isEqual:ReloadToolbarItemIdentifier] )
|
||||
{
|
||||
[toolbarItem setLabel:NSLocalizedString(@"Reload", @"Reload")];
|
||||
|
|
Загрузка…
Ссылка в новой задаче