diff --git a/Palace/EkirjastoConfig/Colors.xcassets/ColorEkirjastoFilterButtonBackgroundNormal.colorset/Contents.json b/Palace/EkirjastoConfig/Colors.xcassets/ColorEkirjastoFilterButtonBackgroundNormal.colorset/Contents.json new file mode 100644 index 00000000..d0079ce0 --- /dev/null +++ b/Palace/EkirjastoConfig/Colors.xcassets/ColorEkirjastoFilterButtonBackgroundNormal.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xC6", + "green" : "0xC6", + "red" : "0xC6" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x12", + "green" : "0x12", + "red" : "0x12" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Palace/Views/TPPEntryPointView.swift b/Palace/Views/TPPEntryPointView.swift index b5e6ffbb..ab0b74eb 100644 --- a/Palace/Views/TPPEntryPointView.swift +++ b/Palace/Views/TPPEntryPointView.swift @@ -45,6 +45,14 @@ final class TPPEntryPointView: UIView { } let segmentedControl = UISegmentedControl(items: titles) + + // Set style for the filter button group in top of the book catalog in "Browse books" view. + // Segmented control button can be in two states + // - selected: button is currently selected + // - normal: button is not selected + // Use special darker background color for the buttons that are in normal state to add more contrast. + segmentedControl.backgroundColor = TPPConfiguration.catalogSegmentedControlBackgroundColorNormal() + setupSubviews(segmentedControl) isHidden = false; }