Fix some stories tooltip edge cases.
This commit is contained in:
		
							parent
							
								
									065eb8e63c
								
							
						
					
					
						commit
						57fc9f71ac
					
				
					 3 changed files with 9 additions and 9 deletions
				
			
		|  | @ -20,7 +20,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL | |||
| #include "media/streaming/media_streaming_instance.h" | ||||
| #include "media/streaming/media_streaming_player.h" | ||||
| #include "base/event_filter.h" | ||||
| #include "base/qt/qt_tab_key.h" | ||||
| #include "lang/lang_keys.h" | ||||
| #include "styles/style_boxes.h" | ||||
| #include "styles/style_layers.h" | ||||
|  | @ -671,8 +670,6 @@ PeerShortInfoBox::PeerShortInfoBox( | |||
| 	) | rpl::start_with_next([=] { | ||||
| 		_cover.setScrollTop(_scroll->scrollTop()); | ||||
| 	}, _cover.lifetime()); | ||||
| 
 | ||||
| 	base::DisableTabKey(this); | ||||
| } | ||||
| 
 | ||||
| PeerShortInfoBox::~PeerShortInfoBox() = default; | ||||
|  |  | |||
|  | @ -803,8 +803,10 @@ void Widget::setupStories() { | |||
| 		Core::App().saveSettingsDelayed(); | ||||
| 	}; | ||||
| 	_stories->setShowTooltip( | ||||
| 		Core::App().settings().storiesClickTooltipHiddenValue( | ||||
| 		) | rpl::map(!rpl::mappers::_1), | ||||
| 		rpl::combine( | ||||
| 			Core::App().settings().storiesClickTooltipHiddenValue(), | ||||
| 			shownValue(), | ||||
| 			!rpl::mappers::_1 && rpl::mappers::_2), | ||||
| 		hideTooltip); | ||||
| 
 | ||||
| 	_storiesContents.fire(Stories::ContentForSession( | ||||
|  |  | |||
|  | @ -951,9 +951,6 @@ void List::updateTooltipGeometry() { | |||
| 		return; | ||||
| 	} | ||||
| 	const auto collapsed = collapsedGeometryCurrent(); | ||||
| 	if (collapsed.geometry.isEmpty()) { | ||||
| 		int a = 0; | ||||
| 	} | ||||
| 	const auto geometry = Ui::MapFrom( | ||||
| 		window(), | ||||
| 		parentWidget(), | ||||
|  | @ -964,8 +961,12 @@ void List::updateTooltipGeometry() { | |||
| 			collapsed.geometry.height())); | ||||
| 	const auto weak = QPointer<QWidget>(_tooltip.get()); | ||||
| 	const auto countPosition = [=](QSize size) { | ||||
| 		const auto left = geometry.x() | ||||
| 			+ (geometry.width() - size.width()) / 2; | ||||
| 		const auto right = window()->width() | ||||
| 			- st::dialogsStoriesTooltip.padding.right(); | ||||
| 		return QPoint( | ||||
| 			geometry.x() + (geometry.width() - size.width()) / 2, | ||||
| 			std::max(std::min(left, right - size.width()), 0), | ||||
| 			geometry.y() + geometry.height()); | ||||
| 	}; | ||||
| 	_tooltip->pointAt(geometry, RectPart::Bottom, countPosition); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 John Preston
						John Preston