From 36354406db14ef7f539b9688be01130f51f4ebe3 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 16 Feb 2021 19:53:47 +0100 Subject: [PATCH] Browser: Don't show frame around the web view in full-screen mode Let's use all the space we have available. :^) --- Userland/Applications/Browser/Tab.cpp | 10 ++++++++-- Userland/Applications/Browser/Tab.h | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Userland/Applications/Browser/Tab.cpp b/Userland/Applications/Browser/Tab.cpp index 4b606e18c2..3c90645e6e 100644 --- a/Userland/Applications/Browser/Tab.cpp +++ b/Userland/Applications/Browser/Tab.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Andreas Kling + * Copyright (c) 2020-2021, Andreas Kling * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -288,6 +288,12 @@ Tab::Tab(Type type) tab_widget->set_bar_visible(!is_fullscreen && tab_widget->children().size() > 1); m_toolbar_container->set_visible(!is_fullscreen); m_statusbar->set_visible(!is_fullscreen); + + if (is_fullscreen) { + view().set_frame_thickness(0); + } else { + view().set_frame_thickness(2); + } }, this)); @@ -534,7 +540,7 @@ void Tab::context_menu_requested(const Gfx::IntPoint& screen_position) m_tab_context_menu->popup(screen_position); } -GUI::Widget& Tab::view() +GUI::ScrollableWidget& Tab::view() { if (m_type == Type::InProcessWebView) return *m_page_view; diff --git a/Userland/Applications/Browser/Tab.h b/Userland/Applications/Browser/Tab.h index 79f86e4931..f99347ff21 100644 --- a/Userland/Applications/Browser/Tab.h +++ b/Userland/Applications/Browser/Tab.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Andreas Kling + * Copyright (c) 2020-2021, Andreas Kling * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -74,7 +74,7 @@ public: const String& title() const { return m_title; } const Gfx::Bitmap* icon() const { return m_icon; } - GUI::Widget& view(); + GUI::ScrollableWidget& view(); private: explicit Tab(Type);