Terminal: remove fullscreen tooltip
Whenever using Terminal in fullscreen mode, there is a permanently on tooltip with the shortcut to exit fullscreen mode wherever you leave your mouse. This is super annoying and as a result I find myself rarely using fullscreen mode. Remove the tooltip, and instead add a button to the right of the tab bar to exit fullscreen mode, as done in WonderBrush and WebPositive. Change-Id: If42f038da3d644970de6214a31195882d4fc7eee Reviewed-on: https://review.haiku-os.org/c/1507 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
f74f860085
commit
4429c2c891
@@ -38,7 +38,7 @@ Application Terminal :
|
|||||||
TitlePlaceholderMapper.cpp
|
TitlePlaceholderMapper.cpp
|
||||||
VTKeyTbl.c
|
VTKeyTbl.c
|
||||||
VTPrsTbl.c
|
VTPrsTbl.c
|
||||||
: be localestub tracker textencoding
|
: be localestub shared tracker translation textencoding
|
||||||
[ TargetLibsupc++ ] [ TargetLibstdc++ ]
|
[ TargetLibsupc++ ] [ TargetLibstdc++ ]
|
||||||
: Terminal.rdef XColors.rdef
|
: Terminal.rdef XColors.rdef
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <BitmapButton.h>
|
||||||
|
#include <Button.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <Locale.h>
|
#include <Locale.h>
|
||||||
#include <Message.h>
|
#include <Message.h>
|
||||||
@@ -27,6 +29,9 @@
|
|||||||
#include <ScrollView.h>
|
#include <ScrollView.h>
|
||||||
#include <Window.h>
|
#include <Window.h>
|
||||||
|
|
||||||
|
#include "TermConst.h"
|
||||||
|
#include "WindowIcon.h"
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark - SmartTabView
|
// #pragma mark - SmartTabView
|
||||||
|
|
||||||
@@ -45,6 +50,18 @@ SmartTabView::SmartTabView(BRect frame, const char* name, button_width width,
|
|||||||
frame.OffsetTo(B_ORIGIN);
|
frame.OffsetTo(B_ORIGIN);
|
||||||
ContainerView()->MoveTo(frame.LeftTop());
|
ContainerView()->MoveTo(frame.LeftTop());
|
||||||
ContainerView()->ResizeTo(frame.Width(), frame.Height());
|
ContainerView()->ResizeTo(frame.Width(), frame.Height());
|
||||||
|
|
||||||
|
BRect buttonRect(frame);
|
||||||
|
buttonRect.left = frame.right - B_V_SCROLL_BAR_WIDTH + 1;
|
||||||
|
buttonRect.bottom = frame.top + TabHeight() - 1;
|
||||||
|
fFullScreenButton = new BBitmapButton(kWindowIconBits, kWindowIconWidth,
|
||||||
|
kWindowIconHeight, kWindowIconFormat, new BMessage(FULLSCREEN));
|
||||||
|
fFullScreenButton->SetResizingMode(B_FOLLOW_TOP | B_FOLLOW_RIGHT);
|
||||||
|
fFullScreenButton->MoveTo(buttonRect.LeftTop());
|
||||||
|
fFullScreenButton->ResizeTo(buttonRect.Width(), buttonRect.Height());
|
||||||
|
fFullScreenButton->Hide();
|
||||||
|
|
||||||
|
AddChild(fFullScreenButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -143,6 +160,7 @@ SmartTabView::AddTab(BView* target, BTab* tab)
|
|||||||
// to tabbed mode
|
// to tabbed mode
|
||||||
ContainerView()->ResizeBy(0, -TabHeight());
|
ContainerView()->ResizeBy(0, -TabHeight());
|
||||||
ContainerView()->MoveBy(0, TabHeight());
|
ContainerView()->MoveBy(0, TabHeight());
|
||||||
|
fFullScreenButton->Show();
|
||||||
|
|
||||||
// Make sure the content size stays the same, but take special care
|
// Make sure the content size stays the same, but take special care
|
||||||
// of full screen mode
|
// of full screen mode
|
||||||
@@ -202,6 +220,7 @@ SmartTabView::RemoveTab(int32 index)
|
|||||||
|
|
||||||
ContainerView()->MoveBy(0, -TabHeight());
|
ContainerView()->MoveBy(0, -TabHeight());
|
||||||
ContainerView()->ResizeBy(0, TabHeight());
|
ContainerView()->ResizeBy(0, TabHeight());
|
||||||
|
fFullScreenButton->Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
return BTabView::RemoveTab(index);
|
return BTabView::RemoveTab(index);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include <TabView.h>
|
#include <TabView.h>
|
||||||
|
|
||||||
|
|
||||||
|
class BButton;
|
||||||
class BPopUpMenu;
|
class BPopUpMenu;
|
||||||
class BScrollView;
|
class BScrollView;
|
||||||
|
|
||||||
@@ -64,6 +65,7 @@ private:
|
|||||||
BRect fInsets;
|
BRect fInsets;
|
||||||
BScrollView* fScrollView;
|
BScrollView* fScrollView;
|
||||||
Listener* fListener;
|
Listener* fListener;
|
||||||
|
BButton* fFullScreenButton;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1826,16 +1826,6 @@ TermWindow::_UpdateSessionTitle(int32 index)
|
|||||||
fTitle.title = windowTitle;
|
fTitle.title = windowTitle;
|
||||||
SetTitle(fTitle.title);
|
SetTitle(fTitle.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If fullscreen, add a tooltip with the title and a keyboard shortcut hint
|
|
||||||
if (fFullScreen) {
|
|
||||||
BString toolTip(fTitle.title);
|
|
||||||
toolTip += "\n(";
|
|
||||||
toolTip += B_TRANSLATE("Full screen");
|
|
||||||
toolTip += " (ALT " UTF8_ENTER "))";
|
|
||||||
termView->SetToolTip(toolTip.String());
|
|
||||||
} else
|
|
||||||
termView->SetToolTip((const char *)NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
|
||||||
|
const uint32 kWindowIconWidth = 13;
|
||||||
|
const uint32 kWindowIconHeight = 14;
|
||||||
|
const color_space kWindowIconFormat = B_RGBA32;
|
||||||
|
|
||||||
|
const unsigned char kWindowIconBits[] = {
|
||||||
|
0x78, 0x78, 0x78, 0xff, 0x78, 0x78, 0x78, 0xff, 0x78, 0x78, 0x78, 0xff, 0x78, 0x78, 0x78, 0xff,
|
||||||
|
0x78, 0x78, 0x78, 0xff, 0x78, 0x78, 0x78, 0xff, 0x78, 0x78, 0x78, 0xff, 0x78, 0x78, 0x78, 0xff,
|
||||||
|
0x78, 0x78, 0x78, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x78, 0xff, 0x66, 0xff, 0xff, 0xff, 0x66, 0xff, 0xff, 0xff,
|
||||||
|
0x66, 0xff, 0xff, 0xff, 0x66, 0xff, 0xff, 0xff, 0x66, 0xff, 0xff, 0xff, 0x66, 0xff, 0xff, 0xff,
|
||||||
|
0x66, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x78, 0xff, 0x13, 0xaf, 0xff, 0xff,
|
||||||
|
0x13, 0xaf, 0xff, 0xff, 0x13, 0xaf, 0xff, 0xff, 0x13, 0xaf, 0xff, 0xff, 0x13, 0xaf, 0xff, 0xff,
|
||||||
|
0x13, 0xaf, 0xff, 0xff, 0x13, 0xaf, 0xff, 0xff, 0x78, 0x78, 0x78, 0xff, 0x78, 0x78, 0x78, 0xff,
|
||||||
|
0x78, 0x78, 0x78, 0xff, 0x78, 0x78, 0x78, 0xff, 0x78, 0x78, 0x78, 0xff, 0x78, 0x78, 0x78, 0xff,
|
||||||
|
0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff,
|
||||||
|
0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff,
|
||||||
|
0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0x00, 0x00, 0x00, 0xff,
|
||||||
|
0x78, 0x78, 0x78, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc8, 0xc8, 0xc8, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xc8, 0xc8, 0xc8, 0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0xff, 0xc8, 0xc8, 0xc8, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0xff,
|
||||||
|
0xc8, 0xc8, 0xc8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0x00, 0x00, 0x00, 0xff,
|
||||||
|
0x78, 0x78, 0x78, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc8, 0xc8, 0xc8, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xc8, 0xc8, 0xc8, 0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0xff, 0xc8, 0xc8, 0xc8, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0xff,
|
||||||
|
0xc8, 0xc8, 0xc8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0x00, 0x00, 0x00, 0xff,
|
||||||
|
0x78, 0x78, 0x78, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff,
|
||||||
|
0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff,
|
||||||
|
0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0xc8, 0xc8, 0xc8, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff
|
||||||
|
};
|
||||||
|
|
||||||
Reference in New Issue
Block a user