mirror of https://github.com/procxx/kepka.git
				
				
				
			Fix fullscreen rotate, fix rotate phrase.
This commit is contained in:
		
							parent
							
								
									7bf2b607f9
								
							
						
					
					
						commit
						05c95a0307
					
				|  | @ -1581,6 +1581,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL | |||
| "lng_mediaview_video_loading" = "Loading - {percent}"; | ||||
| "lng_mediaview_playback_speed" = "Playback speed"; | ||||
| "lng_mediaview_playback_speed_normal" = "Normal"; | ||||
| "lng_mediaview_rotate_video" = "Rotate video"; | ||||
| 
 | ||||
| "lng_theme_preview_title" = "Theme Preview"; | ||||
| "lng_theme_preview_generating" = "Generating color theme preview..."; | ||||
|  |  | |||
|  | @ -920,8 +920,8 @@ void OverlayWidget::resizeContentByScreenSize() { | |||
| 		_w = _width; | ||||
| 		_h = _height; | ||||
| 	} | ||||
| 	_x = skipWidth + (usew - _w) / 2; | ||||
| 	_y = skipHeight + (useh - _h) / 2; | ||||
| 	_x = (width() - _w) / 2; | ||||
| 	_y = (height() - _h) / 2; | ||||
| } | ||||
| 
 | ||||
| float64 OverlayWidget::radialProgress() const { | ||||
|  | @ -2571,17 +2571,26 @@ void OverlayWidget::playbackControlsVolumeChangeFinished() { | |||
| } | ||||
| 
 | ||||
| void OverlayWidget::playbackControlsSpeedChanged(float64 speed) { | ||||
| 	DEBUG_LOG(("Media playback speed: change to %1.").arg(speed)); | ||||
| 	if (_doc) { | ||||
| 		DEBUG_LOG(("Media playback speed: %1 to settings.").arg(speed)); | ||||
| 		_doc->session().settings().setVideoPlaybackSpeed(speed); | ||||
| 		_doc->session().saveSettingsDelayed(); | ||||
| 	} | ||||
| 	if (_streamed && !videoIsGifv()) { | ||||
| 		DEBUG_LOG(("Media playback speed: %1 to _streamed.").arg(speed)); | ||||
| 		_streamed->instance.setSpeed(speed); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| float64 OverlayWidget::playbackControlsCurrentSpeed() { | ||||
| 	return _doc ? _doc->session().settings().videoPlaybackSpeed() : 1.; | ||||
| 	const auto result = _doc | ||||
| 		? _doc->session().settings().videoPlaybackSpeed() | ||||
| 		: 1.; | ||||
| 	DEBUG_LOG(("Media playback speed: now %1 (doc %2)." | ||||
| 		).arg(result | ||||
| 		).arg(Logs::b(_doc != nullptr))); | ||||
| 	return result; | ||||
| } | ||||
| 
 | ||||
| void OverlayWidget::switchToPip() { | ||||
|  |  | |||
|  | @ -223,7 +223,7 @@ void PlaybackControls::showMenu() { | |||
| 	addSpeed(1.75); | ||||
| 	addSpeed(2.); | ||||
| 	_menu.emplace(this, st::mediaviewControlsPopupMenu); | ||||
| 	_menu->addAction("Rotate video", [=] { | ||||
| 	_menu->addAction(tr::lng_mediaview_rotate_video(tr::now), [=] { | ||||
| 		_delegate->playbackControlsRotate(); | ||||
| 	}); | ||||
| 	_menu->addSeparator(); | ||||
|  | @ -235,6 +235,7 @@ void PlaybackControls::showMenu() { | |||
| } | ||||
| 
 | ||||
| void PlaybackControls::updatePlaybackSpeed(float64 speed) { | ||||
| 	DEBUG_LOG(("Media playback speed: update to %1.").arg(speed)); | ||||
| 	_delegate->playbackControlsSpeedChanged(speed); | ||||
| 	resizeEvent(nullptr); | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue