mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 15:07:45 +00:00
Ladybird/AppKit: Remove theme color changing background color
This commit is contained in:
parent
2107ab823d
commit
980e32b4fe
3 changed files with 1 additions and 26 deletions
|
@ -100,8 +100,6 @@ static constexpr CGFloat const WINDOW_HEIGHT = 800;
|
|||
object:[scroll_view contentView]];
|
||||
|
||||
[self setContentView:scroll_view];
|
||||
self.backgroundColor = [NSColor windowBackgroundColor];
|
||||
self.titlebarAppearsTransparent = YES;
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -226,7 +224,6 @@ static constexpr CGFloat const WINDOW_HEIGHT = 800;
|
|||
- (void)onLoadStart:(URL const&)url isRedirect:(BOOL)is_redirect
|
||||
{
|
||||
if (url != self.last_url) {
|
||||
self.backgroundColor = [NSColor windowBackgroundColor];
|
||||
self.last_url = url;
|
||||
}
|
||||
|
||||
|
@ -258,23 +255,6 @@ static constexpr CGFloat const WINDOW_HEIGHT = 800;
|
|||
[self updateTabTitleAndFavicon];
|
||||
}
|
||||
|
||||
- (void)onThemeColorChange:(Color)color
|
||||
{
|
||||
auto* nscolor = [NSColor colorWithRed:((CGFloat)color.red()) / 255.0
|
||||
green:((CGFloat)color.green()) / 255.0
|
||||
blue:((CGFloat)color.blue()) / 255.0
|
||||
alpha:1.0];
|
||||
CGFloat hue = 0.0;
|
||||
CGFloat saturation = 0.0;
|
||||
CGFloat brightness = 0.0;
|
||||
[nscolor getHue:&hue saturation:&saturation brightness:&brightness alpha:nil];
|
||||
if (brightness > 0.75)
|
||||
brightness = 0.75;
|
||||
nscolor = [NSColor colorWithHue:hue saturation:saturation brightness:brightness alpha:1.0];
|
||||
self.backgroundColor = nscolor;
|
||||
self.titlebarAppearsTransparent = YES;
|
||||
}
|
||||
|
||||
- (void)onFaviconChange:(Gfx::Bitmap const&)bitmap
|
||||
{
|
||||
static constexpr size_t FAVICON_SIZE = 16;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue