Răsfoiți Sursa

XLFormSliderCell : change default Constraint "H:|-30-[slider]-30-|"

Marino Faggiana 6 ani în urmă
părinte
comite
493aadc0ba

+ 3 - 1
iOSClient/Create/CCCreateCloud.swift

@@ -743,6 +743,8 @@ class CreateFormUploadScanDocument: XLFormViewController, CCMoveDelegate {
         row.value = 0.5
         row.title = NSLocalizedString("_quality_medium_", comment: "")
         
+        row.cellConfig["slider.minimumTrackTintColor"] = NCBrandColor.sharedInstance.brand
+
         row.cellConfig["slider.maximumValue"] = 1
         row.cellConfig["slider.minimumValue"] = 0
         row.cellConfig["steps"] = 2
@@ -750,7 +752,7 @@ class CreateFormUploadScanDocument: XLFormViewController, CCMoveDelegate {
         row.cellConfig["textLabel.textAlignment"] = NSTextAlignment.center.rawValue
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
         row.cellConfig["textLabel.textColor"] = UIColor.black
-        
+                
         section.addFormRow(row)
 
         // Section: File Name

+ 1 - 1
iOSClient/Library/XLForm/XL/Cell/XLFormSliderCell.m

@@ -48,7 +48,7 @@
 	[self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.textLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
 	[self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.slider attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1 constant:44]];
 	[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[textLabel]-|" options:0 metrics:0 views:@{@"textLabel": self.textLabel}]];
-	[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[slider]-|" options:0 metrics:0 views:@{@"slider": self.slider}]];
+	[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-30-[slider]-30-|" options:0 metrics:0 views:@{@"slider": self.slider}]];
 	
 	[self valueChanged:nil];
 }