mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
Ladybird/AppKit: Use system accent color in palette
This commit is contained in:
parent
0c0595bb31
commit
86e372b7dd
Notes:
github-actions[bot]
2024-09-23 15:05:57 +00:00
Author: https://github.com/bplaat Commit: https://github.com/LadybirdBrowser/ladybird/commit/86e372b7dd8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1365 Reviewed-by: https://github.com/trflynn89
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <UI/Palette.h>
|
||||
#import <Utilities/Conversions.h>
|
||||
|
||||
namespace Ladybird {
|
||||
|
||||
|
@ -37,8 +38,9 @@ Core::AnonymousBuffer create_system_palette()
|
|||
|
||||
auto palette_impl = Gfx::PaletteImpl::create_with_anonymous_buffer(theme);
|
||||
auto palette = Gfx::Palette(move(palette_impl));
|
||||
|
||||
palette.set_flag(Gfx::FlagRole::IsDark, is_dark);
|
||||
palette.set_color(Gfx::ColorRole::Accent, ns_color_to_gfx_color([NSColor controlAccentColor]));
|
||||
// FIXME: There are more system colors we currently don't use (https://developer.apple.com/documentation/appkit/nscolor/3000782-controlaccentcolor?language=objc)
|
||||
|
||||
return theme;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue