Fix system tray tooltip

pull/18/head
kateleet 4 years ago
parent 017515d5d5
commit 725cb53e9d

@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
@ -109,7 +109,7 @@ Item {
width: rootItem.iconSize width: rootItem.iconSize
height: rootItem.iconSize height: rootItem.iconSize
sourceSize: Qt.size(rootItem.iconSize, sourceSize: Qt.size(rootItem.iconSize,
rootItem.iconSize) rootItem.iconSize)
source: acticity.icon ? "image://icontheme/" + acticity.icon : "" source: acticity.icon ? "image://icontheme/" + acticity.icon : ""
visible: status === Image.Ready visible: status === Image.Ready
antialiasing: true antialiasing: true

@ -255,11 +255,7 @@ void StatusNotifierItemSource::refreshCallback(QDBusPendingCallWatcher *call)
KDbusToolTipStruct toolTip; KDbusToolTipStruct toolTip;
properties[QStringLiteral("ToolTip")].value<QDBusArgument>() >> toolTip; properties[QStringLiteral("ToolTip")].value<QDBusArgument>() >> toolTip;
m_tooltip = toolTip.title; m_tooltip = toolTip.title;
m_subTitle = toolTip.subTitle;
// Use ID as an alternative :)
if (m_tooltip.isEmpty() && m_title.isEmpty()) {
m_tooltip = properties[QStringLiteral("Id")].toString();
}
// Icon // Icon
KDbusImageVector image; KDbusImageVector image;

@ -197,6 +197,6 @@ void SystemTrayModel::updated(StatusNotifierItemSource *item)
// update // update
if (idx != -1) { if (idx != -1) {
dataChanged(index(idx, 0), index(idx, 0)); emit dataChanged(index(idx, 0), index(idx, 0));
} }
} }

Loading…
Cancel
Save