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:
@@ -45,12 +45,10 @@ TermScrollView::TermScrollView(const char* name, BView* child, BView* target,
|
|||||||
RemoveChild(fVerticalScrollBar);
|
RemoveChild(fVerticalScrollBar);
|
||||||
delete fVerticalScrollBar;
|
delete fVerticalScrollBar;
|
||||||
|
|
||||||
// Overlap one pixel at the top (if required) and the bottom of the
|
// Overlap one pixel at the top (if required) with the menu for
|
||||||
// scroll bar with the menu respectively resize knob for aesthetical
|
// aesthetical reasons.
|
||||||
// reasons.
|
|
||||||
if (overlapTop)
|
if (overlapTop)
|
||||||
frame.top--;
|
frame.top--;
|
||||||
frame.bottom -= B_H_SCROLL_BAR_HEIGHT - 1;
|
|
||||||
|
|
||||||
TermScrollBar* scrollBar = new TermScrollBar(frame, "_VSB_", target, 0,
|
TermScrollBar* scrollBar = new TermScrollBar(frame, "_VSB_", target, 0,
|
||||||
1000, B_VERTICAL);
|
1000, B_VERTICAL);
|
||||||
|
|||||||
@@ -775,7 +775,8 @@ TermWindow::MessageReceived(BMessage *message)
|
|||||||
float mbHeight = fMenuBar->Bounds().Height() + 1;
|
float mbHeight = fMenuBar->Bounds().Height() + 1;
|
||||||
fSavedFrame = Frame();
|
fSavedFrame = Frame();
|
||||||
BScreen screen(this);
|
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();
|
fMenuBar->Hide();
|
||||||
fTabView->ResizeBy(0, mbHeight);
|
fTabView->ResizeBy(0, mbHeight);
|
||||||
@@ -790,7 +791,8 @@ TermWindow::MessageReceived(BMessage *message)
|
|||||||
_ActiveTermView()->DisableResizeView();
|
_ActiveTermView()->DisableResizeView();
|
||||||
float mbHeight = fMenuBar->Bounds().Height() + 1;
|
float mbHeight = fMenuBar->Bounds().Height() + 1;
|
||||||
fMenuBar->Show();
|
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());
|
ResizeTo(fSavedFrame.Width(), fSavedFrame.Height());
|
||||||
MoveTo(fSavedFrame.left, fSavedFrame.top);
|
MoveTo(fSavedFrame.left, fSavedFrame.top);
|
||||||
fTabView->ResizeBy(0, -mbHeight);
|
fTabView->ResizeBy(0, -mbHeight);
|
||||||
@@ -1066,8 +1068,8 @@ void
|
|||||||
TermWindow::_NewTab()
|
TermWindow::_NewTab()
|
||||||
{
|
{
|
||||||
if (fTabView->CountTabs() < kMaxTabs) {
|
if (fTabView->CountTabs() < kMaxTabs) {
|
||||||
if (fFullScreen)
|
// if (fFullScreen)
|
||||||
_ActiveTermView()->ScrollBar()->Show();
|
// _ActiveTermView()->ScrollBar()->Show();
|
||||||
|
|
||||||
ActiveProcessInfo info;
|
ActiveProcessInfo info;
|
||||||
if (_ActiveTermView()->GetActiveProcessInfo(info))
|
if (_ActiveTermView()->GetActiveProcessInfo(info))
|
||||||
@@ -1098,6 +1100,8 @@ TermWindow::_AddTab(Arguments* args, const BString& currentDirectory)
|
|||||||
TermViewContainerView* containerView = new TermViewContainerView(view);
|
TermViewContainerView* containerView = new TermViewContainerView(view);
|
||||||
BScrollView* scrollView = new TermScrollView("scrollView",
|
BScrollView* scrollView = new TermScrollView("scrollView",
|
||||||
containerView, view, fSessions.IsEmpty());
|
containerView, view, fSessions.IsEmpty());
|
||||||
|
if (!fFullScreen)
|
||||||
|
scrollView->ScrollBar(B_VERTICAL)->ResizeBy(0, -(B_H_SCROLL_BAR_HEIGHT - 1));
|
||||||
|
|
||||||
if (fSessions.IsEmpty())
|
if (fSessions.IsEmpty())
|
||||||
fTabView->SetScrollView(scrollView);
|
fTabView->SetScrollView(scrollView);
|
||||||
@@ -1179,8 +1183,8 @@ TermWindow::_RemoveTab(int32 index)
|
|||||||
|
|
||||||
delete session;
|
delete session;
|
||||||
delete fTabView->RemoveTab(index);
|
delete fTabView->RemoveTab(index);
|
||||||
if (fFullScreen)
|
// if (fFullScreen)
|
||||||
_ActiveTermView()->ScrollBar()->Hide();
|
// _ActiveTermView()->ScrollBar()->Hide();
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
PostMessage(B_QUIT_REQUESTED);
|
PostMessage(B_QUIT_REQUESTED);
|
||||||
|
|||||||
Reference in New Issue
Block a user