Fixed scrollbars & window resize knob layout issue:
- active view at fullscreen enter and exit was not necessary the same one! - all view's scrollbars are now resized at fullscreen switch - new tab's scrollbar was sized for window mode, even when added while in fullscreen mode... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39689 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b108306f59
commit
b90b61272e
@ -38,26 +38,24 @@ TermScrollView::TermScrollView(const char* name, BView* child, BView* target,
|
||||
BScrollView(name, child, resizingMode, 0, false, true, B_NO_BORDER)
|
||||
{
|
||||
child->TargetedByScrollView(NULL);
|
||||
|
||||
|
||||
// replace the vertical scroll bar with our own
|
||||
if (fVerticalScrollBar != NULL) {
|
||||
BRect frame(fVerticalScrollBar->Frame());
|
||||
RemoveChild(fVerticalScrollBar);
|
||||
delete fVerticalScrollBar;
|
||||
|
||||
// Overlap one pixel at the top (if required) and the bottom of the
|
||||
// scroll bar with the menu respectively resize knob for aesthetical
|
||||
// reasons.
|
||||
// Overlap one pixel at the top (if required) with the menu for
|
||||
// aesthetical reasons.
|
||||
if (overlapTop)
|
||||
frame.top--;
|
||||
frame.bottom -= B_H_SCROLL_BAR_HEIGHT - 1;
|
||||
|
||||
TermScrollBar* scrollBar = new TermScrollBar(frame, "_VSB_", target, 0,
|
||||
1000, B_VERTICAL);
|
||||
AddChild(scrollBar);
|
||||
fVerticalScrollBar = scrollBar;
|
||||
}
|
||||
|
||||
|
||||
target->TargetedByScrollView(this);
|
||||
}
|
||||
|
||||
|
@ -775,7 +775,8 @@ TermWindow::MessageReceived(BMessage *message)
|
||||
float mbHeight = fMenuBar->Bounds().Height() + 1;
|
||||
fSavedFrame = Frame();
|
||||
BScreen screen(this);
|
||||
_ActiveTermView()->ScrollBar()->ResizeBy(0, (B_H_SCROLL_BAR_HEIGHT - 2));
|
||||
for (int32 i = fTabView->CountTabs() - 1; i >=0 ; i--)
|
||||
_TermViewAt(i)->ScrollBar()->ResizeBy(0, (B_H_SCROLL_BAR_HEIGHT - 1));
|
||||
|
||||
fMenuBar->Hide();
|
||||
fTabView->ResizeBy(0, mbHeight);
|
||||
@ -790,7 +791,8 @@ TermWindow::MessageReceived(BMessage *message)
|
||||
_ActiveTermView()->DisableResizeView();
|
||||
float mbHeight = fMenuBar->Bounds().Height() + 1;
|
||||
fMenuBar->Show();
|
||||
_ActiveTermView()->ScrollBar()->ResizeBy(0, -(B_H_SCROLL_BAR_HEIGHT - 2));
|
||||
for (int32 i = fTabView->CountTabs() - 1; i >=0 ; i--)
|
||||
_TermViewAt(i)->ScrollBar()->ResizeBy(0, -(B_H_SCROLL_BAR_HEIGHT - 1));
|
||||
ResizeTo(fSavedFrame.Width(), fSavedFrame.Height());
|
||||
MoveTo(fSavedFrame.left, fSavedFrame.top);
|
||||
fTabView->ResizeBy(0, -mbHeight);
|
||||
@ -1066,8 +1068,8 @@ void
|
||||
TermWindow::_NewTab()
|
||||
{
|
||||
if (fTabView->CountTabs() < kMaxTabs) {
|
||||
if (fFullScreen)
|
||||
_ActiveTermView()->ScrollBar()->Show();
|
||||
// if (fFullScreen)
|
||||
// _ActiveTermView()->ScrollBar()->Show();
|
||||
|
||||
ActiveProcessInfo info;
|
||||
if (_ActiveTermView()->GetActiveProcessInfo(info))
|
||||
@ -1098,6 +1100,8 @@ TermWindow::_AddTab(Arguments* args, const BString& currentDirectory)
|
||||
TermViewContainerView* containerView = new TermViewContainerView(view);
|
||||
BScrollView* scrollView = new TermScrollView("scrollView",
|
||||
containerView, view, fSessions.IsEmpty());
|
||||
if (!fFullScreen)
|
||||
scrollView->ScrollBar(B_VERTICAL)->ResizeBy(0, -(B_H_SCROLL_BAR_HEIGHT - 1));
|
||||
|
||||
if (fSessions.IsEmpty())
|
||||
fTabView->SetScrollView(scrollView);
|
||||
@ -1179,8 +1183,8 @@ TermWindow::_RemoveTab(int32 index)
|
||||
|
||||
delete session;
|
||||
delete fTabView->RemoveTab(index);
|
||||
if (fFullScreen)
|
||||
_ActiveTermView()->ScrollBar()->Hide();
|
||||
// if (fFullScreen)
|
||||
// _ActiveTermView()->ScrollBar()->Hide();
|
||||
}
|
||||
} else
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
|
Loading…
Reference in New Issue
Block a user