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
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.12
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12
@ -109,7 +109,7 @@ Item {
width: rootItem.iconSize
height: rootItem.iconSize
sourceSize: Qt.size(rootItem.iconSize,
rootItem.iconSize)
rootItem.iconSize)
source: acticity.icon ? "image://icontheme/" + acticity.icon : ""
visible: status === Image.Ready
antialiasing: true

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

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

Loading…
Cancel
Save