All Projects â†’ DangerCove â†’ Dcoaboutwindow

DangerCove / Dcoaboutwindow

Licence: bsd-3-clause
👋 A replacement for the standard Mac app About dialog.

Projects that are alternatives of or similar to Dcoaboutwindow

Bekcurvetabbar
Full Customizable Tabbar with IBInspectables
Stars: ✭ 144 (-9.43%)
Mutual labels:  component
React Axios
Axios Components for React with child function callback
Stars: ✭ 153 (-3.77%)
Mutual labels:  component
Mag.js
MagJS - Modular Application Glue
Stars: ✭ 157 (-1.26%)
Mutual labels:  component
Scrollprogress
🛸 Light weight library to observe the viewport scroll position
Stars: ✭ 148 (-6.92%)
Mutual labels:  component
Vue Table
data table simplify! -- vuetable is a Vue.js component that will automatically request (JSON) data from the server and display them nicely in html table with swappable/extensible pagination component.
Stars: ✭ 1,833 (+1052.83%)
Mutual labels:  component
Garland View Android
≡ GarlandView seamlessly transitions between multiple lists of content. Made by @Ramotion
Stars: ✭ 1,855 (+1066.67%)
Mutual labels:  component
Fluentvalidation.blazor
Fluent Validation-powered Blazor component for validating standard <EditForm> 🌌 ✅
Stars: ✭ 140 (-11.95%)
Mutual labels:  component
Serializer
With the Serializer component it's possible to handle serializing data structures, including object graphs, into array structures or other formats like XML and JSON. It can also handle deserializing XML and JSON back to object graphs.
Stars: ✭ 2,021 (+1171.07%)
Mutual labels:  component
Go Sdk
Dapr SDK for go
Stars: ✭ 149 (-6.29%)
Mutual labels:  component
Polyfill Php73
This component provides functions unavailable in releases prior to PHP 7.3.
Stars: ✭ 2,121 (+1233.96%)
Mutual labels:  component
React Use Clipboard
React hook that provides copy to clipboard functionality.
Stars: ✭ 149 (-6.29%)
Mutual labels:  component
React Intense
A React component for viewing large images up close 🔍
Stars: ✭ 152 (-4.4%)
Mutual labels:  component
React Qr Code
A QR code generator for React and React Native.
Stars: ✭ 153 (-3.77%)
Mutual labels:  component
Vue Plain Slider
A simple slider component for Vue.js
Stars: ✭ 146 (-8.18%)
Mutual labels:  component
React Native Input Spinner
An extensible input number spinner component for react-native highly customizable. This component enhance a text input for entering numeric values, with increase and decrease buttons.
Stars: ✭ 155 (-2.52%)
Mutual labels:  component
React Native Wormhole
⚛️ 🌌 Inter-dimensional Portals for React Native. 👽 🖖
Stars: ✭ 133 (-16.35%)
Mutual labels:  component
React Native Animated Linear Gradient
Animated linear gradient as background animation or something else.
Stars: ✭ 153 (-3.77%)
Mutual labels:  component
Vue3 Draggable Resizable
[Vue3 组件] 用于拖拽调整位置和大小的的组件,同时支持冲突检测,元素吸附对齐,实时参考线。
Stars: ✭ 159 (+0%)
Mutual labels:  component
Vue Facebook Login
💅 A renderless Vue.js component for composing Facebook Login
Stars: ✭ 158 (-0.63%)
Mutual labels:  component
React Render In Browser
React library to render browser specific content
Stars: ✭ 157 (-1.26%)
Mutual labels:  component

Overview

DCOAboutWindow is a replacement for the standard About dialog.

It adds the option to open acknowledgments and visit the website by clicking a button.

DCOAboutWindow in action DCOAboutWindow in Dark Mode

Showing acknowledgments

You can point to and maintain a custom Acknowledgments.rtf file, or you can use a script like Acknowledge to generate it for you.

Setup

Via cocoapods

Add the following line to your Podfile:

pod 'DCOAboutWindow'

Then run pod install and you're set.

Via Carthage

Add the following to your Cartfile:

github "DangerCove/DCOAboutWindow"
github "DangerCove/DCOTransparentScroller"

Then run carthage update and you're set.

Manually

Clone this repo and add files from DCOAboutWindow to your project.

The project relies on DCOTransparentScroller, so include that too.

Usage

I've made a sample project that accompanies this tiny guide.

Import DCOAboutWindowController:

#import <DCOAboutWindow/DCOAboutWindowController.h>

Instantiate DCOAboutWindow:

// Note: make sure self.aboutWindowController is retained
self.aboutWindowController = [[DCOAboutWindowController alloc] init];

Create an IBAction to display the window:

- (IBAction)showAboutWindow:(id)sender {
  [self.aboutWindowController showWindow:nil];
}

Hook it up to the 'About [app name]' menu item or a button.

You can change values by setting properties on DCOAboutWindowController:

