Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add RTL to settings #159

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Cosmos/CosmosSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public struct CosmosSettings {

// MARK: - Star settings
// -----------------------------

/// Override RTL logic
public var isRTL: Bool?

/// Border color of an empty star.
public var emptyBorderColor = CosmosDefaultSettings.emptyBorderColor

Expand Down
4 changes: 2 additions & 2 deletions Cosmos/CosmosView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ Shows: ★★★★☆ (123)

// Create star layers
// ------------

var isRightToLeft = settings.isRTL ?? RightToLeft.isRightToLeft(self)
var layers = CosmosLayers.createStarLayers(
rating,
settings: settings,
isRightToLeft: RightToLeft.isRightToLeft(self)
isRightToLeft: isRightToLeft
)

// Create text layer
Expand Down