mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Consider scale factor when using animate hovering app icon
fixes #1613, fixes #1412
This commit is contained in:
@@ -417,11 +417,13 @@ var TaskbarAppIcon = GObject.registerClass({
|
||||
// It increases the "resolution" of the icon without changing the icon size.
|
||||
this.icon.createIcon = (iconSize) => this.app.create_icon_texture(2 * iconSize);
|
||||
this._iconIconBinActorAddedId = this.icon._iconBin.connect('actor-added', () => {
|
||||
let size = this.icon.iconSize * Utils.getScaleFactor()
|
||||
|
||||
if (this.icon._iconBin.child.mapped) {
|
||||
this.icon._iconBin.child.set_size(this.icon.iconSize, this.icon.iconSize);
|
||||
this.icon._iconBin.child.set_size(size, size);
|
||||
} else {
|
||||
let iconMappedId = this.icon._iconBin.child.connect('notify::mapped', () => {
|
||||
this.icon._iconBin.child.set_size(this.icon.iconSize, this.icon.iconSize);
|
||||
this.icon._iconBin.child.set_size(size, size);
|
||||
this.icon._iconBin.child.disconnect(iconMappedId);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user