/**
 *  The application name.
 *  Default: CFBundleName
 */
@property (copy) NSString *appName;

/**
 *  The application version.
 *  Default: "Version %@ (Build %@)", CFBundleVersion, CFBundleShortVersionString
 */
@property (copy) NSString *appVersion;

/**
 *  The copyright line.
 *  Default: NSHumanReadableCopyright
 */
@property (copy) NSString *appCopyright;

/**
 *  The credits.
 *  Default: [[NSBundle mainBundle] pathForResource:@"Credits" ofType:@"rtf"];
 */
@property (copy) NSAttributedString *appCredits;

/**
 *  The URL pointing to the app's website.
 *  Default: none
 */
@property (strong) NSURL *appWebsiteURL;

/**
 *  The path to the file that contains the acknowledgments.
 *  Default: [[NSBundle mainBundle] pathForResource:@"Acknowledgments" ofType:@"rtf"];
 */
@property (nonatomic, copy) NSString *acknowledgmentsPath;

/**
 *  If set to YES acknowledgments are shown in a text view, inside the window. Otherwise an external editor is launched.
 *  Default: NO;
 */
@property (assign) BOOL useTextViewForAcknowledgments;

Pre-processing (for Dark Mode)

You can pre-process the NSAttributedString containing the app credits using a delegate. This is great for making the about window play nice with Mojave's Dark Mode. Here's how it works:

// Conform to the DCOStringPreprocessingProtocol
@interface DCDAppDelegate() <DCOStringPreprocessingProtocol>

self.aboutWindowController = [[DCOAboutWindowController alloc] init];
// Set the delegate
self.aboutWindowController.delegate = self;

#pragma mark - DCOStringPreprocessingProtocol

- (NSAttributedString *)preprocessAppCredits:(NSAttributedString *)appCredits {
    NSMutableAttributedString *mutableCredits = [appCredits mutableCopy];
    
    NSDictionary *attributes = @{ NSForegroundColorAttributeName : [NSColor textColor] };
    [mutableCredits addAttributes:attributes range:NSMakeRange(0, mutableCredits.length)];
    
    return [mutableCredits copy];
}

// Optionally pre-process the acknowledgments as well
- (NSAttributedString *)preprocessAppAcknowledgments:(NSAttributedString *)appAcknowledgments {
    NSMutableAttributedString *mutableAcknowledgments = [appAcknowledgments mutableCopy];
    
    NSDictionary *attributes = @{ NSForegroundColorAttributeName : [NSColor textColor] };
    [mutableAcknowledgments addAttributes:attributes range:NSMakeRange(0, mutableCredits.length)];
    
    return [mutableAcknowledgments copy];
}

Thanks to @balthisar for adding this.

Localization

Add the following lines to your Localizable.string to change these values, or localize them.

/* Version %@ (Build %@), displayed in the about window */
"Version %@ (Build %@)" = "v%@ (%@)";

/* Caption on the 'Visit the %@ Website' button in the about window */
"Visit the %@ Website" = "Visit %@'s Website";

/* Caption of the 'Acknowledgments' button in the about window */
"Acknowledgments" = "Acknowledgments";

/* Caption of the 'Credits' button in the about window when acknowledgments are shown when useTextViewForAcknowledgments is YES. */
"Credits" = "Credits";

Contributions and things to add

Be creative. DCOAboutWindow should be a flexible, easy to use way to make the About Window for your app look pretty. Make sure your changes don't break existing functionality without good reason.

To create a pull request:

  • Fork the repo;
  • Create a new branch (git checkout -b your-feature);
  • Add your code;
  • Commit all your changes to your branch;
  • Push it (git push origin your-feature);
  • Submit a pull request via the GitHub web interface.

Spin-offs

Let me know if you made far going modifications by including your project in this section. Add yourself to the list and send me a pull request.

Add-ons

Related apps, tools and scripts that extend DCOAboutWindow's functionality.

  • Acknowledge - Generates a single Acknowledgments.rtf from CocoaPods and custom markdown files.

Changelog

v0.4.0

  • Fix typo in preprocessor delegate method name.
  • Implement alternative for deprecation.

v0.3.1

  • Make version string selectable.

v0.3.0

v0.2.0

  • Optionally display acknowledgments inside the window, instead of through an external editor.

Set useTextViewForAcknowledgments to YES to enable this feature.

  • Improve Auto Layout constrains. The image view now remains the same width, while the text fields can become wider.

v0.1.0

  • Improved localization support
  • Improved auto-layout constraints to handle resizing better

You can toggle (off by default) resizing by setting the NSWindow's styleMask. Check out the example project to see how this works.

v0.0.2

  • Switched to using 'Acknowledgments' instead of 'Acknowledg_e_ments' to be more consistent and prevent incompatibility with Acknowledge. NOTE: Make sure you change the filename of your acknowledgments and any setters/getters.

v0.0.1

  • Initial release.

License

New BSD License, see LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].