diff --git a/AppKit/CPSegmentedControl.j b/AppKit/CPSegmentedControl.j index c2dd3a21f..77968d693 100644 --- a/AppKit/CPSegmentedControl.j +++ b/AppKit/CPSegmentedControl.j @@ -561,10 +561,11 @@ CPSegmentSwitchTrackingMomentary = 2; } else if (aName === "right-segment-bezel") { - return CGRectMake(CGRectGetWidth([self bounds]) - contentInset.right, - bezelInset.top, - contentInset.right, - height); + // we have to FLOOR the coordinates to prevent a 1px glitch in Safari + return CGRectMake(FLOOR(CGRectGetWidth([self bounds]) - contentInset.right), + FLOOR(bezelInset.top), + FLOOR(contentInset.right), + FLOOR(height)); } else if (aName.indexOf("segment-bezel") === 0) { diff --git a/README.markdown b/README.markdown index 9370bee3f..e4019b54d 100644 --- a/README.markdown +++ b/README.markdown @@ -2,11 +2,11 @@ [![Join the chat at https://gitter.im/cappuccino/cappuccino](https://badges.gitter.im/cappuccino/cappuccino.svg)]( https://gitter.im/cappuccino/cappuccino?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -#Welcome to Cappuccino! +# Welcome to Cappuccino! Cappuccino, a web application framework in Objective-J (*a superset of JavaScript which is transpiled for deployment*), enhances app development by implementing the NeXTSTEP/Apple Cocoa® APIs for browsers. Leveraging this well-established architecture, Cappuccino facilitates scalable application development for those usage cases requiring developer productivity, reliability and sophisticated interaction support. Resulting applications are served from any web server and deployed to any modern web browser - without plugins or extensions of any kind. -##Introduction +## Introduction Cappuccino is an open-source framework developed continuously since 2008 and licensed under the LGPL version 2. It faithfully implements as much of the proven NeXTStep/Apple Cocoa® API as web browser restrictions permit. @@ -36,14 +36,14 @@ For more information, see the Bugs and enhancement requrests can be reported by [creating a Github issue](http://github.com/cappuccino/cappuccino/issues). -##System Requirements +## System Requirements -* A minimally HTML5-compliant web browser is the only requirement for running Cappuccino applications. -They are served as standard HTML, Javascript, CSS and images from any web server. +* Any modern web browser can run Cappuccino applications. +* Any web server can serve Cappuccino applications. * Any programmer's editor can be used for coding. * macOS users can use Xcode - which leverages the visual development tools from Apple for creation of complex applications with minimal coding. -##Installation instructions +## Installation instructions To try Cappuccino: 1. Install Node.js and npm from the [Node.js website](https://nodejs.org/download/) or the OS-specific package manager of your choice. Long-term Support (LTS) versions are tested although others will probably work as intended. @@ -116,7 +116,7 @@ To build from source, do: Beware that building and installing Cappuccino from source will overwrite the binaries installed from npm. To undo this, simply run `npm install -g @objj/cappuccino` again. -##FAQs +## FAQs **Q: What is meant by desktop-class apps?** **A:** Desktop-class apps refer to web applications that offer the same level of functionality, complexity, and user experience as traditional desktop applications. These apps leverage advanced user interface components, rich graphics, and responsive interactions. Cappuccino is ideally suited for developing line-of-business applications, which are essential tools used within a company for its operations. Such applications often require robust data handling, complex workflows, and a high degree of reliability. Cappuccino’s comprehensive framework, modeled after the Cocoa® APIs, ensures that web applications can match the capabilities and performance of native desktop software. @@ -141,16 +141,18 @@ Here is a summary of the process: 4. **Modify code with no direct equivalent in Objective-J:** The most common is the C language `enum` construct. Javascript and Objective-J provide no direct equivalent - replace with Javascript objects or functions. - **A simple example:** - *Objective-C:* -```NSString *greeting = [NSString stringWithFormat:@"Hello, %@!", name]; -[greeting release];```. - - *Objective-J:* -```let greeting = [CPString stringWithFormat:@"Hello, %@!", name];``` +**A simple example:** - Note: While most of ES2022 is supported, Javascript template literals are not (yet). -Simple concatenation could have been used in the Objective-J example, but conversion would have been less straightforward. `async/await` is supported. +*Objective-C:* +```objc +NSString *greeting = [NSString stringWithFormat:@"Hello, %@!", name]; +[greeting release]; +``` + +*Objective-J:* +```objj +let greeting = [CPString stringWithFormat:@"Hello, %@!", name]; +``` **Q: Can I use Cappuccino on Windows/Linux?** **A:** Yes - while Cappuccino technology is inspired by Apple's framework, it is inherently platform-independent. As long as you have a modern web browser and a compatible development environment (An LTS version of Node.js, a text editor, and an http server), Cappuccino applications can be developed on and deployed from other operating systems without any issues. @@ -178,7 +180,7 @@ Simple concatenation could have been used in the Objective-J example, but conver Cocoa® is a registered trademark of Apple Inc., covering a series of computer APIs for software user interfaces. -##License +## License This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free