diff --git a/Limelight/Base.lproj/iPad.storyboard b/Limelight/Base.lproj/iPad.storyboard index 330c674f..821403a1 100644 --- a/Limelight/Base.lproj/iPad.storyboard +++ b/Limelight/Base.lproj/iPad.storyboard @@ -867,8 +867,26 @@ ICAgICAgICAgICAgICA - - + + + + + + + + + + + + + + + + + + + + @@ -876,24 +894,6 @@ ICAgICAgICAgICAgICA - - - - - - - - - - - - - - - - - - diff --git a/Limelight/Base.lproj/iPhone.storyboard b/Limelight/Base.lproj/iPhone.storyboard index c1177644..5bea4d51 100644 --- a/Limelight/Base.lproj/iPhone.storyboard +++ b/Limelight/Base.lproj/iPhone.storyboard @@ -870,32 +870,32 @@ ICAgICAgICAgICAgIA - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - @@ -997,13 +997,13 @@ ICAgICAgICAgICAgIA - + - + diff --git a/Limelight/Input/OnScreenButtonView.swift b/Limelight/Input/OnScreenButtonView.swift index 596b977b..99afd0ce 100644 --- a/Limelight/Input/OnScreenButtonView.swift +++ b/Limelight/Input/OnScreenButtonView.swift @@ -777,7 +777,6 @@ import UIKit storedLocation = currentLocation // Update initial center for next movement } } - } private func handleTouchPadMoveEvent (_ touches: Set, with event: UIEvent?){ diff --git a/Limelight/Localization/Localizable.xcstrings b/Limelight/Localization/Localizable.xcstrings index 516039dc..a2d792e7 100644 --- a/Limelight/Localization/Localizable.xcstrings +++ b/Limelight/Localization/Localizable.xcstrings @@ -237,144 +237,6 @@ } } }, - "Button Alpha" : { - "extractionState" : "manual", - "localizations" : { - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键透明度" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键透明度" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键透明度" - } - } - } - }, - "Button Alpha: %.2f" : { - "extractionState" : "manual", - "localizations" : { - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键透明度: %.2f" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键透明度: %.2f" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键透明度: %.2f" - } - } - } - }, - "Button Height" : { - "extractionState" : "manual", - "localizations" : { - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键高度" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键高度" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键高度" - } - } - } - }, - "Button Height: %.2f" : { - "extractionState" : "manual", - "localizations" : { - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键高度: %.2f" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键高度: %.2f" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键高度: %.2f" - } - } - } - }, - "Button Size" : { - "extractionState" : "manual", - "localizations" : { - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键大小" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键大小" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键大小" - } - } - } - }, - "Button Size: %.2f" : { - "extractionState" : "manual", - "localizations" : { - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键大小: %.2f" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键大小: %.2f" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "按键大小: %.2f" - } - } - } - }, "Cancel" : { "extractionState" : "manual", "localizations" : { @@ -611,29 +473,6 @@ } } }, - "Current Profile: %@" : { - "extractionState" : "manual", - "localizations" : { - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "当前布局: %@" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "当前布局: %@" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "当前布局: %@" - } - } - } - }, "Custom Resolution Selected" : { "extractionState" : "manual", "localizations" : { @@ -1860,6 +1699,29 @@ } } }, + "Profile: %@" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "当前布局: %@" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "当前布局: %@" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "当前布局: %@" + } + } + } + }, "Quit App" : { "extractionState" : "manual", "localizations" : { @@ -2879,6 +2741,144 @@ } } }, + "Widget Alpha" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件透明度" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件透明度" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件透明度" + } + } + } + }, + "Widget Alpha: %.2f" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件透明度: %.2f" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件透明度: %.2f" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件透明度: %.2f" + } + } + } + }, + "Widget Height" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件高度" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件高度" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件高度" + } + } + } + }, + "Widget Height: %.2f" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件高度: %.2f" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件高度: %.2f" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件高度: %.2f" + } + } + } + }, + "Widget Size" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件大小" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件大小" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件大小" + } + } + } + }, + "Widget Size: %.2f" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件大小: %.2f" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件大小: %.2f" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "控件大小: %.2f" + } + } + } + }, "Your network connection isn't performing well. Reduce your video bitrate setting or try a faster connection." : { "extractionState" : "manual", "localizations" : { diff --git a/Limelight/ViewControllers/CustomOSCViewControl/LayoutOnScreenControlsViewController.m b/Limelight/ViewControllers/CustomOSCViewControl/LayoutOnScreenControlsViewController.m index 4ed04cdc..85101f31 100644 --- a/Limelight/ViewControllers/CustomOSCViewControl/LayoutOnScreenControlsViewController.m +++ b/Limelight/ViewControllers/CustomOSCViewControl/LayoutOnScreenControlsViewController.m @@ -386,9 +386,9 @@ [self.buttonAndControllerHeightSlider setValue: self->selectedButtonView.heightFactor]; [self.buttonAndControllerAlphaSlider setValue: self->selectedButtonView.backgroundAlpha]; - [buttonSizeSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Button Size: %.2f", self->selectedButtonView.widthFactor]]; - [buttonHeightSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Button Height: %.2f", self->selectedButtonView.heightFactor]]; - [buttonAlphaSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Button Alpha: %.2f", self->selectedButtonView.backgroundAlpha]]; + [buttonSizeSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Widget Size: %.2f", self->selectedButtonView.widthFactor]]; + [buttonHeightSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Widget Height: %.2f", self->selectedButtonView.heightFactor]]; + [buttonAlphaSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Widget Alpha: %.2f", self->selectedButtonView.backgroundAlpha]]; } @@ -407,14 +407,14 @@ CGFloat alpha = [self.layoutOSC getControllerLayerOpacity:controllerLayer]; [self.buttonAndControllerAlphaSlider setValue:alpha]; - [buttonSizeSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Button Size: %.2f", sizeFactor]]; - [buttonHeightSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Button Height: %.2f", sizeFactor]]; - [buttonAlphaSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Button Alpha: %.2f", alpha]]; + [buttonSizeSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Widget Size: %.2f", sizeFactor]]; + [buttonHeightSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Widget Height: %.2f", sizeFactor]]; + [buttonAlphaSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Widget Alpha: %.2f", alpha]]; } - (void)buttonAndControllerSizeSliderMoved{ - [buttonSizeSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Button Size: %.2f", self.buttonAndControllerSizeSlider.value]]; - [buttonHeightSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Button Height: %.2f", self.buttonAndControllerSizeSlider.value]]; // resizing the whole button + [buttonSizeSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Widget Size: %.2f", self.buttonAndControllerSizeSlider.value]]; + [buttonHeightSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Widget Height: %.2f", self.buttonAndControllerSizeSlider.value]]; // resizing the whole button [self.buttonAndControllerHeightSlider setValue: self.buttonAndControllerSizeSlider.value]; if(self->selectedButtonView != nil && self->buttonViewSelected){ @@ -429,7 +429,7 @@ } - (void)buttonAndControllerHeightSliderMoved{ - [buttonHeightSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Button Height: %.2f", self.buttonAndControllerHeightSlider.value]]; + [buttonHeightSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Widget Height: %.2f", self.buttonAndControllerHeightSlider.value]]; if(self->selectedButtonView != nil && self->buttonViewSelected){ self->selectedButtonView.translatesAutoresizingMaskIntoConstraints = true; // this is mandatory to prevent unexpected key view location change self->selectedButtonView.heightFactor = self.buttonAndControllerHeightSlider.value; @@ -438,7 +438,7 @@ } - (void)buttonAndControllerAlphaSliderMoved{ - [buttonAlphaSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Button Alpha: %.2f", self.buttonAndControllerAlphaSlider.value]]; + [buttonAlphaSliderLabel setText:[LocalizationHelper localizedStringForKey:@"Widget Alpha: %.2f", self.buttonAndControllerAlphaSlider.value]]; if(self->selectedButtonView != nil && self->buttonViewSelected){ [self->selectedButtonView adjustButtonTransparencyWithAlpha:self.buttonAndControllerAlphaSlider.value]; } @@ -450,17 +450,27 @@ } - (void)setupProfileLableAndSliders{ - CGFloat xPosition = (self.view.bounds.size.width - self.currentProfileLabel.frame.size.width) / 2; + // self.currentProfileLabel.frame = CGRectMake(0, 0, 180, 35); + // CGFloat profileLabelXPosition = self.view.bounds.size.width - self.currentProfileLabel.frame.size.width - 20; + CGFloat sliderXPosition = (self.view.bounds.size.width - self.buttonAndControllerSizeSlider.frame.size.width)/2 ; + CGFloat profileLabelXPosition = self.view.bounds.size.width/2 + (self.buttonAndControllerSizeSlider.frame.size.width)/2 + 8; + // Set the label's frame with the calculated x-position - self.currentProfileLabel.frame = CGRectMake(xPosition, self.currentProfileLabel.frame.origin.y, self.currentProfileLabel.frame.size.width, self.currentProfileLabel.frame.size.height); + self.currentProfileLabel.frame = CGRectMake(profileLabelXPosition, self.currentProfileLabel.frame.origin.y, self.currentProfileLabel.frame.size.width, self.currentProfileLabel.frame.size.height); self.currentProfileLabel.hidden = NO; // Show Current Profile display - [self.currentProfileLabel setText:[LocalizationHelper localizedStringForKey:@"Current Profile: %@",[profilesManager getSelectedProfile].name]]; // display current profile name when profile is being refreshed. + if (@available(iOS 13.0, *)) { + self.currentProfileLabel.textAlignment = NSTextAlignmentNatural; + self.currentProfileLabel.numberOfLines = 2; + } else { + // Fallback on earlier versions + } + [self.currentProfileLabel setText:[LocalizationHelper localizedStringForKey:@"Profile: %@",[profilesManager getSelectedProfile].name]]; // display current profile name when profile is being refreshed. // button size sliders self.buttonAndControllerSizeSlider.hidden = NO; - self.buttonAndControllerSizeSlider.frame = CGRectMake(xPosition, self.buttonAndControllerSizeSlider.frame.origin.y, self.buttonAndControllerSizeSlider.frame.size.width, self.buttonAndControllerSizeSlider.frame.size.height); + self.buttonAndControllerSizeSlider.frame = CGRectMake(sliderXPosition, self.buttonAndControllerSizeSlider.frame.origin.y, self.buttonAndControllerSizeSlider.frame.size.width, self.buttonAndControllerSizeSlider.frame.size.height); [self.buttonAndControllerSizeSlider addTarget:self action:@selector(buttonAndControllerSizeSliderMoved) forControlEvents:(UIControlEventValueChanged)]; - buttonSizeSliderLabel.text = [LocalizationHelper localizedStringForKey:@"Button Size"]; + buttonSizeSliderLabel.text = [LocalizationHelper localizedStringForKey:@"Widget Size"]; buttonSizeSliderLabel.font = [UIFont systemFontOfSize:23]; buttonSizeSliderLabel.textColor = [UIColor whiteColor]; buttonSizeSliderLabel.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5]; @@ -478,10 +488,10 @@ // button height sliders self.buttonAndControllerHeightSlider.hidden = NO; - self.buttonAndControllerHeightSlider.frame = CGRectMake(xPosition, self.buttonAndControllerHeightSlider.frame.origin.y, self.buttonAndControllerHeightSlider.frame.size.width, self.buttonAndControllerHeightSlider.frame.size.height); + self.buttonAndControllerHeightSlider.frame = CGRectMake(sliderXPosition, self.buttonAndControllerHeightSlider.frame.origin.y, self.buttonAndControllerHeightSlider.frame.size.width, self.buttonAndControllerHeightSlider.frame.size.height); [self.buttonAndControllerHeightSlider addTarget:self action:@selector(buttonAndControllerHeightSliderMoved) forControlEvents:(UIControlEventValueChanged)]; // button height label - buttonHeightSliderLabel.text = [LocalizationHelper localizedStringForKey:@"Button Height"]; + buttonHeightSliderLabel.text = [LocalizationHelper localizedStringForKey:@"Widget Height"]; buttonHeightSliderLabel.font = [UIFont systemFontOfSize:23]; buttonHeightSliderLabel.textColor = [UIColor whiteColor]; buttonHeightSliderLabel.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5]; @@ -499,12 +509,12 @@ self.buttonAndControllerAlphaSlider.hidden = NO; - self.buttonAndControllerAlphaSlider.frame = CGRectMake(xPosition, self.buttonAndControllerAlphaSlider.frame.origin.y, self.buttonAndControllerAlphaSlider.frame.size.width, self.buttonAndControllerAlphaSlider.frame.size.height); + self.buttonAndControllerAlphaSlider.frame = CGRectMake(sliderXPosition, self.buttonAndControllerAlphaSlider.frame.origin.y, self.buttonAndControllerAlphaSlider.frame.size.width, self.buttonAndControllerAlphaSlider.frame.size.height); [self.buttonAndControllerAlphaSlider addTarget:self action:@selector(buttonAndControllerAlphaSliderMoved) forControlEvents:(UIControlEventValueChanged)]; // button alpha label - buttonAlphaSliderLabel.text = [LocalizationHelper localizedStringForKey:@"Button Alpha"]; + buttonAlphaSliderLabel.text = [LocalizationHelper localizedStringForKey:@"Widget Alpha"]; buttonAlphaSliderLabel.font = [UIFont systemFontOfSize:23]; buttonAlphaSliderLabel.textColor = [UIColor whiteColor]; buttonAlphaSliderLabel.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5]; diff --git a/Limelight/mul.lproj/iPad.xcstrings b/Limelight/mul.lproj/iPad.xcstrings index c058ed7b..faf57fc7 100644 --- a/Limelight/mul.lproj/iPad.xcstrings +++ b/Limelight/mul.lproj/iPad.xcstrings @@ -806,30 +806,30 @@ } }, "cRV-Xw-CVi.text" : { - "comment" : "Class = \"UILabel\"; text = \"Current Profile:\"; ObjectID = \"cRV-Xw-CVi\";", + "comment" : "Class = \"UILabel\"; text = \"Profile:\"; ObjectID = \"cRV-Xw-CVi\";", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "Current Profile:" + "value" : "Profile:" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "当前布局: " } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "当前布局: " } }, "zh-HK" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "当前布局: " } }