Compare commits

..

1 Commits

Author SHA1 Message Date
matheusgomesms
b6f9ee9621 [iOS] Remove decimals in current speed
Signed-off-by: matheusgomesms <matheusgomesms@noreply.codeberg.org>
2026-01-03 19:21:32 -03:00
2 changed files with 8 additions and 8 deletions

View File

@@ -32,7 +32,7 @@
*/
- (NSString*) valueAsString {
auto const outString = measurement_utils::ToStringPrecision(self.value, self.value >= 10.0 ? 0 : 1);
auto const outString = measurement_utils::ToStringPrecision(self.value, 0);
return [NSString stringWithUTF8String:outString.c_str()];
}

View File

@@ -43,8 +43,8 @@ final class InfoItemView: UIView {
addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(onInfoLabelTap)))
addGestureRecognizer(UILongPressGestureRecognizer(target: self, action: #selector(onInfoLabelLongPress(_:))))
infoLabel.lineBreakMode = .byWordWrapping
infoLabel.numberOfLines = 0
infoLabel.lineBreakMode = .byTruncatingTail
infoLabel.numberOfLines = 1
infoLabel.allowsDefaultTighteningForTruncation = true
infoLabel.isUserInteractionEnabled = false
@@ -66,17 +66,17 @@ final class InfoItemView: UIView {
accessoryButton.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
heightAnchor.constraint(greaterThanOrEqualToConstant: Constants.viewHeight),
heightAnchor.constraint(equalToConstant: Constants.viewHeight),
iconButton.leadingAnchor.constraint(equalTo: leadingAnchor),
iconButton.centerYAnchor.constraint(equalTo: centerYAnchor),
iconButton.widthAnchor.constraint(equalToConstant: Constants.iconButtonSize),
iconButton.topAnchor.constraint(greaterThanOrEqualTo: topAnchor),
iconButton.bottomAnchor.constraint(lessThanOrEqualTo: bottomAnchor),
iconButton.topAnchor.constraint(equalTo: topAnchor),
iconButton.bottomAnchor.constraint(equalTo: bottomAnchor),
infoLabel.leadingAnchor.constraint(equalTo: iconButton.trailingAnchor),
infoLabel.topAnchor.constraint(equalTo: topAnchor, constant: Constants.infoLabelTopBottomSpacing),
infoLabel.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -Constants.infoLabelTopBottomSpacing),
infoLabel.topAnchor.constraint(equalTo: topAnchor),
infoLabel.bottomAnchor.constraint(equalTo: bottomAnchor),
infoLabel.trailingAnchor.constraint(equalTo: accessoryButton.leadingAnchor),
accessoryButton.trailingAnchor.constraint(equalTo: trailingAnchor),