From 4804609b7e8e2488b28d68e5171a61cd7a5ea848 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 19 Feb 2019 16:41:13 +0100 Subject: [PATCH] WindowServer: Display menus with 95% opacity by default. --- WindowServer/WSMenu.cpp | 6 +----- WindowServer/WSMenu.h | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/WindowServer/WSMenu.cpp b/WindowServer/WSMenu.cpp index 6555157241..2644276226 100644 --- a/WindowServer/WSMenu.cpp +++ b/WindowServer/WSMenu.cpp @@ -20,11 +20,6 @@ WSMenu::~WSMenu() { } -void WSMenu::set_menu_window(OwnPtr&& menu_window) -{ - m_menu_window = move(menu_window); -} - const Font& WSMenu::font() const { return Font::default_font(); @@ -70,6 +65,7 @@ WSWindow& WSMenu::ensure_menu_window() } auto window = make(*this); + window->set_opacity(0.95f); window->set_rect(0, 0, width(), height()); m_menu_window = move(window); draw(); diff --git a/WindowServer/WSMenu.h b/WindowServer/WSMenu.h index 2ec7001657..9bcb44bb2a 100644 --- a/WindowServer/WSMenu.h +++ b/WindowServer/WSMenu.h @@ -47,8 +47,6 @@ public: void set_rect_in_menubar(const Rect& rect) { m_rect_in_menubar = rect; } WSWindow* menu_window() { return m_menu_window.ptr(); } - void set_menu_window(OwnPtr&&); - WSWindow& ensure_menu_window(); int width() const;