Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable full screen mode for 2D browsing #1630

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,11 @@ public void onResize() {
enterResizeMode();
}

@Override
public void onFullScreen() {
mAttachedWindow.setIsFullScreen(true);
}

@Override
public void onPassthrough() {
mWidgetManager.togglePassthrough();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public interface MenuDelegate {
void onPageZoomIn();
void onPageZoomOut();
int getCurrentZoomLevel();
void onFullScreen();
}

public static final int SWITCH_ITEM_ID = 0;
Expand Down Expand Up @@ -189,6 +190,18 @@ private void updateItems() {

// In kiosk mode, only resize, find in page and passthrough are available.
if (!mWidgetManager.getFocusedWindow().isKioskMode()) {
mItems.add(new HamburgerMenuAdapter.MenuItem.Builder(
HamburgerMenuAdapter.MenuItem.TYPE_DEFAULT,
(menuItem) -> {
if (mDelegate != null) {
mDelegate.onFullScreen();
}
return null;
})
.withTitle(getContext().getString(R.string.hamburger_menu_fullscreen))
.withIcon(R.drawable.fullscreen_button)
.build());

final Session activeSession = SessionStore.get().getActiveSession();

if (!BuildConfig.FLAVOR_backend.equals("chromium")) {
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2074,6 +2074,10 @@ the Select` button. When clicked it bookmarks all the previously selected tabs -
it saves the Web App provided by the current page -->
<string name="hamburger_menu_save_web_app">Save Web app…</string>

<!-- This string is displayed inside the Hamburger menu at the right of the navigation bar. When clicked
it put the current window in fullscreen mode -->
<string name="hamburger_menu_fullscreen">Fullscreen</string>

<!-- This string is displayed in the tooltip that is displayed when the user hovers the hamburger menu icon -->
<string name="hamburger_menu_tooltip">Menu</string>

Expand Down
Loading