mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWebView+UI/AppKit: Display icons in the macOS UI on Tahoe
On macOS Tahoe, it is now recommended to show menu item icons. We use system symbols for this now. Symbols do not have constant variable names and must be found via the SF Symbols app. The symbols chosen here were to match Safari as close as possible.
This commit is contained in:
parent
8ebc20a4f0
commit
ede6314cb6
Notes:
github-actions[bot]
2025-09-17 10:30:06 +00:00
Author: https://github.com/trflynn89
Commit: ede6314cb6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6215
6 changed files with 95 additions and 14 deletions
|
|
@ -260,7 +260,7 @@ static NSString* const TOOLBAR_TAB_OVERVIEW_IDENTIFIER = @"ToolbarTabOverviewIde
|
|||
- (NSToolbarItem*)navigate_back_toolbar_item
|
||||
{
|
||||
if (!_navigate_back_toolbar_item) {
|
||||
auto* button = Ladybird::create_application_button([[[self tab] web_view] view].navigate_back_action(), NSImageNameGoBackTemplate);
|
||||
auto* button = Ladybird::create_application_button([[[self tab] web_view] view].navigate_back_action());
|
||||
|
||||
_navigate_back_toolbar_item = [[NSToolbarItem alloc] initWithItemIdentifier:TOOLBAR_NAVIGATE_BACK_IDENTIFIER];
|
||||
[_navigate_back_toolbar_item setView:button];
|
||||
|
|
@ -272,7 +272,7 @@ static NSString* const TOOLBAR_TAB_OVERVIEW_IDENTIFIER = @"ToolbarTabOverviewIde
|
|||
- (NSToolbarItem*)navigate_forward_toolbar_item
|
||||
{
|
||||
if (!_navigate_forward_toolbar_item) {
|
||||
auto* button = Ladybird::create_application_button([[[self tab] web_view] view].navigate_forward_action(), NSImageNameGoForwardTemplate);
|
||||
auto* button = Ladybird::create_application_button([[[self tab] web_view] view].navigate_forward_action());
|
||||
|
||||
_navigate_forward_toolbar_item = [[NSToolbarItem alloc] initWithItemIdentifier:TOOLBAR_NAVIGATE_FORWARD_IDENTIFIER];
|
||||
[_navigate_forward_toolbar_item setView:button];
|
||||
|
|
@ -284,7 +284,7 @@ static NSString* const TOOLBAR_TAB_OVERVIEW_IDENTIFIER = @"ToolbarTabOverviewIde
|
|||
- (NSToolbarItem*)reload_toolbar_item
|
||||
{
|
||||
if (!_reload_toolbar_item) {
|
||||
auto* button = Ladybird::create_application_button(WebView::Application::the().reload_action(), NSImageNameRefreshTemplate);
|
||||
auto* button = Ladybird::create_application_button(WebView::Application::the().reload_action());
|
||||
|
||||
_reload_toolbar_item = [[NSToolbarItem alloc] initWithItemIdentifier:TOOLBAR_RELOAD_IDENTIFIER];
|
||||
[_reload_toolbar_item setView:button];
|
||||
|
|
@ -315,7 +315,7 @@ static NSString* const TOOLBAR_TAB_OVERVIEW_IDENTIFIER = @"ToolbarTabOverviewIde
|
|||
- (NSToolbarItem*)zoom_toolbar_item
|
||||
{
|
||||
if (!_zoom_toolbar_item) {
|
||||
auto* button = Ladybird::create_application_button([[[self tab] web_view] view].reset_zoom_action(), nil);
|
||||
auto* button = Ladybird::create_application_button([[[self tab] web_view] view].reset_zoom_action());
|
||||
|
||||
_zoom_toolbar_item = [[NSToolbarItem alloc] initWithItemIdentifier:TOOLBAR_ZOOM_IDENTIFIER];
|
||||
[_zoom_toolbar_item setView:button];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue