Let application actions opt out of icon creation when created for menus. Use that path for browser menus, tab context menus, and WebView-backed popup menus. Keep icon creation for toolbar and bookmarks bar actions, where the same helper still provides visible button icons. Remove the icon setup that is now only used by menu actions, and shrink popup menu item padding now that there is no icon column.
30 lines
649 B
C++
30 lines
649 B
C++
/*
|
|
* Copyright (c) 2025-2026, Tim Flynn <trflynn89@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWebView/Menu.h>
|
|
|
|
class QAction;
|
|
class QMenu;
|
|
class QWidget;
|
|
|
|
namespace Ladybird {
|
|
|
|
class WebContentView;
|
|
|
|
enum class IncludeActionIcon {
|
|
No,
|
|
Yes,
|
|
};
|
|
|
|
QMenu* create_application_menu(QWidget& parent, WebView::Menu&);
|
|
void repopulate_application_menu(QMenu& menu, QWidget& parent, WebView::Menu& source);
|
|
|
|
QMenu* create_context_menu(QWidget& parent, WebContentView&, WebView::Menu&);
|
|
QAction* create_application_action(QWidget& parent, WebView::Action&, IncludeActionIcon = IncludeActionIcon::Yes);
|
|
|
|
}
|