forked from organicmaps/organicmaps
[iOS] Fixed cell style in Search
https://jira.mail.ru/browse/MAPSME-13200
This commit is contained in:
parent
af509d41bf
commit
f89a6be34a
3 changed files with 16 additions and 6 deletions
|
@ -103,5 +103,13 @@ class SearchStyleSheet: IStyleSheet {
|
|||
s.borderColor = colors.blackDividers
|
||||
s.textAlignment = .natural
|
||||
}
|
||||
|
||||
theme.add(styleName: "SearchCellAds", from: "TableCell") { (s) -> (Void) in
|
||||
s.backgroundColor = colors.bannerBackground
|
||||
}
|
||||
|
||||
theme.add(styleName: "SearchCellAvaliable", from: "TableCell") { (s) -> (Void) in
|
||||
s.backgroundColor = colors.transparentGreen
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,11 +122,11 @@ bool PopularityHasHigherPriority(bool hasPosition, double distanceInMeters)
|
|||
}
|
||||
|
||||
if (productInfo.m_isLocalAdsCustomer)
|
||||
self.backgroundColor = [UIColor bannerBackground];
|
||||
[self setStyleAndApply: @"SearchCellAds"];
|
||||
else if (isAvailable)
|
||||
self.backgroundColor = [UIColor transparentGreen];
|
||||
[self setStyleAndApply: @"SearchCellAvaliable"];
|
||||
else
|
||||
self.backgroundColor = [UIColor white];
|
||||
[self setStyleAndApply: @"Background"];
|
||||
}
|
||||
|
||||
- (void)setInfoText:(NSString *)infoText
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
@ -21,7 +23,7 @@
|
|||
<color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="bold17:blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular17:blackPrimaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="P8X-Xp-AaE">
|
||||
|
@ -289,10 +291,10 @@
|
|||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" image="ic_hot_offer" translatesAutoresizingMaskIntoConstraints="NO" id="eHM-Vf-w4R">
|
||||
<rect key="frame" x="307" y="46.5" width="40" height="36"/>
|
||||
<rect key="frame" x="307" y="55.5" width="20" height="18"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="P8X-Xp-AaE" firstAttribute="leading" secondItem="6pc-4s-GyP" secondAttribute="trailing" id="0hr-QT-t0D"/>
|
||||
<constraint firstItem="70N-Lq-mj9" firstAttribute="top" secondItem="5UO-MD-Hgx" secondAttribute="bottom" constant="4" id="5D1-Su-Oke"/>
|
||||
|
|
Loading…
Add table
Reference in a new issue