mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
use plain text for information panel
REVIEW: 109129 BUG: 315693 CCBUG: 262464
This commit is contained in:
parent
34f1ffd668
commit
61ea42b353
1 changed files with 4 additions and 3 deletions
|
@ -105,6 +105,7 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) :
|
||||||
QFont font = m_nameLabel->font();
|
QFont font = m_nameLabel->font();
|
||||||
font.setBold(true);
|
font.setBold(true);
|
||||||
m_nameLabel->setFont(font);
|
m_nameLabel->setFont(font);
|
||||||
|
m_nameLabel->setTextFormat(Qt::PlainText);
|
||||||
m_nameLabel->setAlignment(Qt::AlignHCenter);
|
m_nameLabel->setAlignment(Qt::AlignHCenter);
|
||||||
m_nameLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
m_nameLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
|
|
||||||
|
@ -163,7 +164,7 @@ void InformationPanelContent::showItem(const KFileItem& item)
|
||||||
const KUrl itemUrl = item.url();
|
const KUrl itemUrl = item.url();
|
||||||
const bool isSearchUrl = itemUrl.protocol().contains("search") && item.nepomukUri().isEmpty();
|
const bool isSearchUrl = itemUrl.protocol().contains("search") && item.nepomukUri().isEmpty();
|
||||||
if (!applyPlace(itemUrl)) {
|
if (!applyPlace(itemUrl)) {
|
||||||
setNameLabelText(Qt::escape(item.text()));
|
setNameLabelText(item.text());
|
||||||
if (isSearchUrl) {
|
if (isSearchUrl) {
|
||||||
// in the case of a search-URL the URL is not readable for humans
|
// in the case of a search-URL the URL is not readable for humans
|
||||||
// (at least not useful to show in the Information Panel)
|
// (at least not useful to show in the Information Panel)
|
||||||
|
@ -233,7 +234,7 @@ void InformationPanelContent::showItems(const KFileItemList& items)
|
||||||
KIconLoader::NoGroup,
|
KIconLoader::NoGroup,
|
||||||
KIconLoader::SizeEnormous);
|
KIconLoader::SizeEnormous);
|
||||||
m_preview->setPixmap(icon);
|
m_preview->setPixmap(icon);
|
||||||
setNameLabelText(i18ncp("@info", "%1 item selected", "%1 items selected", items.count()));
|
setNameLabelText(i18ncp("@label", "%1 item selected", "%1 items selected", items.count()));
|
||||||
|
|
||||||
if (m_metaDataWidget) {
|
if (m_metaDataWidget) {
|
||||||
m_metaDataWidget->setItems(items);
|
m_metaDataWidget->setItems(items);
|
||||||
|
@ -361,7 +362,7 @@ bool InformationPanelContent::applyPlace(const KUrl& url)
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
const PlacesItem* item = m_placesItemModel->placesItem(i);
|
const PlacesItem* item = m_placesItemModel->placesItem(i);
|
||||||
if (item->url().equals(url, KUrl::CompareWithoutTrailingSlash)) {
|
if (item->url().equals(url, KUrl::CompareWithoutTrailingSlash)) {
|
||||||
setNameLabelText(Qt::escape(item->text()));
|
setNameLabelText(item->text());
|
||||||
m_preview->setPixmap(KIcon(item->icon()).pixmap(128, 128));
|
m_preview->setPixmap(KIcon(item->icon()).pixmap(128, 128));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue