Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-iOS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cerezo074
VLC-iOS
Commits
034df031
Commit
034df031
authored
Jul 22, 2019
by
Carola Nitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fastlane: Add fake Volumesliderpatch to screenshotting
parent
9b16a551
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
0 deletions
+75
-0
fastlane/0001-fakeVolumeSlider.patch
fastlane/0001-fakeVolumeSlider.patch
+69
-0
fastlane/Fastfile
fastlane/Fastfile
+6
-0
No files found.
fastlane/0001-fakeVolumeSlider.patch
0 → 100644
View file @
034df031
From 1904e24cc3ea90da807b25ff17d4dd197894f521 Mon Sep 17 00:00:00 2001
From: Carola Nitz <nitz.carola@googlemail.com>
Date: Wed, 10 Jul 2019 19:50:54 +0200
Subject: [PATCH] VLCMovieViewControlpanelView: Add in fake VolumeControl for
screenshots
(closes #575)
---
Sources/VLCMovieViewControlPanelView.m | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/Sources/VLCMovieViewControlPanelView.m b/Sources/VLCMovieViewControlPanelView.m
index a0eb8fe2..03dbcb66 100644
--- a/Sources/VLCMovieViewControlPanelView.m
+++ b/Sources/VLCMovieViewControlPanelView.m
@@ -24,6 +24,7 @@
@interface VLCMovieViewControlPanelView ()
@property (nonatomic, strong) NSMutableArray *constraints;
@property (nonatomic, assign) BOOL compactMode;
@property (nonatomic, strong) VLCPlaybackController *playbackController;
+@property (nonatomic, strong) UISlider *fakeVolumeSlider; //Needed for Screenshots
@end
@implementation VLCMovieViewControlPanelView
@@ -92,10 +93,17 @@
- (void)setupSubviews
[_moreActionsButton setImage:[UIImage imageNamed:@"More"] forState:UIControlStateNormal];
_moreActionsButton.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_moreActionsButton];
-
+#if TARGET_OS_SIMULATOR
+ _fakeVolumeSlider = [UISlider new];
+ _fakeVolumeSlider.value = 0.5;
+ [_fakeVolumeSlider setThumbImage:[UIImage imageNamed:@"sliderKnob"] forState:UIControlStateNormal];
+ _fakeVolumeSlider.translatesAutoresizingMaskIntoConstraints = NO;
+ [self addSubview:_fakeVolumeSlider];
+#else
_volumeView = [[VLCVolumeView alloc] initWithFrame:CGRectZero];
_volumeView.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_volumeView];
+#endif
_playbackSpeedButton.accessibilityLabel = NSLocalizedString(@"PLAYBACK_SPEED", nil);
_trackSwitcherButton.accessibilityLabel = NSLocalizedString(@"OPEN_TRACK_PANEL", nil);
@@ -122,7 +130,11 @@
- (void)setupConstraints
@"track" : self.trackSwitcherButton,
@"more" : self.moreActionsButton,
@"filter" : self.videoFilterButton,
+#if TARGET_OS_SIMULATOR
+ @"volume" : _fakeVolumeSlider,
+#else
@"volume" : self.volumeView,
+#endif
@"spacer1" : _spacer1,
@"spacer2" : _spacer2,
};
@@ -168,7 +180,11 @@
- (void)setupConstraints:(BOOL)compactMode
@"playback" : self.playbackControls,
@"filter" : self.videoFilterButton,
@"actions" : self.moreActionsButton,
+#if TARGET_OS_SIMULATOR
+ @"volume" : _fakeVolumeSlider,
+#else
@"volume" : self.volumeView,
+#endif
};
_constraints = [NSMutableArray array];
--
2.20.1 (Apple Git-117)
fastlane/Fastfile
View file @
034df031
...
...
@@ -65,10 +65,16 @@ end
desc
'Take screenshots'
lane
:screenshots
do
git_apply_fake_VolumeSlider
capture_screenshots
(
stop_after_first_error:
true
)
frameit
(
white:
true
,
path:
'./fastlane/screenshots'
)
end
desc
'Apply fakeVolumeSlider patch'
private_lane
:git_apply_fake_VolumeSlider
do
sh
(
'xcrun git apply 0001-fakeVolumeSlider.patch'
)
end
#### Tests ####
desc
'Run Tests'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment