Ver Fonte

【内嵌支付】修复“比较表当原价与折扣价格相同时,居中折扣价格”

wanjun há 6 meses atrás
pai
commit
3909823c5d

+ 7 - 0
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseCompareDMGWindowController.m

@@ -191,6 +191,7 @@ static NSString *const KMPurchaseCompareDMGCellIdentifier       = @"KMPurchaseCo
 @property (weak) IBOutlet NSSwitch *buySwitch;
 @property (weak) IBOutlet NSTextField *discountPriceLabel;
 @property (weak) IBOutlet NSTextField *originalPriceLabel;
+@property (weak) IBOutlet NSTextField *discountPriceLabel2;
 
 @property (nonatomic, assign) NSModalSession modalSession;
 @property (nonatomic, retain) NSArray *dataSource;
@@ -241,6 +242,8 @@ static NSString *const KMPurchaseCompareDMGCellIdentifier       = @"KMPurchaseCo
     self.discountPriceLabel.font = [NSFont fontWithName:@"Ubuntu" size:36.0];
     self.originalPriceLabel.textColor = [NSColor whiteColor];
     self.originalPriceLabel.font = [NSFont fontWithName:@"Ubuntu" size:14.0];
+    self.discountPriceLabel2.textColor = [NSColor colorWithRed:255.0/255.0 green:231.0/255.0 blue:106.0/255.0 alpha:1.0];
+    self.discountPriceLabel2.font = [NSFont fontWithName:@"Ubuntu" size:36.0];
 
     self.freeVersionLbl.stringValue = NSLocalizedString(@"Free Version", nil);
     self.parmanentVerLbl.stringValue = NSLocalizedString(@"Permanent License", nil);
@@ -526,9 +529,13 @@ static NSString *const KMPurchaseCompareDMGCellIdentifier       = @"KMPurchaseCo
             }];
             if ([originalText isEqualToString:discountText]) {
                 [self.originalPriceLabel setHidden:YES];
+                [self.discountPriceLabel setHidden:YES];
+                [self.discountPriceLabel2 setHidden:NO];
                 [self.discountTipImage setHidden:YES];
             } else {
                 [self.originalPriceLabel setHidden:NO];
+                [self.discountPriceLabel setHidden:NO];
+                [self.discountPriceLabel2 setHidden:YES];
                 [self.discountTipImage setHidden:NO];
             }
         } else {

+ 11 - 0
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseCompareDMGWindowController.xib

@@ -21,6 +21,7 @@
                 <outlet property="buyNowButton" destination="HrV-Kb-x66" id="Qc0-hK-Otk"/>
                 <outlet property="buySwitch" destination="tbA-Jh-3g0" id="3Ix-rM-0vu"/>
                 <outlet property="discountPriceLabel" destination="2Ai-gP-tyw" id="otG-Wx-3sn"/>
+                <outlet property="discountPriceLabel2" destination="Utf-37-XY7" id="kss-xI-f9y"/>
                 <outlet property="discountTipImage" destination="KBo-MG-ErN" id="xI6-Lo-YRE"/>
                 <outlet property="enterLicenseButton" destination="JrW-cc-ivk" id="8vR-Ti-GJy"/>
                 <outlet property="freeContendView" destination="bSI-fT-0EN" id="dpN-M9-Jg2"/>
@@ -967,6 +968,14 @@
                                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                                     </textFieldCell>
                                                 </textField>
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Utf-37-XY7">
+                                                    <rect key="frame" x="17" y="19" width="37" height="16"/>
+                                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="A8X-la-7P2">
+                                                        <font key="font" metaFont="system"/>
+                                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                    </textFieldCell>
+                                                </textField>
                                             </subviews>
                                             <constraints>
                                                 <constraint firstItem="2Ai-gP-tyw" firstAttribute="leading" secondItem="jja-GZ-6mb" secondAttribute="leading" id="Zbp-ib-vwL"/>
@@ -977,6 +986,8 @@
                                         </view>
                                         <constraints>
                                             <constraint firstItem="2Ai-gP-tyw" firstAttribute="centerY" secondItem="ZIL-vW-TJt" secondAttribute="centerY" id="6QE-RL-Ti6"/>
+                                            <constraint firstItem="Utf-37-XY7" firstAttribute="centerY" secondItem="ZIL-vW-TJt" secondAttribute="centerY" id="Nx6-i7-a2N"/>
+                                            <constraint firstItem="Utf-37-XY7" firstAttribute="centerX" secondItem="ZIL-vW-TJt" secondAttribute="centerX" id="Ny9-Rf-4ej"/>
                                             <constraint firstAttribute="height" constant="54" id="QTP-2n-xhK"/>
                                         </constraints>
                                     </box>