mirror of
https://github.com/glfw/glfw.git
synced 2025-06-07 08:14:57 +00:00
test
This commit is contained in:
parent
c2952e047a
commit
bf66cb6e22
@ -1030,14 +1030,14 @@ void _glfwSetWindowTitleCocoa(_GLFWwindow* window, const char* title)
|
|||||||
void _glfwSetWindowTitlebarColorCocoa(_GLFWwindow* window, int r, int g, int b, int a)
|
void _glfwSetWindowTitlebarColorCocoa(_GLFWwindow* window, int r, int g, int b, int a)
|
||||||
{
|
{
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
CGFloat red = r/ 255;
|
CGFloat red = (CGFloat)r/ 255.0;
|
||||||
CGFloat green =g / 255;
|
CGFloat green = (CGFloat)g / 255.0;
|
||||||
CGFloat blue = b / 255;
|
CGFloat blue = (CGFloat)b / 255.0;
|
||||||
CGFloat alpha = a / 255;
|
CGFloat alpha = (CGFloat)a / 255.0;
|
||||||
|
|
||||||
NSColor *color = [NSColor colorWithCalibratedRed:red green:green blue:blue alpha:alpha];
|
NSColor *color = [NSColor colorWithCalibratedRed:red green:green blue:blue alpha:alpha];
|
||||||
|
|
||||||
// [window->ns.object setTitlebarAppearsTransparent:YES]; // gives it "flat" look
|
[window->ns.object setTitlebarAppearsTransparent:YES]; // gives it "flat" look
|
||||||
[window->ns.object setBackgroundColor:color];
|
[window->ns.object setBackgroundColor:color];
|
||||||
} // autoreleasepool
|
} // autoreleasepool
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user