Changeset View
Changeset View
Standalone View
Standalone View
client.cpp
Show First 20 Lines • Show All 1677 Lines • ▼ Show 20 Line(s) | 1657 | { | |||
---|---|---|---|---|---|
1678 | if (closabilityChanged) { | 1678 | if (closabilityChanged) { | ||
1679 | emit closeableChanged(isCloseable()); | 1679 | emit closeableChanged(isCloseable()); | ||
1680 | } | 1680 | } | ||
1681 | } | 1681 | } | ||
1682 | 1682 | | |||
1683 | void Client::getIcons() | 1683 | void Client::getIcons() | ||
1684 | { | 1684 | { | ||
1685 | // First read icons from the window itself | 1685 | // First read icons from the window itself | ||
1686 | const QString themedIconName = iconFromDesktopFile(); | ||||
1687 | if (!themedIconName.isEmpty()) { | ||||
1688 | setIcon(QIcon::fromTheme(themedIconName)); | ||||
1689 | return; | ||||
1690 | } | ||||
1686 | QIcon icon; | 1691 | QIcon icon; | ||
1687 | auto readIcon = [this, &icon](int size, bool scale = true) { | 1692 | auto readIcon = [this, &icon](int size, bool scale = true) { | ||
1688 | const QPixmap pix = KWindowSystem::icon(window(), size, size, scale, KWindowSystem::NETWM | KWindowSystem::WMHints, info); | 1693 | const QPixmap pix = KWindowSystem::icon(window(), size, size, scale, KWindowSystem::NETWM | KWindowSystem::WMHints, info); | ||
1689 | if (!pix.isNull()) { | 1694 | if (!pix.isNull()) { | ||
1690 | icon.addPixmap(pix); | 1695 | icon.addPixmap(pix); | ||
1691 | } | 1696 | } | ||
1692 | }; | 1697 | }; | ||
1693 | readIcon(16); | 1698 | readIcon(16); | ||
▲ Show 20 Lines • Show All 458 Lines • Show Last 20 Lines |