mirror of https://github.com/procxx/kepka.git
				
				
				
			
							parent
							
								
									36997f084a
								
							
						
					
					
						commit
						0251f58bf2
					
				|  | @ -82,6 +82,7 @@ MTPVector<MTPMessageEntity> EntitiesToMTP( | ||||||
| 		if (entity.length() <= 0) continue; | 		if (entity.length() <= 0) continue; | ||||||
| 		if (option == ConvertOption::SkipLocal | 		if (option == ConvertOption::SkipLocal | ||||||
| 			&& entity.type() != EntityType::Bold | 			&& entity.type() != EntityType::Bold | ||||||
|  | 			//&& entity.type() != EntityType::Semibold // Not in API.
 | ||||||
| 			&& entity.type() != EntityType::Italic | 			&& entity.type() != EntityType::Italic | ||||||
| 			&& entity.type() != EntityType::Underline | 			&& entity.type() != EntityType::Underline | ||||||
| 			&& entity.type() != EntityType::StrikeOut | 			&& entity.type() != EntityType::StrikeOut | ||||||
|  |  | ||||||
|  | @ -478,7 +478,7 @@ void InnerWidget::updateEmptyText() { | ||||||
| 	options.flags |= TextParseMarkdown; | 	options.flags |= TextParseMarkdown; | ||||||
| 	auto hasSearch = !_searchQuery.isEmpty(); | 	auto hasSearch = !_searchQuery.isEmpty(); | ||||||
| 	auto hasFilter = (_filter.flags != 0) || !_filter.allUsers; | 	auto hasFilter = (_filter.flags != 0) || !_filter.allUsers; | ||||||
| 	auto text = Ui::Text::Bold((hasSearch || hasFilter) | 	auto text = Ui::Text::Semibold((hasSearch || hasFilter) | ||||||
| 		? tr::lng_admin_log_no_results_title(tr::now) | 		? tr::lng_admin_log_no_results_title(tr::now) | ||||||
| 		: tr::lng_admin_log_no_events_title(tr::now)); | 		: tr::lng_admin_log_no_events_title(tr::now)); | ||||||
| 	auto description = hasSearch | 	auto description = hasSearch | ||||||
|  |  | ||||||
|  | @ -53,7 +53,7 @@ namespace { | ||||||
| 			auto link = Ui::Text::Link( | 			auto link = Ui::Text::Link( | ||||||
| 				tr::lng_about_random_send(tr::now).toUpper()); | 				tr::lng_about_random_send(tr::now).toUpper()); | ||||||
| 			link.entities.push_back( | 			link.entities.push_back( | ||||||
| 				EntityInText(EntityType::Bold, 0, link.text.size())); | 				EntityInText(EntityType::Semibold, 0, link.text.size())); | ||||||
| 			config.text.append(' ').append(std::move(link)); | 			config.text.append(' ').append(std::move(link)); | ||||||
| 			config.filter = crl::guard(&history->session(), [=]( | 			config.filter = crl::guard(&history->session(), [=]( | ||||||
| 					const ClickHandlerPtr &handler, | 					const ClickHandlerPtr &handler, | ||||||
|  |  | ||||||
|  | @ -269,7 +269,7 @@ void QrWidget::setupControls() { | ||||||
| 			st::introQrStepMargins); | 			st::introQrStepMargins); | ||||||
| 		const auto number = Ui::CreateChild<Ui::FlatLabel>( | 		const auto number = Ui::CreateChild<Ui::FlatLabel>( | ||||||
| 			steps, | 			steps, | ||||||
| 			rpl::single(Ui::Text::Bold(QString::number(++index) + ".")), | 			rpl::single(Ui::Text::Semibold(QString::number(++index) + ".")), | ||||||
| 			st::defaultFlatLabel); | 			st::defaultFlatLabel); | ||||||
| 		rpl::combine( | 		rpl::combine( | ||||||
| 			number->widthValue(), | 			number->widthValue(), | ||||||
|  |  | ||||||
|  | @ -544,7 +544,7 @@ void Widget::handleSongChange() { | ||||||
| 
 | 
 | ||||||
| 			textWithEntities.text = name + ' ' + date(); | 			textWithEntities.text = name + ' ' + date(); | ||||||
| 			textWithEntities.entities.append(EntityInText( | 			textWithEntities.entities.append(EntityInText( | ||||||
| 				EntityType::Bold, | 				EntityType::Semibold, | ||||||
| 				0, | 				0, | ||||||
| 				name.size(), | 				name.size(), | ||||||
| 				QString())); | 				QString())); | ||||||
|  | @ -565,7 +565,12 @@ void Widget::handleSongChange() { | ||||||
| 				: TextUtilities::Clean(song->title); | 				: TextUtilities::Clean(song->title); | ||||||
| 			auto dash = QString::fromUtf8(" \xe2\x80\x93 "); | 			auto dash = QString::fromUtf8(" \xe2\x80\x93 "); | ||||||
| 			textWithEntities.text = song->performer + dash + title; | 			textWithEntities.text = song->performer + dash + title; | ||||||
| 			textWithEntities.entities.append({ EntityType::Bold, 0, song->performer.size(), QString() }); | 			textWithEntities.entities.append({ | ||||||
|  | 				EntityType::Semibold, | ||||||
|  | 				0, | ||||||
|  | 				song->performer.size(), | ||||||
|  | 				QString() | ||||||
|  | 			}); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	_nameLabel->setMarkedText(textWithEntities); | 	_nameLabel->setMarkedText(textWithEntities); | ||||||
|  |  | ||||||
|  | @ -55,13 +55,27 @@ TextWithEntities ComposeNameWithEntities(DocumentData *document) { | ||||||
| 		result.text = document->filename().isEmpty() | 		result.text = document->filename().isEmpty() | ||||||
| 			? qsl("Unknown File") | 			? qsl("Unknown File") | ||||||
| 			: document->filename(); | 			: document->filename(); | ||||||
| 		result.entities.push_back({ EntityType::Bold, 0, result.text.size() }); | 		result.entities.push_back({ | ||||||
|  | 			EntityType::Semibold, | ||||||
|  | 			0, | ||||||
|  | 			result.text.size() | ||||||
|  | 		}); | ||||||
| 	} else if (song->performer.isEmpty()) { | 	} else if (song->performer.isEmpty()) { | ||||||
| 		result.text = song->title; | 		result.text = song->title; | ||||||
| 		result.entities.push_back({ EntityType::Bold, 0, result.text.size() }); | 		result.entities.push_back({ | ||||||
|  | 			EntityType::Semibold, | ||||||
|  | 			0, | ||||||
|  | 			result.text.size() | ||||||
|  | 		}); | ||||||
| 	} else { | 	} else { | ||||||
| 		result.text = song->performer + QString::fromUtf8(" \xe2\x80\x93 ") + (song->title.isEmpty() ? qsl("Unknown Track") : song->title); | 		result.text = song->performer | ||||||
| 		result.entities.push_back({ EntityType::Bold, 0, song->performer.size() }); | 			+ QString::fromUtf8(" \xe2\x80\x93 ") | ||||||
|  | 			+ (song->title.isEmpty() ? qsl("Unknown Track") : song->title); | ||||||
|  | 		result.entities.push_back({ | ||||||
|  | 			EntityType::Semibold, | ||||||
|  | 			0, | ||||||
|  | 			song->performer.size() | ||||||
|  | 		}); | ||||||
| 	} | 	} | ||||||
| 	return result; | 	return result; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1 +1 @@ | ||||||
| Subproject commit ab5a2260562078b7e5abcda8bb0eb2a61984bfd5 | Subproject commit 0ef9558269d0af6ba9466c3ce548351185bd7266 | ||||||
		Loading…
	
		Reference in New Issue