зеркало из https://github.com/mozilla/pjs.git
Starting to add toolbar show/hide for bookmarsk toolbar.
This commit is contained in:
Родитель
a376f9f56c
Коммит
9e88462880
|
@ -300,7 +300,6 @@ static NSString *PrintToolbarItemIdentifier = @"Print Toolbar Item";
|
|||
ForwardToolbarItemIdentifier,
|
||||
ReloadToolbarItemIdentifier,
|
||||
StopToolbarItemIdentifier,
|
||||
HomeToolbarItemIdentifier,
|
||||
LocationToolbarItemIdentifier,
|
||||
SidebarToolbarItemIdentifier,
|
||||
nil];
|
||||
|
|
|
@ -43,4 +43,6 @@ class BookmarksService;
|
|||
-(void)reflowButtons;
|
||||
-(void)reflowButtonsStartingAtIndex: (int)aIndex;
|
||||
|
||||
-(void)showBookmarksToolbar: (BOOL)aShow;
|
||||
|
||||
@end
|
||||
|
|
|
@ -193,7 +193,7 @@
|
|||
NSRect oldFrame = [self frame];
|
||||
[super setFrame:aRect];
|
||||
|
||||
if (oldFrame.size.width == aRect.size.width)
|
||||
if (oldFrame.size.width == aRect.size.width || aRect.size.height == 0)
|
||||
return;
|
||||
|
||||
int count = [mButtons count];
|
||||
|
@ -224,4 +224,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
-(void)showBookmarksToolbar: (BOOL)aShow
|
||||
{
|
||||
if (!aShow) {
|
||||
float height = [self bounds].size.height;
|
||||
[self setFrame: NSMakeRect([self frame].origin.x, [self frame].origin.y + height,
|
||||
[self frame].size.width, 0)];
|
||||
// We need to adjust the content area.
|
||||
NSView* view = [[[self window] windowController] getTabBrowser];
|
||||
[view setFrame: NSMakeRect([view frame].origin.x, [view frame].origin.y,
|
||||
[view frame].size.width, [view frame].size.height + height)];
|
||||
}
|
||||
//else
|
||||
// Reflowing the buttons will do the right thing.
|
||||
// [self reflowButtons];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -90,6 +90,7 @@ class BookmarksService;
|
|||
-(IBAction) nextTab:(id)aSender;
|
||||
|
||||
// View menu actions.
|
||||
-(IBAction) toggleBookmarksToolbar:(id)aSender;
|
||||
-(IBAction) doReload:(id)aSender;
|
||||
-(IBAction) doStop:(id)aSender;
|
||||
-(IBAction) biggerTextSize:(id)aSender;
|
||||
|
|
|
@ -90,6 +90,7 @@ class BookmarksService;
|
|||
-(IBAction) nextTab:(id)aSender;
|
||||
|
||||
// View menu actions.
|
||||
-(IBAction) toggleBookmarksToolbar:(id)aSender;
|
||||
-(IBAction) doReload:(id)aSender;
|
||||
-(IBAction) doStop:(id)aSender;
|
||||
-(IBAction) biggerTextSize:(id)aSender;
|
||||
|
|
|
@ -43,4 +43,6 @@ class BookmarksService;
|
|||
-(void)reflowButtons;
|
||||
-(void)reflowButtonsStartingAtIndex: (int)aIndex;
|
||||
|
||||
-(void)showBookmarksToolbar: (BOOL)aShow;
|
||||
|
||||
@end
|
||||
|
|
|
@ -193,7 +193,7 @@
|
|||
NSRect oldFrame = [self frame];
|
||||
[super setFrame:aRect];
|
||||
|
||||
if (oldFrame.size.width == aRect.size.width)
|
||||
if (oldFrame.size.width == aRect.size.width || aRect.size.height == 0)
|
||||
return;
|
||||
|
||||
int count = [mButtons count];
|
||||
|
@ -224,4 +224,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
-(void)showBookmarksToolbar: (BOOL)aShow
|
||||
{
|
||||
if (!aShow) {
|
||||
float height = [self bounds].size.height;
|
||||
[self setFrame: NSMakeRect([self frame].origin.x, [self frame].origin.y + height,
|
||||
[self frame].size.width, 0)];
|
||||
// We need to adjust the content area.
|
||||
NSView* view = [[[self window] windowController] getTabBrowser];
|
||||
[view setFrame: NSMakeRect([view frame].origin.x, [view frame].origin.y,
|
||||
[view frame].size.width, [view frame].size.height + height)];
|
||||
}
|
||||
//else
|
||||
// Reflowing the buttons will do the right thing.
|
||||
// [self reflowButtons];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -300,7 +300,6 @@ static NSString *PrintToolbarItemIdentifier = @"Print Toolbar Item";
|
|||
ForwardToolbarItemIdentifier,
|
||||
ReloadToolbarItemIdentifier,
|
||||
StopToolbarItemIdentifier,
|
||||
HomeToolbarItemIdentifier,
|
||||
LocationToolbarItemIdentifier,
|
||||
SidebarToolbarItemIdentifier,
|
||||
nil];
|
||||
|
|
|
@ -300,7 +300,6 @@ static NSString *PrintToolbarItemIdentifier = @"Print Toolbar Item";
|
|||
ForwardToolbarItemIdentifier,
|
||||
ReloadToolbarItemIdentifier,
|
||||
StopToolbarItemIdentifier,
|
||||
HomeToolbarItemIdentifier,
|
||||
LocationToolbarItemIdentifier,
|
||||
SidebarToolbarItemIdentifier,
|
||||
nil];
|
||||
|
|
|
@ -43,4 +43,6 @@ class BookmarksService;
|
|||
-(void)reflowButtons;
|
||||
-(void)reflowButtonsStartingAtIndex: (int)aIndex;
|
||||
|
||||
-(void)showBookmarksToolbar: (BOOL)aShow;
|
||||
|
||||
@end
|
||||
|
|
|
@ -193,7 +193,7 @@
|
|||
NSRect oldFrame = [self frame];
|
||||
[super setFrame:aRect];
|
||||
|
||||
if (oldFrame.size.width == aRect.size.width)
|
||||
if (oldFrame.size.width == aRect.size.width || aRect.size.height == 0)
|
||||
return;
|
||||
|
||||
int count = [mButtons count];
|
||||
|
@ -224,4 +224,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
-(void)showBookmarksToolbar: (BOOL)aShow
|
||||
{
|
||||
if (!aShow) {
|
||||
float height = [self bounds].size.height;
|
||||
[self setFrame: NSMakeRect([self frame].origin.x, [self frame].origin.y + height,
|
||||
[self frame].size.width, 0)];
|
||||
// We need to adjust the content area.
|
||||
NSView* view = [[[self window] windowController] getTabBrowser];
|
||||
[view setFrame: NSMakeRect([view frame].origin.x, [view frame].origin.y,
|
||||
[view frame].size.width, [view frame].size.height + height)];
|
||||
}
|
||||
//else
|
||||
// Reflowing the buttons will do the right thing.
|
||||
// [self reflowButtons];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -90,6 +90,7 @@ class BookmarksService;
|
|||
-(IBAction) nextTab:(id)aSender;
|
||||
|
||||
// View menu actions.
|
||||
-(IBAction) toggleBookmarksToolbar:(id)aSender;
|
||||
-(IBAction) doReload:(id)aSender;
|
||||
-(IBAction) doStop:(id)aSender;
|
||||
-(IBAction) biggerTextSize:(id)aSender;
|
||||
|
|
|
@ -90,6 +90,7 @@ class BookmarksService;
|
|||
-(IBAction) nextTab:(id)aSender;
|
||||
|
||||
// View menu actions.
|
||||
-(IBAction) toggleBookmarksToolbar:(id)aSender;
|
||||
-(IBAction) doReload:(id)aSender;
|
||||
-(IBAction) doStop:(id)aSender;
|
||||
-(IBAction) biggerTextSize:(id)aSender;
|
||||
|
|
|
@ -43,4 +43,6 @@ class BookmarksService;
|
|||
-(void)reflowButtons;
|
||||
-(void)reflowButtonsStartingAtIndex: (int)aIndex;
|
||||
|
||||
-(void)showBookmarksToolbar: (BOOL)aShow;
|
||||
|
||||
@end
|
||||
|
|
|
@ -193,7 +193,7 @@
|
|||
NSRect oldFrame = [self frame];
|
||||
[super setFrame:aRect];
|
||||
|
||||
if (oldFrame.size.width == aRect.size.width)
|
||||
if (oldFrame.size.width == aRect.size.width || aRect.size.height == 0)
|
||||
return;
|
||||
|
||||
int count = [mButtons count];
|
||||
|
@ -224,4 +224,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
-(void)showBookmarksToolbar: (BOOL)aShow
|
||||
{
|
||||
if (!aShow) {
|
||||
float height = [self bounds].size.height;
|
||||
[self setFrame: NSMakeRect([self frame].origin.x, [self frame].origin.y + height,
|
||||
[self frame].size.width, 0)];
|
||||
// We need to adjust the content area.
|
||||
NSView* view = [[[self window] windowController] getTabBrowser];
|
||||
[view setFrame: NSMakeRect([view frame].origin.x, [view frame].origin.y,
|
||||
[view frame].size.width, [view frame].size.height + height)];
|
||||
}
|
||||
//else
|
||||
// Reflowing the buttons will do the right thing.
|
||||
// [self reflowButtons];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -300,7 +300,6 @@ static NSString *PrintToolbarItemIdentifier = @"Print Toolbar Item";
|
|||
ForwardToolbarItemIdentifier,
|
||||
ReloadToolbarItemIdentifier,
|
||||
StopToolbarItemIdentifier,
|
||||
HomeToolbarItemIdentifier,
|
||||
LocationToolbarItemIdentifier,
|
||||
SidebarToolbarItemIdentifier,
|
||||
nil];
|
||||
|
|
Загрузка…
Ссылка в новой задаче